From 654a6d765e52e988765b587aad6d0d7cdc8b7867 Mon Sep 17 00:00:00 2001 From: BtbN Date: Fri, 14 May 2021 22:06:51 +0200 Subject: [PATCH] Build entire toolchain as PIC for proper static linking --- build.sh | 4 +++- images/base-linux64/Dockerfile | 2 -- images/base-linux64/ct-ng-config | 24 +++++++++++------------- scripts.d/99-rpath.sh | 7 +++++-- util/vars.sh | 8 ++++++++ 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index ae899da..900a8c4 100755 --- a/build.sh +++ b/build.sh @@ -29,6 +29,7 @@ for script in scripts.d/**/*.sh; do FF_CFLAGS+=" $(get_output $script cflags)" FF_CXXFLAGS+=" $(get_output $script cxxflags)" FF_LDFLAGS+=" $(get_output $script ldflags)" + FF_LDEXEFLAGS+=" $(get_output $script ldexeflags)" FF_LIBS+=" $(get_output $script libs)" done @@ -36,6 +37,7 @@ FF_CONFIGURE="$(xargs <<< "$FF_CONFIGURE")" FF_CFLAGS="$(xargs <<< "$FF_CFLAGS")" FF_CXXFLAGS="$(xargs <<< "$FF_CXXFLAGS")" FF_LDFLAGS="$(xargs <<< "$FF_LDFLAGS")" +FF_LDEXEFLAGS="$(xargs <<< "$FF_LDEXEFLAGS")" FF_LIBS="$(xargs <<< "$FF_LIBS")" TESTFILE="uidtestfile" @@ -57,7 +59,7 @@ docker run --rm -i "${UIDARGS[@]}" -v $PWD/ffbuild:/ffbuild "$IMAGE" bash -s <