From 2ca90a4b7a7967645fe097823e7df58c8055c03f Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 24 Feb 2019 22:09:30 +0000 Subject: Build everything as PIC by default --- .gitignore | 11 +++++++++++ COPYING | 2 +- NEWS | 2 ++ configure | 21 +++++---------------- doc/upgrade.html | 6 +++++- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 4eb41d4..bb472fe 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,14 @@ *.so.* /config.mak /src/include/s6-linux-utils/config.h +/s6-chroot +/s6-fillurandompool +/s6-freeramdisk +/s6-hostname +/s6-logwatch +/s6-mount +/s6-pivotchroot +/s6-ps +/s6-swapoff +/s6-swapon +/s6-umount diff --git a/COPYING b/COPYING index 1629e84..f019bc7 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2011-2018 Laurent Bercot +Copyright (c) 2011-2019 Laurent Bercot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/NEWS b/NEWS index 0a63228..472e4f2 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ In 2.5.0.1 ---------- - Build fix for clang. + - Adaptation to skalibs-2.8.0.0. + - Everything now builds as PIC by default. In 2.5.0.0 diff --git a/configure b/configure index c147abb..ae5309d 100755 --- a/configure +++ b/configure @@ -40,7 +40,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] @@ -144,7 +144,7 @@ sysdeps='$prefix/lib/skalibs/sysdeps' manualsysdeps=false shared=false static=true -allpic=detect +allpic=true slashpackage=false abspath=false usensss=false @@ -307,20 +307,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) @@ -328,6 +314,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 diff --git a/doc/upgrade.html b/doc/upgrade.html index cd0a5d3..68ee109 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -21,7 +21,11 @@

in 2.5.0.1

    -
  • skalibs dependency bumped to 2.8.0.0.
  • +
  • skalibs +dependency bumped to 2.8.0.0.
  • +
  • Everything now builds as PIC by default no matter +the toolchain's settings. Use the --disable-all-pic configure +option to build executables and static libraries as non-PIC.

in 2.5.0.0

-- cgit v1.2.3