From patchwork Wed Jan 10 04:15:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 857933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zGbKg7221z9sBZ for ; Wed, 10 Jan 2018 15:16:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 18EFD89703; Wed, 10 Jan 2018 04:16:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tctCcmHoeTrR; Wed, 10 Jan 2018 04:16:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id E6FB08963F; Wed, 10 Jan 2018 04:16:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9B6E91C4111 for ; Wed, 10 Jan 2018 04:15:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 983D330213 for ; Wed, 10 Jan 2018 04:15:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t+7XeR2wCI3x for ; Wed, 10 Jan 2018 04:15:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ch3vs02.rockwellcollins.com (smtpimr.rockwellcollins.com [205.175.226.29]) by silver.osuosl.org (Postfix) with ESMTPS id 9DD8630239 for ; Wed, 10 Jan 2018 04:15:53 +0000 (UTC) Received: from ofwch3n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.226.14]) by ch3vs02.rockwellcollins.com with ESMTP; 09 Jan 2018 22:15:52 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 1FBF26000B; Tue, 9 Jan 2018 22:15:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Tue, 9 Jan 2018 22:15:35 -0600 Message-Id: <1515557739-6027-4-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515557739-6027-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1515557739-6027-1-git-send-email-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v3 4/8] ncurses: correct linker flag seq X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch will correct the sequence of -pie and -shared options. When used together, -pie should be provided to the linker before -shared. Upstream: http://lists.gnu.org/archive/html/bug-ncurses/2017-11/msg00024.html Signed-off-by: Matthew Weber --- ...ses-patch-to-correct-linker-flag-sequence.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 package/ncurses/0003-ncurses-patch-to-correct-linker-flag-sequence.patch diff --git a/package/ncurses/0003-ncurses-patch-to-correct-linker-flag-sequence.patch b/package/ncurses/0003-ncurses-patch-to-correct-linker-flag-sequence.patch new file mode 100644 index 0000000..34c1bbd --- /dev/null +++ b/package/ncurses/0003-ncurses-patch-to-correct-linker-flag-sequence.patch @@ -0,0 +1,61 @@ +From bca0dfabe9a4fa21d5b3b8bed8c138822188564f Mon Sep 17 00:00:00 2001 +From: Yogesh Prasad +Date: Fri, 29 Sep 2017 11:02:32 -0500 +Subject: [PATCH 1/1] ncurses: patch to correct linker flag sequence + +Description + This patch will correct the sequence of -pie and -shared options. + When used together, -pie should be provided to the linker before + -shared. If -pie is provided after -shared, the linker throws an + error shown below as example. + +The patch fixes Makefile.am for below libs within setools: + - libncurses.so.6.0 +------------------------------------------------------------------------- +/host/powerpc-buildroot-linux-gnu/sysroot/usr/lib/Scrt1.o:(.data+0x4): + undefined reference to `main' +/host/lib/gcc/powerpc-buildroot-linux-gnu/6.4.0/../../../.. +/powerpc-buildroot-linux-gnu/bin/ld: BFD (GNU Binutils) 2.28.1 + assertion fail elf32-ppc.c:8923 +collect2: error: ld returned 1 exit status +make[3]: *** [../lib/libncurses.so.6.0] Error 1 +make[2]: *** [all] Error 2 +make[1]: *** [/build/ncurses-6.0/.stamp_built] Error 2 +make: *** [_all] Error 2 +------------------------------------------------------------------------- + +Signed-off-by: Yogesh Prasad +--- + configure | 2 +- + mk-1st.awk | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 29c61bd..aa42c0a 100755 +--- a/configure ++++ b/configure +@@ -6204,7 +6204,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 + cf_cv_shared_soname='`basename $@`' + fi + +- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' ++ MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@' + ;; + (mingw*) + cf_cv_shlib_version=mingw +diff --git a/mk-1st.awk b/mk-1st.awk +index 1b88127..054e9d5 100644 +--- a/mk-1st.awk ++++ b/mk-1st.awk +@@ -170,7 +170,7 @@ function removelinks(directory) { + } + } + function make_shlib(objs, shlib_list) { +- printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(%s) $(LDFLAGS)\n", objs, shlib_list ++ printf "\t$(MK_SHARED_LIB) $(LDFLAGS) -shared $(%s_OBJS) $(%s)\n", objs, shlib_list + } + function sharedlinks(directory) { + if ( ShlibVer != "auto" && ShlibVer != "cygdll" && ShlibVer != "msysdll" && ShlibVer != "mingw" ) { +-- +1.9.1 +