Regenerate configure in gold

Regenerate configure for zlib.m4 change, which adds --with-system-zlib and
removes --with-zlib in gold.  zlib is enabled unconditionally with builtin
zlib imported from GCC.

	* Makefile.am (ZLIB): New.
	(ZLIBINC): Likewise.
	(AM_CFLAGS): Add $(ZLIBINC).
	(AM_CXXFLAGS): Likewise.
	(ldadd_varldadd_var): Add $(ZLIB).
	(incremental_dump_LDADD): Likewise.
	(dwp_LDADD): Likewise.
	* compressed_output.cc: Don't check HAVE_ZLIB_H to include
	<zlib.h>.
	(zlib_compress): Don't check HAVE_ZLIB_H.
	(zlib_decompress): Likewise.
	* options.h (compress_debug_sections): Likewise.
	* configure.ac (AM_CONDITIONAL): Removed.
	* testsuite/Makefile.am (ZLIB): New.
	(LDADD): Add $(ZLIB).
	Don't check HAVE_ZLIB.
	* Makefile.in: Regenerated.
	* config.in: Likewise.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.
This commit is contained in:
H.J. Lu 2015-04-01 06:24:42 -07:00
parent 1ac806b8a7
commit 918357b955
10 changed files with 400 additions and 423 deletions

View File

@ -1,3 +1,26 @@
2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (ZLIB): New.
(ZLIBINC): Likewise.
(AM_CFLAGS): Add $(ZLIBINC).
(AM_CXXFLAGS): Likewise.
(ldadd_varldadd_var): Add $(ZLIB).
(incremental_dump_LDADD): Likewise.
(dwp_LDADD): Likewise.
* compressed_output.cc: Don't check HAVE_ZLIB_H to include
<zlib.h>.
(zlib_compress): Don't check HAVE_ZLIB_H.
(zlib_decompress): Likewise.
* options.h (compress_debug_sections): Likewise.
* configure.ac (AM_CONDITIONAL): Removed.
* testsuite/Makefile.am (ZLIB): New.
(LDADD): Add $(ZLIB).
Don't check HAVE_ZLIB.
* Makefile.in: Regenerated.
* config.in: Likewise.
* configure: Likewise.
* testsuite/Makefile.in: Likewise.
2015-03-30 Jing Yu <jingyu@google.com>
* aarch64-reloc.def: New TLSLD_ADD_DTPREL_HI12,

View File

@ -25,8 +25,14 @@ tooldir = $(exec_prefix)/$(target_alias)
ACLOCAL_AMFLAGS = -I ../bfd -I ../config
AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS)
AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS)
# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
# -I../zlib, unless we were configured with --with-system-zlib, in which
# case both are empty.
ZLIB = @zlibdir@ -lz
ZLIBINC = @zlibinc@
AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC)
AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC)
AM_CPPFLAGS = \
-I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../elfcpp \
@ -178,7 +184,7 @@ libgold_a_LIBADD = $(LIBOBJS)
sources_var = main.cc
deps_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL_DEP)
ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) \
$(THREADSLIB) $(LIBDL)
$(THREADSLIB) $(LIBDL) $(ZLIB)
ldflags_var = $(GOLD_LDFLAGS)
ld_new_SOURCES = $(sources_var)
@ -192,12 +198,12 @@ incremental_dump_SOURCES = incremental-dump.cc
incremental_dump_DEPENDENCIES = $(TARGETOBJS) libgold.a $(LIBIBERTY) \
$(LIBINTL_DEP)
incremental_dump_LDADD = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL) \
$(THREADSLIB) $(LIBDL)
$(THREADSLIB) $(LIBDL) $(ZLIB)
dwp_SOURCES = dwp.cc
dwp_DEPENDENCIES = libgold.a $(LIBIBERTY) $(LIBINTL_DEP)
dwp_LDADD = libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) $(THREADSLIB) \
$(LIBDL)
$(LIBDL) $(ZLIB)
dwp_LDFLAGS = $(GOLD_LDFLAGS)
CONFIG_STATUS_DEPENDENCIES = $(srcdir)/../bfd/development.sh

View File

@ -135,7 +135,8 @@ am_ld_new_OBJECTS = $(am__objects_4)
ld_new_OBJECTS = $(am_ld_new_OBJECTS)
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) libgold.a $(LIBIBERTY) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
ld_new_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(ld_new_LDFLAGS) \
$(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ld1_OBJECTS = $(am__objects_4)
@ -405,12 +406,20 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
zlibdir = @zlibdir@
zlibinc = @zlibinc@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = po testsuite
tooldir = $(exec_prefix)/$(target_alias)
ACLOCAL_AMFLAGS = -I ../bfd -I ../config
AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS)
AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS)
# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
# -I../zlib, unless we were configured with --with-system-zlib, in which
# case both are empty.
ZLIB = @zlibdir@ -lz
ZLIBINC = @zlibinc@
AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC)
AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) $(RANDOM_SEED_CFLAGS) $(ZLIBINC)
AM_CPPFLAGS = \
-I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../elfcpp \
-DLOCALEDIR="\"$(datadir)/locale\"" \
@ -546,7 +555,7 @@ libgold_a_LIBADD = $(LIBOBJS)
sources_var = main.cc
deps_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL_DEP)
ldadd_var = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) \
$(THREADSLIB) $(LIBDL)
$(THREADSLIB) $(LIBDL) $(ZLIB)
ldflags_var = $(GOLD_LDFLAGS)
ld_new_SOURCES = $(sources_var)
@ -559,12 +568,12 @@ incremental_dump_DEPENDENCIES = $(TARGETOBJS) libgold.a $(LIBIBERTY) \
$(LIBINTL_DEP)
incremental_dump_LDADD = $(TARGETOBJS) libgold.a $(LIBIBERTY) $(LIBINTL) \
$(THREADSLIB) $(LIBDL)
$(THREADSLIB) $(LIBDL) $(ZLIB)
dwp_SOURCES = dwp.cc
dwp_DEPENDENCIES = libgold.a $(LIBIBERTY) $(LIBINTL_DEP)
dwp_LDADD = libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) $(THREADSLIB) \
$(LIBDL)
$(LIBDL) $(ZLIB)
dwp_LDFLAGS = $(GOLD_LDFLAGS)
CONFIG_STATUS_DEPENDENCIES = $(srcdir)/../bfd/development.sh

View File

@ -21,11 +21,7 @@
// MA 02110-1301, USA.
#include "gold.h"
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif
#include "parameters.h"
#include "options.h"
#include "compressed_output.h"
@ -33,8 +29,6 @@
namespace gold
{
#ifdef HAVE_ZLIB_H
// Compress UNCOMPRESSED_DATA of size UNCOMPRESSED_SIZE. Returns true
// if it successfully compressed, false if it failed for any reason
// (including not having zlib support in the library). If it returns
@ -124,24 +118,6 @@ zlib_decompress(const unsigned char* compressed_data,
return true;
}
#else // !defined(HAVE_ZLIB_H)
static bool
zlib_compress(const unsigned char*, unsigned long,
unsigned char**, unsigned long*)
{
return false;
}
static bool
zlib_decompress(const unsigned char*, unsigned long,
unsigned char*, unsigned long)
{
return false;
}
#endif // !defined(HAVE_ZLIB_H)
// Read the compression header of a compressed debug section and return
// the uncompressed size.

View File

@ -196,9 +196,6 @@
/* 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
/* Default library search path */
#undef LIB_PATH

109
gold/configure vendored
View File

@ -600,8 +600,8 @@ HAVE_NO_USE_LINKER_PLUGIN_FALSE
HAVE_NO_USE_LINKER_PLUGIN_TRUE
HAVE_PUBNAMES_FALSE
HAVE_PUBNAMES_TRUE
HAVE_ZLIB_FALSE
HAVE_ZLIB_TRUE
zlibinc
zlibdir
LIBOBJS
LFS_CFLAGS
GOLD_LDADD
@ -796,7 +796,7 @@ enable_werror
enable_build_warnings
with_gold_ldflags
with_gold_ldadd
with_zlib
with_system_zlib
enable_maintainer_mode
'
ac_precious_vars='build_alias
@ -1453,7 +1453,7 @@ Optional Packages:
--with-lib-path=dir1:dir2... set default LIB_PATH
--with-gold-ldflags=FLAGS additional link flags for gold
--with-gold-ldadd=LIBS additional libraries for gold
--with-zlib include zlib support (auto/yes/no) default=auto
--with-system-zlib use installed libz
Some influential environment variables:
CC C compiler command
@ -6875,98 +6875,23 @@ fi
# Link in zlib if we can. This allows us to write compressed sections.
# See if the user specified whether he wants zlib support or not.
# Use the system's zlib library.
zlibdir=-L../zlib
zlibinc="-I\$(srcdir)/../zlib"
# 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
# Check whether --with-system-zlib was given.
if test "${with_system_zlib+set}" = set; then :
withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
zlibdir=
zlibinc=
fi
if test "$ac_cv_header_zlib_h" = "yes"; then
HAVE_ZLIB_TRUE=
HAVE_ZLIB_FALSE='#'
else
HAVE_ZLIB_TRUE='#'
HAVE_ZLIB_FALSE=
fi
ac_fn_c_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default"
if test "x$ac_cv_have_decl_basename" = x""yes; then :
ac_have_decl=1
@ -7911,10 +7836,6 @@ if test -z "${IFUNC_STATIC_TRUE}" && test -z "${IFUNC_STATIC_FALSE}"; then
as_fn_error "conditional \"IFUNC_STATIC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HAVE_ZLIB_TRUE}" && test -z "${HAVE_ZLIB_FALSE}"; then
as_fn_error "conditional \"HAVE_ZLIB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HAVE_PUBNAMES_TRUE}" && test -z "${HAVE_PUBNAMES_FALSE}"; then
as_fn_error "conditional \"HAVE_PUBNAMES\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5

View File

@ -528,7 +528,6 @@ fi
# Link in zlib if we can. This allows us to write compressed sections.
AM_ZLIB
AM_CONDITIONAL(HAVE_ZLIB, test "$ac_cv_header_zlib_h" = "yes")
dnl We have to check these in C, not C++, because autoconf generates
dnl tests which have no type information, and current glibc provides

View File

@ -695,17 +695,10 @@ class General_options
N_("Check segment addresses for overlaps (default)"),
N_("Do not check segment addresses for overlaps"));
#ifdef HAVE_ZLIB_H
DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none",
N_("Compress .debug_* sections in the output file"),
("[none,zlib]"),
{"none", "zlib"});
#else
DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none",
N_("Compress .debug_* sections in the output file"),
N_("[none]"),
{"none"});
#endif
DEFINE_bool(copy_dt_needed_entries, options::TWO_DASHES, '\0', false,
N_("Not supported"),

View File

@ -7,6 +7,11 @@
# Ignore warning about AM_PROG_CC_C_O due to large_CFLAGS
AUTOMAKE_OPTIONS = foreign -Wno-portability
# This is where we get zlib from. zlib is in ../../zlib unless we were
# configured with --with-system-zlib, in which case ../../zlib either
# doesn't exist or not configured.
ZLIB = -L../../zlib -lz
# The two_file_test tests -fmerge-constants, so we simply always turn
# it on. For compilers that do not support the command-line option,
# we assume they just always emit SHF_MERGE sections unconditionally.
@ -102,7 +107,7 @@ libgoldtest_a_SOURCES = test.cc testmain.cc testfile.cc
DEPENDENCIES = \
libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL_DEP)
LDADD = libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL) \
$(THREADSLIB) $(LIBDL)
$(THREADSLIB) $(LIBDL) $(ZLIB)
# The unittests themselves
@ -1052,8 +1057,6 @@ missing_key_func.err: missing_key_func.o gcctestdir/ld
exit 1; \
fi
if HAVE_ZLIB
# Check that --detect-odr-violations works with compressed debug sections.
check_DATA += debug_msg_cdebug.err
MOSTLYCLEANFILES += debug_msg_cdebug.err
@ -1072,8 +1075,6 @@ debug_msg_cdebug.err: debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_
exit 1; \
fi
endif HAVE_ZLIB
# See if we can also detect problems when we're linking .so's, not .o's.
check_DATA += debug_msg_so.err
MOSTLYCLEANFILES += debug_msg_so.err
@ -1137,8 +1138,6 @@ flagstest_o_specialfile: flagstest_debug.o gcctestdir/ld
chmod a+x $@
test -s $@
if HAVE_ZLIB
# Test --compress-debug-sections. FIXME: check we actually compress.
check_PROGRAMS += flagstest_compress_debug_sections
flagstest_compress_debug_sections: flagstest_debug.o gcctestdir/ld
@ -1155,8 +1154,6 @@ flagstest_o_specialfile_and_compress_debug_sections: flagstest_debug.o \
chmod a+x $@
test -s $@
endif HAVE_ZLIB
# Test -TText and -Tdata.
check_PROGRAMS += flagstest_o_ttext_1
flagstest_o_ttext_1: flagstest_debug.o gcctestdir/ld
@ -2207,8 +2204,6 @@ gdb_index_test_1: gdb_index_test.o gcctestdir/ld
gdb_index_test_1.stdout: gdb_index_test_1
$(TEST_READELF) --debug-dump=gdb_index $< > $@
if HAVE_ZLIB
# Test that --gdb-index functions correctly with compressed debug sections.
check_SCRIPTS += gdb_index_test_2.sh
check_DATA += gdb_index_test_2.stdout
@ -2220,8 +2215,6 @@ gdb_index_test_2: gdb_index_test_cdebug.o gcctestdir/ld
gdb_index_test_2.stdout: gdb_index_test_2
$(TEST_READELF) --debug-dump=gdb_index $< > $@
endif HAVE_ZLIB
# Another simple C test (DW_AT_high_pc encoding) for --gdb-index.
check_SCRIPTS += gdb_index_test_3.sh
check_DATA += gdb_index_test_3.stdout

File diff suppressed because it is too large Load Diff