summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xconfigure21
-rw-r--r--doc/upgrade.html3
3 files changed, 9 insertions, 16 deletions
diff --git a/NEWS b/NEWS
index 84759a1..9f3e715 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ In 0.5.0.0
- Bugfixes.
- s6-rc-compile doesn't support -u and -g anymore; the user who
can run s6-rc on a database is the user who owns the supervision tree.
+ - Everything builds as PIC by default.
In 0.4.1.0
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
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 120e1e3..5427317 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -42,6 +42,9 @@ dependency bumped to 2.8.0.0. </li>
<li> <a href="s6-rc-compile.html">s6-rc-compile</a> does not support the <tt>-u</tt>
or <tt>-g</tt> options anymore; instead, at any time, the user who can operate
a s6-rc database is the user who owns the supervision tree. </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 0.4.1.0 </h2>