summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Jakma <paul@jakma.org>2015-08-20 22:30:17 +0200
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-05-26 02:38:35 +0200
commit95bb83054bbf6b5f4fcc7e7ce961d63d74212f9f (patch)
treed2517bf85a1376d441a63d15a572573721b8615a
parentpimd: Clean up some more compile warnings (diff)
downloadfrr-95bb83054bbf6b5f4fcc7e7ce961d63d74212f9f.tar.xz
frr-95bb83054bbf6b5f4fcc7e7ce961d63d74212f9f.zip
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.
-rw-r--r--bgpd/Makefile.am3
-rwxr-xr-xconfigure.ac25
-rw-r--r--isisd/Makefile.am3
-rw-r--r--ospf6d/Makefile.am3
-rw-r--r--ospfclient/Makefile.am5
-rw-r--r--pimd/Makefile.am3
-rw-r--r--ripd/Makefile.am3
-rw-r--r--ripngd/Makefile.am3
-rw-r--r--tests/Makefile.am3
-rw-r--r--vtysh/Makefile.am3
-rw-r--r--watchquagga/Makefile.am3
-rw-r--r--zebra/Makefile.am3
12 files changed, 12 insertions, 48 deletions
diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am
index 227aa8c6c..162c2adcd 100644
--- a/bgpd/Makefile.am
+++ b/bgpd/Makefile.am
@@ -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
diff --git a/configure.ac b/configure.ac
index f9922f0cf..12d5de869 100755
--- a/configure.ac
+++ b/configure.ac
@@ -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 -------
diff --git a/isisd/Makefile.am b/isisd/Makefile.am
index 5ec0811b6..dcb54d597 100644
--- a/isisd/Makefile.am
+++ b/isisd/Makefile.am
@@ -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
diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am
index 12d9864ab..84f433171 100644
--- a/ospf6d/Makefile.am
+++ b/ospf6d/Makefile.am
@@ -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
diff --git a/ospfclient/Makefile.am b/ospfclient/Makefile.am
index ae43816f6..aa156373d 100644
--- a/ospfclient/Makefile.am
+++ b/ospfclient/Makefile.am
@@ -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)
diff --git a/pimd/Makefile.am b/pimd/Makefile.am
index 4477f024e..e4243e1f6 100644
--- a/pimd/Makefile.am
+++ b/pimd/Makefile.am
@@ -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
diff --git a/ripd/Makefile.am b/ripd/Makefile.am
index c07f665ef..da9b2e3af 100644
--- a/ripd/Makefile.am
+++ b/ripd/Makefile.am
@@ -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
diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am
index 7e4c1004f..d5736ee52 100644
--- a/ripngd/Makefile.am
+++ b/ripngd/Makefile.am
@@ -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
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8a086d0b6..7e9ebd060 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am
index 935d2c2bd..eaf19a28c 100644
--- a/vtysh/Makefile.am
+++ b/vtysh/Makefile.am
@@ -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
diff --git a/watchquagga/Makefile.am b/watchquagga/Makefile.am
index 5842f99ef..3f7d8954f 100644
--- a/watchquagga/Makefile.am
+++ b/watchquagga/Makefile.am
@@ -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
diff --git a/zebra/Makefile.am b/zebra/Makefile.am
index d0308d8cf..45648bdf3 100644
--- a/zebra/Makefile.am
+++ b/zebra/Makefile.am
@@ -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