commit 6c65c3dd94ce2e6a054d9358795ba1f17de03cad
parent f16d25a7c6bb9c0645ce31d15f6564577197af45
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date: Sun, 24 Feb 2019 22:00:13 +0000
Build everything as PIC by default
Diffstat:
3 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/NEWS b/NEWS
@@ -12,6 +12,7 @@ uid/self key if the client and the server have the same uid, and the
gid/self key if the client and the server have the same gid. That means
s6-ipcserver-access can now be configured to allow/deny/specialcase
connections where the client's credentials are the same as the server's.
+ - Everything builds as PIC by default.
In 2.7.2.2
diff --git 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 don't 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
@@ -21,14 +21,19 @@
<h2> in 2.8.0.0 </h2>
<ul>
- <li> skalibs dependency bumped to 2.8.0.0. </li>
- <li> execline dependency bumped to 2.5.1.0. </li>
+ <li> <a href="//skarnet.org/software/skalibs/"></a>skalibs</a>
+dependency bumped to 2.8.0.0. </li>
+ <li> <a href="//skarnet.org/software/execline/">execline</a>
+dependency bumped to 2.5.1.0. </li>
<li> New <tt>-d <em>notif</em></tt> option to <a href="s6-log.html">s6-log</a>. </li>
<li> New default for the <tt>-l <em>linelimit</em></tt> option to <a href="s6-log.html">s6-log</a>:
8192 bytes. </li>
<li> In the <a href="libs6/accessrules.html">accessrules</a> library, checking against uid/gid
now checks the <tt>uid/self</tt> key if the client and the server have the same uid, and
the <tt>gid/self</tt> key if the client and the server have the same gid. </li>
+ <li> Everything now builds as PIC by default no matter
+the toolchain's settings. Use the <tt>--disable-all-pic</tt> configure
+option to build executables and static libraries as non-PIC. </li>
</ul>
<h2> in 2.7.2.2 </h2>