Remove --with-zlib from ld
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 31 Mar 2015 10:58:15 +0000 (03:58 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 31 Mar 2015 10:59:04 +0000 (03:59 -0700)
This patch removes --with-zlib from ld.

ld/

* configure.ac (AM_ZLIB): Removed.
* Makefile.in: Regenerated.
* config.in: Likewise.
* configure: Likewise.

ld/testsuite/

* ld-bootstrap/bootstrap.exp (extralibs): Add -lz.

ld/ChangeLog
ld/Makefile.in
ld/config.in
ld/configure
ld/configure.ac
ld/testsuite/ChangeLog
ld/testsuite/ld-bootstrap/bootstrap.exp

index 3a5edf28902d6efc766ad2088a31665b371f74ff..7b280142c7b76cc834746bae2b1cf3dc5d7088fb 100644 (file)
@@ -1,3 +1,10 @@
+2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * configure.ac (AM_ZLIB): Removed.
+       * Makefile.in: Regenerated.
+       * config.in: Likewise.
+       * configure: Likewise.
+
 2015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
 
        * emultempl/aarch64elf.em (_aarch64_add_stub_section): Set section
index 3236d7e95da1c6e02a6deedbdc5460555f6e024c..97fc3fa320f7c67a434c4e748ec841e0f1ca51d2 100644 (file)
@@ -68,7 +68,6 @@ DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \
        $(srcdir)/../ylwrap $(ld_TEXINFOS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
-       $(top_srcdir)/../config/zlib.m4 \
        $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/gettext-sister.m4 \
index ad015fe1a16de77a3a3eb931c28f0706d616e439..a9a37e0dc50b43abec053b031823eacb885b63f3 100644 (file)
 /* Define to 1 if you have the <windows.h> header file. */
 #undef HAVE_WINDOWS_H
 
-/* Define to 1 if you have the <zlib.h> header file. */
-#undef HAVE_ZLIB_H
-
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    */
 #undef LT_OBJDIR
index 7af2626d5bce3e03100544431adbb03a39daa36a..4a312dfabf82fea5e757289731215d0882f657c9 100755 (executable)
@@ -789,7 +789,6 @@ enable_werror
 enable_build_warnings
 enable_nls
 enable_initfini_array
-with_zlib
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1455,7 +1454,6 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-lib-path=dir1:dir2...  set default LIB_PATH
   --with-sysroot=DIR Search for usr/lib et al within DIR.
-  --with-zlib             include zlib support (auto/yes/no) default=auto
 
 Some influential environment variables:
   CC          C compiler command
@@ -11712,7 +11710,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11715 "configure"
+#line 11713 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11818,7 +11816,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11821 "configure"
+#line 11819 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16936,93 +16934,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-# Link in zlib if we can.  This is needed only for the bootstrap tests
-# right now, since those tests use libbfd, which depends on zlib.
-
-  # See if the user specified whether he wants zlib support or not.
-
-# Check whether --with-zlib was given.
-if test "${with_zlib+set}" = set; then :
-  withval=$with_zlib;
-else
-  with_zlib=auto
-fi
-
-
-  if test "$with_zlib" != "no"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
-$as_echo_n "checking for library containing zlibVersion... " >&6; }
-if test "${ac_cv_search_zlibVersion+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char zlibVersion ();
-int
-main ()
-{
-return zlibVersion ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' z; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_zlibVersion=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_zlibVersion+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_zlibVersion+set}" = set; then :
-
-else
-  ac_cv_search_zlibVersion=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
-$as_echo "$ac_cv_search_zlibVersion" >&6; }
-ac_res=$ac_cv_search_zlibVersion
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  for ac_header in zlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ZLIB_H 1
-_ACEOF
-
-fi
-
-done
-
-fi
-
-    if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
-      as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
-    fi
-  fi
-
-
 # When converting linker scripts into strings for use in emulation
 # files, use astring.sed if the compiler supports ANSI string
 # concatenation, or ostring.sed otherwise.  This is to support the
index e926c03dbfcd198d6f2f4a05fff3806467f65d7b..a885b7b20387b89da88f52c3284da698dfb4ef7d 100644 (file)
@@ -239,10 +239,6 @@ BFD_BINARY_FOPEN
 
 AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
 
-# Link in zlib if we can.  This is needed only for the bootstrap tests
-# right now, since those tests use libbfd, which depends on zlib.
-AM_ZLIB
-
 # When converting linker scripts into strings for use in emulation
 # files, use astring.sed if the compiler supports ANSI string
 # concatenation, or ostring.sed otherwise.  This is to support the
index ff9ba6662048882cca1ec03162e5f5ad0813f0b2..47bb489a1fc2c93ac25ebb39b50a76ae087dd304 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * ld-bootstrap/bootstrap.exp (extralibs): Add -lz.
+
 2015-03-30  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/18169
index fe8031dcd1885b2264db3ff4cd5ff5c9d15a1d0b..3b6eb84dcc6ad03f1707b2c47e6c89bedd4050fe 100644 (file)
@@ -120,6 +120,13 @@ foreach flags $test_flags {
        }
     }
 
+    # Check if the system's zlib library is used.
+    if {[file exists ../zlib/Makefile ]} then {
+       set extralibs "$extralibs -L../zlib -lz"
+    } else {
+       set extralibs "$extralibs -lz"
+    }
+
     # Plugin support requires linking with libdl.
     if { $plugins == "yes" } {
        if { ![istarget "*-*-freebsd*"]} {
This page took 0.046904 seconds and 4 git commands to generate.