diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-02-24 20:52:45 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-02-24 20:52:45 +0000 |
commit | f01bb649f33d9005e30ec2e82fef05f25b9a8dff (patch) | |
tree | 4b5c044630102ea6f295eac9d4bbcb6d9ac61a59 /configure | |
parent | 393fe484088b8e44764f79153d4ab806a763a526 (diff) | |
download | s6-rc-f01bb649f33d9005e30ec2e82fef05f25b9a8dff.tar.gz s6-rc-f01bb649f33d9005e30ec2e82fef05f25b9a8dff.tar.xz s6-rc-f01bb649f33d9005e30ec2e82fef05f25b9a8dff.zip |
Build everything as PIC by default
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/configure b/configure index e3ff39e..cd2cb5b 100755 --- a/configure +++ b/configure @@ -41,7 +41,7 @@ Optional features: --disable-static do not build static libraries [enabled] --disable-allstatic do not prefer linking against static libraries [enabled] --enable-static-libc make entirely static binaries [disabled] - --enable-all-pic build everything as PIC [enabled iff toolchain builds PIE] + --disable-all-pic do not build executables or static libs as PIC [enabled] --enable-slashpackage[=ROOT] assume /package installation at ROOT [disabled] --enable-absolute-paths do not rely on PATH to access this package's binaries, hardcode absolute BINDIR/foobar paths instead [disabled] @@ -145,7 +145,7 @@ sysdeps='$prefix/lib/skalibs/sysdeps' manualsysdeps=false shared=false static=true -allpic=detect +allpic=true slashpackage=false abspath=false sproot= @@ -306,20 +306,6 @@ if [ "x$target" != "x$(cat $sysdeps/target)" ] ; then exit 1 fi -if test $allpic = detect ; then - echo "Checking whether we need to build everything as PIC..." - if $CC_AUTO $CPPFLAGS_AUTO $CPPFLAGS $CPPFLAGS_POST $CFLAGS_AUTO $CFLAGS $CFLAGS_POST -dM -E - < /dev/null | grep -qF __PIE__ ; then - allpic=true - echo " ... yes" - else - allpic=false - echo " ... no" - fi -fi -if $allpic ; then - tryflag CFLAGS_AUTO -fPIC -fi - spawn_lib=$(cat $sysdeps/spawn.lib) socket_lib=$(cat $sysdeps/socket.lib) sysclock_lib=$(cat $sysdeps/sysclock.lib) @@ -327,6 +313,9 @@ tainnow_lib=$(cat $sysdeps/tainnow.lib) timer_lib=$(cat $sysdeps/timer.lib) util_lib=$(cat $sysdeps/util.lib) +if $allpic ; then + tryflag CPPFLAGS_AUTO -fPIC +fi tryflag CFLAGS_AUTO -std=c99 tryflag CFLAGS -fomit-frame-pointer tryflag CFLAGS_AUTO -fno-exceptions |