Browse Source

gcc: fixed to not inject -rpath when cross-compiling

Resulting binaries like libstdc++.so will end up having an rpath with an
absolute path to the build sandbox set in the elf headers.
This issue was discovered when trying to run a cross-compiled lftp which
was cross-compiled against musl libc and segfaulted when being executed.
Removing the explicit rpath seems to solve the runtime issue because lftp
is not segfaulting anymore and works as expected.
stable/0.6
Christian Wiese 11 years ago
parent
commit
dfcaea8792
  1. 4
      base/gcc/gcc.conf

4
base/gcc/gcc.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../gcc/gcc.conf
# Copyright (C) 2006 - 2013 The OpenSDE Project
# Copyright (C) 2006 - 2014 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
@ -192,8 +192,6 @@ if atstage cross; then
# for gcc versions 4.3 and upwards we have to explicitely specifiy the
# target architecture at cross-compiling stage
var_append confopt ' ' '--target=$arch_target'
# some configure tests of gcc > 4.3 need some help for linking
var_append GCC_WRAPPER_APPEND ' ' "-Wl,-rpath,${root}/lib"
fi
if ! atstage native; then

Loading…
Cancel
Save