summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhsk17 <hsk17@mail.de>2019-03-06 13:23:03 +0100
committerFabian Groffen <grobian@gentoo.org>2019-03-06 13:23:03 +0100
commitb81cd60acf8b5b8465c4849719259321b99e6467 (patch)
tree110909b72794e5b9c63e3da1e86e734e5c97b7bd
parentscripts/bootstrap-prefix: bump bootstrap snapshot (diff)
downloadprefix-b81cd60acf8b5b8465c4849719259321b99e6467.tar.gz
prefix-b81cd60acf8b5b8465c4849719259321b99e6467.tar.bz2
prefix-b81cd60acf8b5b8465c4849719259321b99e6467.zip
scripts/bootstrap-prefix: unify libffi behaviour in bootstrap_gnu
due to commit 94a0ab4f, which adds -L${ROOT}/tmp/usr/lib64 to LDFLAGS in bootstrap_python(), the python bootstrap build sees libffi.so and succeeds. but there is no -Wl,-rpath,${ROOT}/tmp/usr/lib64, and the built _ctypes.so is unusable as the run time loader does not find libffi. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-xscripts/bootstrap-prefix.sh32
1 files changed, 17 insertions, 15 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 1998896349..70863e2396 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -813,20 +813,22 @@ bootstrap_gnu() {
# SuSE 11.1 has GNU binutils-2.20, choking on crc32_x86
[[ ${PN} == "xz" ]] && myconf="${myconf} --disable-assembler"
- # we do not have pkg-config to find lib/libffi-*/include/ffi.h
- [[ ${PN} == "libffi" ]] &&
- sed -i -e '/includesdir =/s/=.*/= $(includedir)/' include/Makefile.in
-
- # we have to build the libraries for correct bitwidth
- [[ " libffi " == *" ${PN} "* ]] &&
- case $CHOST in
- (x86_64-*-*|sparcv9-*-*)
- export CFLAGS="-m64"
- ;;
- (i?86-*-*)
- export CFLAGS="-m32"
- ;;
- esac
+ if [[ ${PN} == "libffi" ]] ; then
+ # we do not have pkg-config to find lib/libffi-*/include/ffi.h
+ sed -i -e '/includesdir =/s/=.*/= $(includedir)/' include/Makefile.in
+ # force install into libdir
+ myconf="${myconf} --libdir=${ROOT}/tmp/usr/lib"
+ sed -i -e '/toolexeclibdir =/s/=.*/= $(libdir)/' Makefile.in
+ # we have to build the libraries for correct bitwidth
+ case $CHOST in
+ (x86_64-*-*|sparcv9-*-*)
+ export CFLAGS="-m64"
+ ;;
+ (i?86-*-*)
+ export CFLAGS="-m32"
+ ;;
+ esac
+ fi
einfo "Compiling ${PN}"
econf ${myconf} || return 1
@@ -979,7 +981,7 @@ EOP
# python refuses to find the zlib headers that are built in the offset,
# same for libffi, which installs into compiler's multilib-osdir
export CPPFLAGS="-I${ROOT}/tmp/usr/include"
- export LDFLAGS="${CFLAGS} -L${ROOT}/tmp/usr/lib -L${ROOT}/tmp/usr/lib64"
+ export LDFLAGS="${CFLAGS} -L${ROOT}/tmp/usr/lib"
# set correct flags for runtime for ELF platforms
case $CHOST in
*-linux*)