From 61da214808d289f1521a5bd421e105828229b818 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 24 Feb 2019 21:48:50 +0000 Subject: Build everything as PIC by default --- INSTALL | 2 +- NEWS | 1 + configure | 21 +++++---------------- doc/index.html | 2 +- doc/upgrade.html | 14 +++++++++++--- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/INSTALL b/INSTALL index bc86af3..b14743d 100644 --- a/INSTALL +++ b/INSTALL @@ -9,7 +9,7 @@ Build Instructions - skalibs version 2.8.0.0 or later: http://skarnet.org/software/skalibs/ - execline version 2.5.1.0 or later: http://skarnet.org/software/execline/ - s6 version 2.8.0.0 or later: http://skarnet.org/software/s6/ - - s6-dns version 2.3.0.1 or later: http://skarnet.org/software/s6-dns/ + - s6-dns version 2.3.0.2 or later: http://skarnet.org/software/s6-dns/ - Depending on whether you build the SSL tools, libressl version 2.7.4 or later: http://libressl.org/ or bearssl version 0.6 or later: http://bearssl.org/ diff --git a/NEWS b/NEWS index 7ec6f83..9330ca4 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ In 2.3.0.4 - Compatibility with skalibs-2.8.0.0. - Conforming to the documentation, s6-tcpserver[46]d now prints its local port to stdout when it is ready, as a notification message. + - Everything builds as PIC by default. In 2.3.0.3 diff --git a/configure b/configure index db87900..82c17bc 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] @@ -148,7 +148,7 @@ sysdeps='$prefix/lib/skalibs/sysdeps' manualsysdeps=false shared=false static=true -allpic=detect +allpic=true slashpackage=false abspath=false usensss=false @@ -316,20 +316,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) @@ -337,6 +323,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/index.html b/doc/index.html index 4677690..dca689c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -52,7 +52,7 @@ library.
  • s6 version 2.8.0.0 or later. It's a build-time and run-time requirement.
  • s6-dns version -2.3.0.1 or later. It's a build-time requirement. It's also a run-time +2.3.0.2 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the s6-dns libraries.
  • If you want to build the secure communication tools: diff --git a/doc/upgrade.html b/doc/upgrade.html index 8c13e5f..1dff010 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -21,9 +21,17 @@

    in 2.3.0.4

    in 2.3.0.3

    -- cgit v1.2.3