build: Remove the old PIC/PIE patch, let libtool sort it out
* Remove the old change from '08 to add in PIE arguments at automake level.
Versions of libtool since then know how to deal with -fpie and do the right
thing according to whether its building shared or executable objects.
So just pass '-fpie' as CFLAG and let libtool do its thing.
diff --git a/configure.ac b/configure.ac
index 6e92bd1..6864a29 100755
--- a/configure.ac
+++ b/configure.ac
@@ -144,6 +144,7 @@
AC_C_FLAG([-Os], [
AC_C_FLAG([-O2])
])
+ AC_C_FLAG([-fpie])
AC_C_FLAG([-fno-omit-frame-pointer])
AC_C_FLAG([-Wall])
AC_C_FLAG([-Wextra])
@@ -212,7 +213,7 @@
dnl -------
dnl libtool
dnl -------
-AC_PROG_LIBTOOL
+LT_INIT
dnl ----------------------
dnl Packages configuration
@@ -1465,29 +1466,6 @@
CONFDATE=`date '+%Y%m%d'`
AC_SUBST(CONFDATE)
-dnl Conditionally enable PIE support for GNU toolchains.
-AC_ARG_ENABLE(pie, AS_HELP_STRING([--disable-pie], [Do not build tools as a Position Independent Executables]))
-if test "$enable_pie" != "no"; then
- AC_CACHE_CHECK([whether $CC accepts PIE flags], [ap_cv_cc_pie], [
- save_CFLAGS=$CFLAGS
- save_LDFLAGS=$LDFLAGS
- CFLAGS="$CFLAGS -fPIE"
- LDFLAGS="$LDFLAGS -pie"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[static int foo[30000]; int main () { return 0; }]])],
- [ap_cv_cc_pie=yes], [ap_cv_cc_pie=no]
- )
- CFLAGS=$save_CFLAGS
- LDFLAGS=$save_LDFLAGS
- ])
- if test "$ap_cv_cc_pie" = "yes"; then
- PICFLAGS="-fPIE"
- PILDFLAGS="-pie"
- fi
-fi
-
-AC_SUBST(PICFLAGS)
-AC_SUBST(PILDFLAGS)
-
dnl -------
dnl DejaGNU
dnl -------