From patchwork Wed Jan 24 04:09:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 865166 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zRBXq54Pmz9s7n for ; Wed, 24 Jan 2018 15:10:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BA43484FCC; Wed, 24 Jan 2018 04:10:33 +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 8AFl9VkrdLkB; Wed, 24 Jan 2018 04:10:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id CF74783617; Wed, 24 Jan 2018 04:10:32 +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 114E81CF036 for ; Wed, 24 Jan 2018 04:09:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0D5C98758E for ; Wed, 24 Jan 2018 04:09:59 +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 s7IvqYGZyBWX for ; Wed, 24 Jan 2018 04:09:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from da1vs02.rockwellcollins.com (da1vs02.rockwellcollins.com [205.175.227.29]) by hemlock.osuosl.org (Postfix) with ESMTPS id 331F48757D for ; Wed, 24 Jan 2018 04:09:56 +0000 (UTC) Received: from ofwda1n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.227.14]) by da1vs02.rockwellcollins.com with ESMTP; 23 Jan 2018 22:09:56 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id 9C72220070; Tue, 23 Jan 2018 22:09:55 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Tue, 23 Jan 2018 22:09:51 -0600 Message-Id: <1516766992-48428-12-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516766992-48428-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1516766992-48428-1-git-send-email-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v4 12/13] readline: correct linker flag sequence 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: https://www.mail-archive.com/bug-readline@gnu.org/msg01114.html Signed-off-by: Matthew Weber --- Changes v3 -> v4 - New --- ...ine-patch-to-correct-linker-flag-sequence.patch | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 package/readline/0001-readline-patch-to-correct-linker-flag-sequence.patch diff --git a/package/readline/0001-readline-patch-to-correct-linker-flag-sequence.patch b/package/readline/0001-readline-patch-to-correct-linker-flag-sequence.patch new file mode 100644 index 0000000..10383f6 --- /dev/null +++ b/package/readline/0001-readline-patch-to-correct-linker-flag-sequence.patch @@ -0,0 +1,58 @@ +From 25713f017b1501c39f474367b93c7948a1efee0d Mon Sep 17 00:00:00 2001 +From: Yogesh Prasad +Date: Thu, 28 Sep 2017 15:37:43 -0500 +Subject: [PATCH 1/1] readline: 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: + - libhistory.so.7.0 + - libreadline.so.7.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]: *** [libhistory.so.7.0] Error 1 +make[3]: *** Waiting for unfinished jobs.... +mv vi_mode.o vi_mode.so +mv complete.o complete.so +mv bind.o bind.so +mv display.o display.so +make[2]: *** [shared] Error 2 +make[1]: *** [/build/readline-7.0/.stamp_built] Error 2 +make: *** [_all] Error 2 +------------------------------------------------------------------------- + +Signed-off-by: Yogesh Prasad +--- + shlib/Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/shlib/Makefile.in b/shlib/Makefile.in +index f2ec3e4..7c01859 100644 +--- a/shlib/Makefile.in ++++ b/shlib/Makefile.in +@@ -174,11 +174,11 @@ unsupported: + + $(SHARED_READLINE): $(SHARED_OBJ) + $(RM) $@ +- $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_OBJ) $(SHLIB_LIBS) ++ $(SHOBJ_LD) ${SHLIB_XLDFLAGS} ${SHOBJ_LDFLAGS} -o $@ $(SHARED_OBJ) $(SHLIB_LIBS) + + $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so xfree.so + $(RM) $@ +- $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so $(SHLIB_LIBS) ++ $(SHOBJ_LD) ${SHLIB_XLDFLAGS} ${SHOBJ_LDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so $(SHLIB_LIBS) + + # Since tilde.c is shared between readline and bash, make sure we compile + # it with the right flags when it's built as part of readline +-- +1.9.1 +