aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-05-01 08:33:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-05-01 08:34:08 -0700
commite81d5d059b485b37a6f8cfb44e563ad8b702df07 (patch)
treee6b4cf55657cb6627e7dcf1d4ce28209a9d7794c /configure.ac
parent00923338dec84505addaf9cdeca2e9c844757824 (diff)
downloadfsf-binutils-gdb-e81d5d059b485b37a6f8cfb44e563ad8b702df07.zip
fsf-binutils-gdb-e81d5d059b485b37a6f8cfb44e563ad8b702df07.tar.gz
fsf-binutils-gdb-e81d5d059b485b37a6f8cfb44e563ad8b702df07.tar.bz2
Configure zlib with --enable-host-shared for shared bfd
When bfd is configured as a shared library, we need to configure zlib with --enable-host-shared since zlib is used by bfd. PR ld/18355 * Makefile.def: Add extra_configure_flags to host zlib. * configure.ac (extra_host_zlib_configure_flags): New. Set to --enable-host-shared When bfd is to be built as shared library. AC_SUBST. * Makefile.in: Regenerated. * configure: Likewise.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ef5f5b1..a81d781 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2276,14 +2276,23 @@ fi
# Sometimes we have special requirements for the host libiberty.
extra_host_libiberty_configure_flags=
+extra_host_zlib_configure_flags=
case " $configdirs " in
*" lto-plugin "* | *" libcc1 "*)
# When these are to be built as shared libraries, the same applies to
# libiberty.
extra_host_libiberty_configure_flags=--enable-shared
;;
+ *" bfd "*)
+ # When bfd is to be built as a shared library, the same applies to
+ # zlib.
+ if test "$enable_shared" = "yes"; then
+ extra_host_zlib_configure_flags=--enable-host-shared
+ fi
+ ;;
esac
AC_SUBST(extra_host_libiberty_configure_flags)
+AC_SUBST(extra_host_zlib_configure_flags)
# Produce a warning message for the subdirs we can't configure.
# This isn't especially interesting in the Cygnus tree, but in the individual