All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Weber <matthew.weber@rockwellcollins.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 11/13] tcl: correct linker flag sequence
Date: Tue, 23 Jan 2018 22:09:50 -0600	[thread overview]
Message-ID: <1516766992-48428-11-git-send-email-matthew.weber@rockwellcollins.com> (raw)
In-Reply-To: <1516766992-48428-1-git-send-email-matthew.weber@rockwellcollins.com>

When used together, -pie should be provided to the linker before
-shared.

Upstream: http://core.tcl.tk/tcl/info/eb2c85495faaa9ed

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
--
Changes
v3 -> v4
 - New
---
 ...tcl-patch-to-correct-linker-flag-sequence.patch | 87 ++++++++++++++++++++++
 1 file changed, 87 insertions(+)
 create mode 100644 package/tcl/0002-tcl-patch-to-correct-linker-flag-sequence.patch

diff --git a/package/tcl/0002-tcl-patch-to-correct-linker-flag-sequence.patch b/package/tcl/0002-tcl-patch-to-correct-linker-flag-sequence.patch
new file mode 100644
index 0000000..5f2b6f9
--- /dev/null
+++ b/package/tcl/0002-tcl-patch-to-correct-linker-flag-sequence.patch
@@ -0,0 +1,87 @@
+From 66fd0c72620c9ab17c528b34fb4a2ccf6a82c116 Mon Sep 17 00:00:00 2001
+From: Yogesh Prasad <yogesh.prasad@rockwellcollins.com>
+Date: Thu, 28 Sep 2017 10:38:51 -0500
+Subject: [PATCH 1/1] tcl: 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 below pkgs:
+ - libtcl8.6.so
+ - libitcl4.0.5.so
+ - libtdbc1.0.4.so
+ - libthread2.8.0.so
+
+-------------------------------------------------------------------------
+/host/powerpc-buildroot-linux-gnu/sysroot/usr/lib/Scrt1.o:(.data+0x4):
+ undefined reference to `main'
+collect2: error: ld returned 1 exit status
+make[2]: *** [libtcl8.6.so] Error 1
+-------------------------------------------------------------------------
+
+Signed-off-by: Yogesh Prasad <yogesh.prasad@rockwellcollins.com>
+---
+ pkgs/itcl4.0.5/configure   | 2 +-
+ pkgs/tdbc1.0.4/configure   | 2 +-
+ pkgs/thread2.8.0/configure | 2 +-
+ unix/tcl.m4                | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pkgs/itcl4.0.5/configure b/pkgs/itcl4.0.5/configure
+index 39a994b..8c67865 100755
+--- a/pkgs/itcl4.0.5/configure
++++ b/pkgs/itcl4.0.5/configure
+@@ -7346,7 +7346,7 @@ fi
+ 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ 
+ 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+-	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
++	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+ 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ 	    if test $doRpath = yes; then :
+ 
+diff --git a/pkgs/tdbc1.0.4/configure b/pkgs/tdbc1.0.4/configure
+index 94dfd63..fe7d7b3 100755
+--- a/pkgs/tdbc1.0.4/configure
++++ b/pkgs/tdbc1.0.4/configure
+@@ -7421,7 +7421,7 @@ fi
+ 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ 
+ 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+-	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
++	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+ 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ 	    if test $doRpath = yes; then :
+ 
+diff --git a/pkgs/thread2.8.0/configure b/pkgs/thread2.8.0/configure
+index 2aa66a8..58b5ffd 100755
+--- a/pkgs/thread2.8.0/configure
++++ b/pkgs/thread2.8.0/configure
+@@ -7422,7 +7422,7 @@ fi
+ 	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ 
+ 	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
+-	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
++	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
+ 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ 	    if test $doRpath = yes; then :
+ 
+diff --git a/unix/tcl.m4 b/unix/tcl.m4
+index ec7218e..1c286f8 100644
+--- a/unix/tcl.m4
++++ b/unix/tcl.m4
+@@ -1403,7 +1403,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
+ 	    # get rid of the warnings.
+ 	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+ 
+-	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
++	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
+ 	    DL_OBJS="tclLoadDl.o"
+ 	    DL_LIBS="-ldl"
+ 	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+-- 
+1.9.1
+
-- 
1.9.1

  parent reply	other threads:[~2018-01-24  4:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24  4:09 [Buildroot] [PATCH v4 01/13] stack protector: moved option out of adv menu Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 02/13] security hardening: add RELFO, FORTIFY options Matt Weber
2018-01-28 14:20   ` Peter Korsgaard
2018-02-04 21:56   ` Matthew Weber
2018-04-26 15:55   ` Johan Oudinet
2018-04-27 13:05     ` Matthew Weber
2018-05-02 13:10       ` Matthew Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 03/13] valgrind: correct linker flag seq Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 04/13] ncurses: " Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 05/13] boost: " Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 06/13] busybox: patch to remove -pie from LDFLAGS Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 07/13] libpcap: correct linker flag seq Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 08/13] iptables: " Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 09/13] zlib: correct linker flag sequence Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 10/13] ustr: " Matt Weber
2018-01-24  4:09 ` Matt Weber [this message]
2018-01-24  4:09 ` [Buildroot] [PATCH v4 12/13] readline: " Matt Weber
2018-01-24  4:09 ` [Buildroot] [PATCH v4 13/13] libcap: corrected " Matt Weber
2018-01-28 14:17 ` [Buildroot] [PATCH v4 01/13] stack protector: moved option out of adv menu Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516766992-48428-11-git-send-email-matthew.weber@rockwellcollins.com \
    --to=matthew.weber@rockwellcollins.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.