]> git.proxmox.com Git - mirror_frr.git/commitdiff
build: Remove the old PIC/PIE patch, let libtool sort it out
authorPaul Jakma <paul@jakma.org>
Thu, 20 Aug 2015 20:30:17 +0000 (21:30 +0100)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:35 +0000 (20:38 -0400)
* 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.

12 files changed:
bgpd/Makefile.am
configure.ac
isisd/Makefile.am
ospf6d/Makefile.am
ospfclient/Makefile.am
pimd/Makefile.am
ripd/Makefile.am
ripngd/Makefile.am
tests/Makefile.am
vtysh/Makefile.am
watchquagga/Makefile.am
zebra/Makefile.am

index 227aa8c6c2a4446a381375f25a0ffb04d68fe551..162c2adcdd5a827843740a8e683c0befcf53807e 100644 (file)
@@ -4,8 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 noinst_LIBRARIES = libbgp.a
 sbin_PROGRAMS = bgpd
index f9922f0cf9098866cbc8a2d280e15b8db0295862..12d5de869ee5758864328cf5b19422df2514c793 100755 (executable)
@@ -203,7 +203,7 @@ AC_GNU_SOURCE
 dnl -------
 dnl libtool
 dnl -------
-AC_PROG_LIBTOOL
+LT_INIT
 
 dnl ----------------------
 dnl Packages configuration
@@ -1669,29 +1669,6 @@ dnl ----------
 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 -------
index 5ec0811b6c434cfd98bf450b726c809e2500e65f..dcb54d59709ba8ebf64a8cfa07826c2c0c549292 100644 (file)
@@ -6,8 +6,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 LIBS = @LIBS@ 
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 noinst_LIBRARIES = libisis.a
 sbin_PROGRAMS = isisd 
index 12d9864ab8eaa716165ba72d668272f0cdd8e414..84f433171b5385aea6fc9046aa090eb86ec48556 100644 (file)
@@ -4,8 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 noinst_LIBRARIES = libospf6.a
 sbin_PROGRAMS = ospf6d
index ae43816f64173ee348e01123496d7125b6764917..aa156373d18befc719b18083f62339c86ce1d743 100644 (file)
@@ -22,6 +22,5 @@ ospfclient_SOURCES = \
 ospfclient_LDADD = libospfapiclient.la \
        ../ospfd/libospf.la ../lib/libzebra.la @LIBCAP@
 
-ospfclient_CFLAGS = $(AM_CFLAGS) $(PICFLAGS)
-ospfclient_LDFLAGS = $(AM_LDFLAGS) $(PILDFLAGS)
-
+ospfclient_CFLAGS = $(AM_CFLAGS)
+ospfclient_LDFLAGS = $(AM_LDFLAGS)
index 4477f024e3331c868e010f04361f1f2da8655c69..e4243e1f6ae0b3e95fa242cd50a5a566d2f26e82 100644 (file)
@@ -39,8 +39,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" $(PIM_DEFS)
 INSTALL_SDATA=@INSTALL@ -m 600
 LIBS = @LIBS@
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 noinst_LIBRARIES = libpim.a
 sbin_PROGRAMS = pimd 
index c07f665efb6faeeb84f5e7d0d182b9dfb3050b09..da9b2e3afc188bb6e56c778b6211ae9a5fe4f807 100644 (file)
@@ -4,8 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 noinst_LIBRARIES = librip.a
 sbin_PROGRAMS = ripd
index 7e4c1004f259a973a9e4b573299c87a3c1ec26eb..d5736ee5268169907f93cd467f9f508977b55735 100644 (file)
@@ -4,8 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 noinst_LIBRARIES = libripng.a
 sbin_PROGRAMS = ripngd
index 8a086d0b6fba39d3f8edcd44775267cb15af7329..7e9ebd0608057b4faf3401354294cc223ace093e 100644 (file)
@@ -16,9 +16,6 @@ EXTRA_DIST = \
 INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
 DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
 
-AM_CFLAGS = $(PICFLAGS)
-AM_LDFLAGS = $(PILDFLAGS)
-
 if BGPD
 TESTS_BGPD = aspathtest testbgpcap ecommtest testbgpmpattr testbgpmpath
 DEJATOOL += bgpd
index 935d2c2bdb927c79835607c19ce70de6a34231eb..eaf19a28c40dbed4efcad30a8eb88fbf1fd513d3 100644 (file)
@@ -5,8 +5,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 
 LIBS = @LIBS@ @CURSES@ @LIBPAM@
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 bin_PROGRAMS = vtysh
 
index 5842f99ef9f9d365a560056f0869be59663a1c90..3f7d8954fac877fd0eca32f982e97db28e96d243 100644 (file)
@@ -3,8 +3,7 @@
 INCLUDES = @INCLUDES@ -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
 DEFS = @DEFS@ -DSTATEDIR=\"$(localstatedir)/\"
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 sbin_PROGRAMS = watchquagga
 
index d0308d8cf9a32ad89903fab5e6ab965e99c6c4da..45648bdf3bdda51d32fff8db9062c9b3a1a99f20 100644 (file)
@@ -23,8 +23,7 @@ if HAVE_NETLINK
 othersrc = zebra_fpm_netlink.c
 endif
 
-AM_CFLAGS = $(PICFLAGS) $(WERROR)
-AM_LDFLAGS = $(PILDFLAGS)
+AM_CFLAGS = $(WERROR)
 
 sbin_PROGRAMS = zebra