From patchwork Fri Aug 7 10:22:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Kochetkov X-Patchwork-Id: 1342201 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=inbox.ru Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=inbox.ru header.i=@inbox.ru header.a=rsa-sha256 header.s=mail header.b=AER1+bND; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=inbox.ru header.i=@inbox.ru header.a=rsa-sha256 header.s=mail3 header.b=uSuTav3g; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BNLyp5B7Lz9sTF for ; Fri, 7 Aug 2020 20:22:42 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 00C92872C1; Fri, 7 Aug 2020 10:22:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dG8nKGlN20XG; Fri, 7 Aug 2020 10:22:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 522798727C; Fri, 7 Aug 2020 10:22:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C80E91BF2F8 for ; Fri, 7 Aug 2020 10:22:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C438D885E4 for ; Fri, 7 Aug 2020 10:22:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F1AkmidChnAv for ; Fri, 7 Aug 2020 10:22:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fallback13.mail.ru (fallback13.mail.ru [94.100.179.30]) by hemlock.osuosl.org (Postfix) with ESMTPS id 151D2885C4 for ; Fri, 7 Aug 2020 10:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=inbox.ru; s=mail; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From; bh=U8W/EUgKPB+Q+st3rBcXwwcsssbG+vsr3LACHc4ERA0=; b=AER1+bNDfg197LPVBpnc5TR65vapXHuLPp+u5OuFFnc7W9dz1hBVdqrM5G2939ZOPrazldL4u7UVNTsiOIykD7ZAjxBBBE92lRViKl0qoFFWBV7LdtcErSlpgrYhmKl4OL4DAcppLiGy+LTpYV8MMGfXg4ZoDYuzKlyi3wqaLe8=; Received: from [10.161.64.44] (port=57020 helo=smtp36.i.mail.ru) by fallback13.m.smailru.net with esmtp (envelope-from ) id 1k3zWB-0002bT-KC for buildroot@buildroot.org; Fri, 07 Aug 2020 13:22:31 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=inbox.ru; s=mail3; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From:From:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=U8W/EUgKPB+Q+st3rBcXwwcsssbG+vsr3LACHc4ERA0=; b=uSuTav3gmeRU/HxTkgvrpvJ3vPeKnK5ruo7bYKCjdjcGE1Km6Dg9spRffsIrDRq9fpi7+46ASBoLb426OQ3ebPJL6JANVKRRyOTfhVhKiRyg8in9FY6ZZLmISGdJ8A1KgJpJhZR6GA3HDgDDMaIgk4ilgM6+OqxVqVZLU+N2f8I=; Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1k3zW2-0003FL-0E; Fri, 07 Aug 2020 13:22:22 +0300 From: Maxim Kochetkov To: buildroot@buildroot.org Date: Fri, 7 Aug 2020 13:22:23 +0300 Message-Id: <20200807102223.1595194-1-fido_max@inbox.ru> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD96D681ABE1524340CCF420506C0DB3837B6AF667CBBE1D499182A05F538085040C81E4E5CB0C8C532C3FADA5EB2018F8357124EC52CBB45040B924EE2A461FA77 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7081BBE264C6D7F42EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637603D0B7FC8E46DFC8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCBA15BE03E4EAD3D801BA95E4A9FA55DDEED7B1009CFC8267389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0B27420F9988F54058941B15DA834481FCF19DD082D7633A0E7DDDDC251EA7DABA471835C12D1D977725E5C173C3A84C353FA85A707D24CADCC7F00164DA146DA6F5DAA56C3B73B235C65C28F1120AF113AA81AA40904B5D9A18204E546F3947C271926AB75068159AD7EC71F1DB884274AD6D5ED66289B5218080C068C56568E6136E347CC761E07725E5C173C3A84C39FD8B703BE3FDC66BA3038C0950A5D36B5C8C57E37DE458B0B4866841D68ED3567F23339F89546C55F5C1EE8F4F765FC6435C1528B3C0E0675ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4931B544F03EFBC4D5789424AA0EF8DE9BAC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-C8649E89: BD04B25996AC9A04B4415E7D433BF9ED3BAC6DE6ED363FE79A7E026DFB2310D7F58E2B046B77E2479F595CEF8576C34B X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrQ5TCjaABweihqji9ii5Yg== X-Mailru-Sender: 11C2EC085EDE56FA9C10FA2967F5AB240411899A8ABAD9E8CA1EAFED73DB490E9C7FB82486FB5843EE9242D420CFEBFD3DDE9B364B0DF2891A624F84B2C74EDA4239CF2AF0A6D4F80DA7A0AF5A3A8387 X-Mras: Ok X-7564579A: B8F34718100C35BD X-77F55803: 6242723A09DB00B4A353DFAE02CC96B25977329EBD85C2EA538A8385CC830FB5049FFFDB7839CE9E5FC821986FA366902CD0CA18092F1EF4A3F1EAB277F1C04D3AD324F9CFC7A31F X-7FA49CB5: 0D63561A33F958A58C9AD5C60AA3526806C0F3DB1A53DE4B9E15CA83797FD0DB8941B15DA834481FA18204E546F3947CA7DFDF579AB090EFF6B57BC7E64490618DEB871D839B7333395957E7521B51C2545D4CF71C94A83E9FA2833FD35BB23D27C277FBC8AE2E8BAE9A1BBD95851C5BA471835C12D1D977C4224003CC8364760DD3EA8D24872D7CD81D268191BDAD3DC09775C1D3CA48CF68F7E3CFCDA853A2BA3038C0950A5D36C8A9BA7A39EFB7668729DE7A884B61D135872C767BF85DA29E625A9149C048EE1B544F03EFBC4D5789424AA0EF8DE9BA4AD6D5ED66289B524E70A05D1297E1BB35872C767BF85DA227C277FBC8AE2E8B6435C1528B3C0E0675ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57285124B2A10EEC6C00306258E7E6ABB4E4A6367B16DE6309 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrQ5TCjaABwe5+5OkK0rL/A== X-Mailru-MI: 800 X-Mailru-Sender: A5480F10D64C9005E7955441BDF8626571F3678BCFFF493E46394D292F25EE7C21E1F2CAECBC0E24C099ADC76E806A99D50E20E2BC48EF5A30D242760C51EA9CEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: [Buildroot] [PATCH v2 1/1] package/htop: add patch for fixing build with gcc 10 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxim Kochetkov , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Maxim Kochetkov Reviewed-by: Thomas Petazzoni --- package/htop/gcc-10.patch | 170 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 package/htop/gcc-10.patch diff --git a/package/htop/gcc-10.patch b/package/htop/gcc-10.patch new file mode 100644 index 0000000000..1e2ecebb29 --- /dev/null +++ b/package/htop/gcc-10.patch @@ -0,0 +1,170 @@ +From dfd9279f87791e36a5212726781c31fbe7110361 Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Fri, 10 Jul 2020 10:35:32 +1000 +Subject: [PATCH] Resolve complation issues with -fno-common (default from + gcc-10) + +Extends the MakeHeader script to auto-generate correct "extern" +function declarations in some cases that it currently does not. + +Related to https://github.com/hishamhm/htop/pull/981 +--- + CRT.c | 4 ++-- + CRT.h | 28 ++++++++++++++-------------- + linux/LinuxProcess.c | 3 ++- + linux/LinuxProcess.h | 19 ++++++++++--------- + scripts/MakeHeader.py | 4 +++- + 5 files changed, 31 insertions(+), 27 deletions(-) + +diff --git a/CRT.c b/CRT.c +index ca9a10dd..088cd1a4 100644 +--- a/CRT.c ++++ b/CRT.c +@@ -131,9 +131,9 @@ typedef enum ColorElements_ { + LAST_COLORELEMENT + } ColorElements; + +-void CRT_fatalError(const char* note) __attribute__ ((noreturn)); ++extern void CRT_fatalError(const char* note) __attribute__ ((noreturn)); + +-void CRT_handleSIGSEGV(int sgn); ++extern void CRT_handleSIGSEGV(int sgn); + + #define KEY_ALT(x) (KEY_F(64 - 26) + (x - 'A')) + +diff --git a/CRT.h b/CRT.h +index 933fe068..bc3fb8b7 100644 +--- a/CRT.h ++++ b/CRT.h +@@ -119,9 +119,9 @@ typedef enum ColorElements_ { + LAST_COLORELEMENT + } ColorElements; + +-void CRT_fatalError(const char* note) __attribute__ ((noreturn)); ++extern void CRT_fatalError(const char* note) __attribute__ ((noreturn)); + +-void CRT_handleSIGSEGV(int sgn); ++extern void CRT_handleSIGSEGV(int sgn); + + #define KEY_ALT(x) (KEY_F(64 - 26) + (x - 'A')) + +@@ -140,7 +140,7 @@ extern const char **CRT_treeStr; + + extern int CRT_delay; + +-int* CRT_colors; ++extern int* CRT_colors; + + extern int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT]; + +@@ -150,21 +150,21 @@ extern int CRT_scrollHAmount; + + extern int CRT_scrollWheelVAmount; + +-char* CRT_termType; ++extern char* CRT_termType; + + // TODO move color scheme to Settings, perhaps? + + extern int CRT_colorScheme; + +-void *backtraceArray[128]; ++extern void *backtraceArray[128]; + + #if HAVE_SETUID_ENABLED + + #define DIE(msg) do { CRT_done(); fprintf(stderr, msg); exit(1); } while(0) + +-void CRT_dropPrivileges(); ++extern void CRT_dropPrivileges(); + +-void CRT_restorePrivileges(); ++extern void CRT_restorePrivileges(); + + #else + +@@ -179,18 +179,18 @@ void CRT_restorePrivileges(); + + // TODO: pass an instance of Settings instead. + +-void CRT_init(int delay, int colorScheme); ++extern void CRT_init(int delay, int colorScheme); + +-void CRT_done(); ++extern void CRT_done(); + +-void CRT_fatalError(const char* note); ++extern void CRT_fatalError(const char* note); + +-int CRT_readKey(); ++extern int CRT_readKey(); + +-void CRT_disableDelay(); ++extern void CRT_disableDelay(); + +-void CRT_enableDelay(); ++extern void CRT_enableDelay(); + +-void CRT_setColors(int colorScheme); ++extern void CRT_setColors(int colorScheme); + + #endif + +diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h +index 6ce3037d..586aa717 100644 +--- a/linux/LinuxProcess.h ++++ b/linux/LinuxProcess.h +@@ -152,9 +153,9 @@ extern ProcessPidColumn Process_pidColumns[]; + + extern ProcessClass LinuxProcess_class; + +-LinuxProcess* LinuxProcess_new(Settings* settings); ++extern LinuxProcess* LinuxProcess_new(Settings* settings); + +-void Process_delete(Object* cast); ++extern void Process_delete(Object* cast); + + /* + [1] Note that before kernel 2.6.26 a process that has not asked for +@@ -166,19 +167,19 @@ extern io_priority; + */ + #define LinuxProcess_effectiveIOPriority(p_) (IOPriority_class(p_->ioPriority) == IOPRIO_CLASS_NONE ? IOPriority_tuple(IOPRIO_CLASS_BE, (p_->super.nice + 20) / 5) : p_->ioPriority) + +-IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this); ++extern IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this); + +-bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio); ++extern bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio); + + #ifdef HAVE_DELAYACCT +-void LinuxProcess_printDelay(float delay_percent, char* buffer, int n); ++extern void LinuxProcess_printDelay(float delay_percent, char* buffer, int n); + #endif + +-void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field); ++extern void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field); + +-long LinuxProcess_compare(const void* v1, const void* v2); ++extern long LinuxProcess_compare(const void* v1, const void* v2); + +-bool Process_isThread(Process* this); ++extern bool Process_isThread(Process* this); + + + #endif +diff --git a/scripts/MakeHeader.py b/scripts/MakeHeader.py +index 349531b8..3ef34b88 100755 +--- a/scripts/MakeHeader.py ++++ b/scripts/MakeHeader.py +@@ -54,8 +54,10 @@ + elif line.startswith("typedef struct"): + state = SKIP + elif line[-1] == "{": +- out.write( line[:-2].replace("inline", "extern") + ";\n" ) ++ out.write("extern " + line[:-2].replace("inline ", "") + ";\n") + state = SKIP ++ elif line[-1] == ";": ++ out.write("extern " + line + "\n") + else: + out.write( line + "\n") + is_blank = False