Commit Graph

112 Commits

Author SHA1 Message Date
Romain Geissler 2760f24c49 Add configure flag to enable gnu hash style by default.
ld/
	* configure.ac: Add --enable-default-hash-style option.
	* ldmain.c (main): Set link_info.emit_hash to DEFAULT_EMIT_SYSV_HASH.
	Set link_info.emit_gnu_hash to DEFAULT_EMIT_GNU_HASH.
	* configure: Regenerate.
	* config.in: Regenerate.

gold/
	* configure.ac: Add --enable-default-hash-style option.
	* options.h (hash_style): Use DEFAULT_HASH_STYLE as default value.
	* configure: Regenerate.
	* config.in: Regenerate.
2017-08-08 07:25:39 +09:30
Ambrogino Modigliani 96fe45624e Fix spelling mistakes in comments in configure scripts
All changes are limited to comments, and no run-time behavior is
affected.

bfd/ChangeLog:
2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>

        * warning.m4: Fix spelling in comments.
        * configure.ac: Fix spelling in comments.
        * configure: Regenerate.

binutils/ChangeLog:
2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>

        * configure: Regenerate.

gdb/ChangeLog:
2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>

        * configure.ac: Fix spelling in comments.
        * configure: Regenerate.

gas/ChangeLog:
2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>

        * configure: Regenerate.

gold/ChangeLog:
2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>

        * configure: Regenerate.

gprof/ChangeLog:
2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>

        * configure: Regenerate.

ld/ChangeLog:
2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>

        * configure: Regenerate.

opcodes/ChangeLog:
2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>

        * configure: Regenerate.
2016-11-22 15:43:03 +00:00
Loïc Yhuel 7a34932bce Add missing '$' in configure.ac.
2016-11-04  Loïc Yhuel <loic.yhuel@softathome.com>

gold/
        * configure.ac: add missing '$'.
        * configure: Regenerate.
2016-11-07 08:00:21 -08:00
Vlad Zakharov c5da193232 When building target binaries, ensure that the warning flags selected for the command line match the target compiler.
bfd	* warning.m4 (AC_EGREP_CPP_FOR_BUILD): Introduce macro
	to verify CC_FOR_BUILD compiler.
	(AM_BINUTILS_WARNINGS): Introduce ac_cpp_for_build variable
	and add CC_FOR_BUILD compiler checks.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

binutils	* Makefile.am: Replace AM_CLFAGS with AM_CFLAGS_FOR_BUILD
	when building with CC_FOR_BUILD compiler.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

gas	* Makefile.in: Regenerate.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

gold	* Makefile.in: Regenerate.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.

gprof	* Makefile.in: Regenerate.
	* configure: Likewise.

ld	* Makefile.in: Regenerate.
	* configure: Likewise.

opcodes	* Makefile.in: Regenerate.
	* configure: Likewise.
2016-09-26 16:36:08 +01:00
H.J. Lu ad961eab9a gold: Support x86-64 TLS code sequences without PLT
There are extensions to x86-64 psABI:

https://groups.google.com/forum/#!topic/x86-64-abi/de5_KnLHxtI

to call tls_get_addr via GOT:

call *__tls_get_addr@GOTPCREL(%rip)

Since direct call is 4-byte long and indirect call, is 5-byte long, the
extra one byte must be handled properly.

For general dynamic model, one 0x66 prefix before call instruction is
removed to make room for indirect call.  For local dynamic model, we
simply use 5-byte indirect call.

TLS linker optimization is updated to recognize new instruction
patterns.  For local dynamic model to local exec model transition, we
generate 4 0x66 prefixes, instead of 3, before mov instruction in 64-bit
and generate a 5-byte nop, instead of 4-byte, before mov instruction in
32-bit.

	PR gold/20216
	* configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
	AM_CONDITIONAL.
	* configure: Regenerated.
	* x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
	R_X86_64_GOTPCRELX relocation against __tls_get_addr.
	(Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
	call to __tls_get_addr.
	(Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
	(Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
	* testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
	pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
	(pr20216a_test_SOURCES): New.
	(pr20216a_test_DEPENDENCIES): Likewise.
	(pr20216a_test_CFLAGS): Likewise.
	(pr20216a_test_LDFLAGS): Likewise.
	(pr20216a_test_LDADD): Likewise.
	(pr20216b_test_SOURCES): Likewise.
	(pr20216b_test_DEPENDENCIES): Likewise.
	(pr20216b_test_CFLAGS): Likewise.
	(pr20216b_test_LDFLAGS): Likewise.
	(pr20216b_test_LDADD): Likewise.
	(pr20216c_test_SOURCES): Likewise.
	(pr20216c_test_DEPENDENCIES): Likewise.
	(pr20216c_test_CFLAGS): Likewise.
	(pr20216c_test_LDFLAGS): Likewise.
	(pr20216c_test_LDADD): Likewise.
	(pr20216d_test_SOURCES): Likewise.
	(pr20216d_test_DEPENDENCIES): Likewise.
	(pr20216d_test_CFLAGS): Likewise.
	(pr20216d_test_LDFLAGS): Likewise.
	(pr20216d_test_LDADD): Likewise.
	(pr20216e_test_SOURCES): Likewise.
	(pr20216e_test_DEPENDENCIES): Likewise.
	(pr20216e_test_CFLAGS): Likewise.
	(pr20216e_test_LDFLAGS): Likewise.
	(pr20216e_test_LDADD): Likewise.
	(pr20216a.so): Likewise.
	(pr20216b.so): Likewise.
	(pr20216_gd.o): Likewise.
	(pr20216_ld.o): Likewise.
	(MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
	* testsuite/Makefile.in: Regenerated.
	* testsuite/pr20216_def.c: New file.
	* testsuite/pr20216_gd.S: Likewise.
	* testsuite/pr20216_ld.S: Likewise.
	* testsuite/pr20216_main.c: Likewise.
2016-06-29 08:37:42 -07:00
H.J. Lu 6b1edb94fe gold: Add a linker configure option --enable-relro
Add a configure option --enable-relro to decide whether -z relro should
be enabled by default.  Default to yes.

	PR ld/20283
	* NEWS: Mention --enable-relro.
	* configure.ac: Add --enable-relro.
	(DEFAULT_LD_Z_RELRO): New.  Set by --enable-relro and default
	to 1.
	* config.in: Regenerated.
	* configure: Likewise.
	* options.h (General_options::relro): Default to
	DEFAULT_LD_Z_RELRO.
2016-06-22 05:39:39 -07:00
Alan Modra 6eb7d83039 Regenerate configure 2016-05-09 17:24:30 +09:30
Trevor Saunders 6757cf5769 enable -Wwrite-strings for gas
We add a new AC_SUBST to warning.m4 so that the test if the warning is
supported is centralized, but the warning can be enabled per directory.

binutils/ChangeLog:

2016-03-31  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* configure: Regenerate.

gprof/ChangeLog:

2016-03-31  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* configure: Regenerate.

ld/ChangeLog:

2016-03-31  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* configure: Regenerate.

opcodes/ChangeLog:

2016-03-31  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* configure: Regenerate.

bfd/ChangeLog:

2016-03-31  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* configure: Regenerate.
	* warning.m4: Add WARN_WRITE_STRINGS AC_SUBST.

gold/ChangeLog:

2016-03-31  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* configure: Regenerate.

gas/ChangeLog:

2016-03-31  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* Makefile.am: Add WARN_WRITE_STRINGS to WARN_CFLAGS.
	* Makefile.in: Regenerate.
	* configure: Likewise.
2016-03-31 07:30:56 -04:00
Nick Clifton 9780e04507 Add -Wstack-usage to the gcc warning flags list, but only if using a sufficiently recent version of gcc.
bfd	* warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
	sufficiently recent version of GCC.
	* configure: Regenerate.

others	* configure: Regenerate.
2016-03-22 09:41:16 +00:00
Nick Clifton e1fa016350 Remove use of alloca.
bfd	* warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
	* configure: Regenerate.
	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
	alloca with call to xmalloc.
	* elf32-nds32.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elfxx-mips.c: Likewise.
	* pef.c: Likewise.
	* pei-x86_64.c: Likewise.
	* som.c: Likewise.
	* xsym.c: Likewise.

binutils * dlltool.c: Replace use of alloca with call to xmalloc.
	* dllwrap.c: Likewise.
	* nlmconv.c: Likewise.
	* objdump.c: Likewise.
	* resrc.c: Likewise.
	* winduni.c: Likewise.
	* configure: Regenerate.

gas	* atof-generic.c: Replace use of alloca with call to xmalloc.
	* cgen.c: Likewise.
	* dwarf2dbg.c: Likewise.
	* macro.c: Likewise.
	* remap.c: Likewise.
	* stabs.c: Likewise.
	* symbols.c: Likewise.
	* config/obj-elf.c: Likewise.
	* config/tc-aarch64.c: Likewise.
	* config/tc-arc.c: Likewise.
	* config/tc-arm.c: Likewise.
	* config/tc-avr.c: Likewise.
	* config/tc-ia64.c: Likewise.
	* config/tc-mips.c: Likewise.
	* config/tc-msp430.c: Likewise.
	* config/tc-nds32.c: Likewise.
	* config/tc-ppc.c: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-tic30.c: Likewise.
	* config/tc-tic54x.c: Likewise.
	* config/tc-xstormy16.c: Likewise.
	* config/te-vms.c: Likewise.
	* configure: Regenerate.

ld	* emultempl/msp430.em: Replace use of alloca with call to xmalloc.
	* plugin.c: Likewise.
	* pe-dll.c: Likewise.
2016-03-21 16:31:46 +00:00
Marcin Kościelnicki e79a4bad70 Add s390 backend.
elfcpp/
	* s390.h: New file.

gold/
	* s390.cc: New file.
	* Makefile.am (TARGETSOURCES): Add s390.cc.
	(ALL_TARGETOBJS): Add s390.o.
	* Makefile.in: Regenerate.
	* configure.ac: Add s390 support.
	* configure: Regenerate.
	* configure.tgt: Add s390-*-* and s390x-*-*.
	* testsuite/icf_safe_test.sh (arch_specific_safe_fold): Add s390
	support.
2015-10-28 16:47:27 -07:00
H.J. Lu 37a42ee9ad Regenerate configure files
bfd/

	* configure: Regenerated.

binutils/

	* configure: Regenerated.

gas/

	* configure: Regenerated.

gold/

	* configure: Regenerated.

gprof/

	* configure: Regenerated.

ld/

	* configure: Regenerated.

opcodes/

	* configure: Regenerated.
2015-07-27 07:56:32 -07:00
H.J. Lu 39f3de7c43 Regenerate configure in bfd/binutils/gas/gdb/gold
bfd/

	* configure: Regenerated.

binutils/

	* configure: Regenerated.

gas/

	* configure: Regenerated.

gdb/

	* Makefile.in (top_srcdir): New.
	* configure: Regenerated.

gold/

	* configure: Regenerated.
2015-04-02 05:45:03 -07:00
H.J. Lu 918357b955 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.
2015-04-01 06:40:35 -07:00
H.J. Lu be66981e16 Set GOLD_DEFAULT_SIZE to 32 for x32
* configure.ac (default_size): Set to 32 for x32.
	* configure: Regenerated.
2015-02-22 12:26:27 -08:00
H.J. Lu 4fc1b9d43c Handle stack split for x32
X32 uses cmp %fs:NN,%esp, lea NN(%rsp),%r10d, lea NN(%rsp),%r11d,
instead of cmp %fs:NN,%rsp, lea NN(%rsp),%r10, lea NN(%rsp),%r11.
This patch handles it.

	PR gold/17729
	* configure.ac (DEFAULT_TARGET_X86_64): Don't set for x32.
	(DEFAULT_TARGET_X32): Set for x32.
	* x86_64.cc (cmp_insn_32): New.
	(lea_r10_insn_32): Likewise.
	(lea_r11_insn_32): Likewise.
	(cmp_insn_64): Likewise.
	(lea_r10_insn_64): Likewise.
	(lea_r11_insn_64): Likewise.
	(Target_x86_64<size>::do_calls_non_split): Handle x32.
	* testsuite/Makefile.am (check_SCRIPTS): Add split_x32.sh.
	(check_DATA): Add split_x32 files.
	(split_x32_[1234n].o): New targets.
	(split_x32_[124]): New targets.
	(split_x32_[1234r].stdout): New targets.
	* testsuite/split_x32.sh: New file.
	* testsuite/split_x32_1.s: Likewise.
	* testsuite/split_x32_2.s: Likewise.
	* testsuite/split_x32_3.s: Likewise.
	* testsuite/split_x32_4.s: Likewise.
	* testsuite/split_x32_n.s: Likewise.
	* configure: Regenerated.
	* testsuite/Makefile.in: Likewise.
2015-01-06 15:38:25 -08:00
Jing Yu 053a4d680b 2014-07-02 Jing Yu <jingyu@google.com>
Initial patch to enable gold aarch64 backend.

    This patch is just a skeleton which almost does nothing.
    It does not support ILP32 now.

    gold/ChangeLog:
	* aarch64.cc: New file
	* Makefile.am (TARGETSOURCES): Add aarch64.cc
	(ALL_TARGETOBJS): Add aarch64.$(OBJEXT)
	* Makefile.in: Regenerate.
	* configure.tgt: Add entries for aarch64*.
	* configure.ac:  Likewise.
	* configure: Likewise.

    elfcpp/ChangeLog:
	* aarch64.h: New file. New enums for aarch64-elf64 relocations.
	* elfcpp.h (EM_AARCH64, SHT_AARCH64_ATTRIBUTES, PT_AARCH64_ARCHEXT,
	PT_AARCH64_UNWIND): New enum constant.
2014-07-02 16:21:23 -07:00
Sasa Stankovic 9810d34d76 gold/
* mips.cc: New file.
	* Makefile.am (TARGETSOURCES): Add mips.cc
	(ALL_TARGETOBJS): Add mips.$(OBJEXT)
	* configure.tgt: Add entries for mips*.
	* configure.ac: Likewise.
	* Makefile.in: Regenerate.
	* configure: Likewise.
2014-06-23 12:02:10 -07:00
Joel Brobecker 270c993744 Make it easy to make --disable-werror the default for both binutils and gdb
The goal of this patch is to provide an easy way to make
--disable-werror the default when building binutils, or the parts
of binutils that need to get built when building GDB. In development
mode, we want to continue making -Werror the default with GCC.
But, when making releases, I think we want to make it as easy as
possible for regular users to successfully build from sources.

GDB already has this kind of feature to turn -Werror as well as
the use of the libmcheck library. As GDB Release Manager, I take
advantage of it to turn those off after having cut the branch.
I'd like to be able to do the same for the binutils bits. And
perhaps Tristan will want to do the same for his releases too
(not sure, binutils builders might be a little savvier than GDB
builders).

This patch introduces a new file, called development.sh, which
just sets a variable called $development. In our development branches
(Eg. "master"), it's set to true. But setting it to false would allow
us to change the default behavior of various development-related
features to be turned off; in this case, it turns off the use of
-Werror by default (use --enable-werror to turn it back on).

bfd/ChangeLog:

        * development.sh: New file.
        * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
        Make -Werror the default with GCC only if DEVELOPMENT is true.
        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
        $(srcdir)/development.sh.
        * Makefile.in, configure: Regenerate.

binutils/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gas/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gold/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): New.
        * Makefile.in, configure: Regenerate.

gprof/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

ld/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

opcodes/ChangeLog:

        * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on
        bfd's development.sh.
        * Makefile.in, configure: Regenerate.

gdb/ChangeLog:

        * development.sh: Delete.
        * Makefile.in (config.status): Adjust dependency on development.sh.
        * configure.ac: Adjust development.sh source call.
        * configure: Regenerate.

gdb/gdbserver/ChangeLog:

        * configure.ac: Adjust development.sh source call.
        * Makefile.in (config.status): Adjust dependency on development.sh.
        * configure: Regenerate.

Tested on x86_64-linux by building two ways: One with DEVELOPMENT
set to true, and one with DEVELOPMENT set to false. In the first
case, I could see the use of -Werror, while it disappeared in
the second case.
2014-06-05 05:47:29 -07:00
Cary Coutant ae447ddd12 Modify gold testsuite to disable plugins added by GCC driver.
GCC 4.8 now adds linker plugin options by default, which conflict with the
--incremental tests in the testsuite. This patch checks whether the compiler
supports the -fno-use-linker-plugin option, and adds it to all link
commands.

2014-04-02  Cary Coutant  <ccoutant@google.com>

	* configure.ac (HAVE_PUBNAMES): Use C instead of C++.
	(HAVE_NO_USE_LINKER_PLUGIN): Check for -fno-use-linker-plugin.
	* configure: Regenerate.
	* testsuite/Makefile.am (OPT_NO_PLUGINS): New macro for
	-fno-use-linker-plugin.
	(LINK1, CXXLINK1): Add it to the link command.
	* testsuite/Makefile.in: Regenerate.
2014-04-02 15:04:36 -07:00
Cary Coutant 8356f2d009 Add configure checks for <unordered_set> and <unordered_map>.
gold/
	* configure.ac: Check for <unordered_set> and <unordered_map>.
	* config.in: Regenerate.
	* configure: Regenerate.
	* system.h: Use <unordered_set> and <unordered_map> if available.
2013-12-18 15:53:31 -08:00
Cary Coutant 6632e8ccec Add check for which library is needed for dlopen.
gold/
	PR gold/16203
	* configure.ac: Add check for which library is needed for
	dlopen.
	* configure: Regenerate.
2013-11-22 15:47:18 -08:00
Cary Coutant 2500c0173e gold/
* configure.ac: Fix check for -fmerge-constants.
	* configure.ac: Regenerate.
2013-10-31 11:36:32 -07:00
Roland McGrath 13323c494d gold/
* configure.ac (TLS_GNU2_DIALECT): Use -Werror in test.
	(HAVE_PUBNAMES): Likewise.
	* configure: Regenerate.
2013-10-11 22:07:40 +00:00
Roland McGrath 2b64b5511a gold/
* configure.ac (MERGE_CONSTANTS_FLAG): New check.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/merge_string_literals_1.c: Renamed to have .cc suffix.
	* testsuite/merge_string_literals_2.c: Likewise.
	* testsuite/Makefile.am
	(merge_string_literals_1.o, merge_string_literals_2.o): Update deps.
	(AM_CFLAGS, AM_CXXFLAGS): Use $(MERGE_CONSTANTS_FLAG) in place of
	literal -fmerge-constants.
	* testsuite/Makefile.in: Regenerate.
2013-10-11 21:56:16 +00:00
Cary Coutant 9df9de2cca gold/
* configure.ac: Export DEFAULT_TARGET.
    	* configure: Regenerate.
    	* Makefile.in: Regenerate.
    	* testsuite/Makefile.am: Add .EXPORT_ALL_VARIABLES.
    	* testsuite/Makefile.in: Regenerate.
    	* testsuite/debug_msg.sh: Delete duplicate tests.
    	Don't check undef_int error message match for powerpc where the
    	source file and line number aren't available.
2013-05-13 17:35:22 +00:00
Ian Lance Taylor 0bf402d505 Fix mingw gold build with plugins enabled
* Makefile.am: Replace -ldl with @DLOPEN_LIBS@.
	* configure.ac: Export DLOPEN_LIBS and add headers check.
	* plugin.cc: Handle non-dlfcn case.
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2013-01-11 14:36:36 +00:00
H.J. Lu f2a6224b9c Properly install gold as default linker
PR gold/14897
	* configure.ac (--enable-ld): Removed.
	(install_as_default): Set to yes only for --enable-gold=default
	or --disable-ld.
	* configure: Regenerated.
2013-01-07 19:55:41 +00:00
Cary Coutant 26e4ef59d6 gold/
* configure.ac: Fix typo restoring CXXFLAGS.
	* configure: Regenerate.
2013-01-05 00:00:51 +00:00
Ian Lance Taylor ae2eea65c6 * configure.ac (HAVE_ZLIB): Use AM_ZLIB instead of AC_SEARCH_LIBS.
Use $ac_cv_header_zlib_h = yes as the condition in AM_CONDITIONAL.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2012-12-07 04:28:52 +00:00
Alan Modra 0a6f1bf2f9 * configure.ac: Apply 2012-09-10 change to config.in here.
* configure: Regenerate.
2012-11-05 12:26:55 +00:00
Walter Lee 5c0b3823c6 Add support for tilegx in gold.
* configure.ac (ENABLE_GOLD): support tilegx*
	* configure: rebuild
elfcpp:
	* tilegx.h: New file.
	* elfcpp.h: add EM_TILEGX.
gold:
	* tilegx.cc: New file.
	* Makefile.am (TARGETSOURCES): Add tilegx.cc
	(ALL_TARGETOBJS): Add tilegx.$(OBJEXT)
	* configure.tgt: Add entries for tilegx*.
	* configure.ac: Likewise.
	* Makefile.in: Rebuild.
	* configure: Likewise.
	* testsuite/icf_safe_test.sh (arch_specific_safe_fold): Handle
	tilegx.
2012-09-15 17:11:28 +00:00
Alan Modra 864a1b5697 * configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): False for powerpc.
* configure: Regenerate.
	* testsuite/Makefile.am (final_layout.stdout): Pass --synthetic to nm.
	(plugin_final_layout.stdout): Likewise.
	(memory_test): Set page sizes to 0x1000.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/discard_locals_test.sh: Add FIXME comment.
	* testsuite/justsyms_exec.c: Disable function test for powerpc64.
	* testsuite/pr14265.t: Add .got output section statement.
	* testsuite/script_test_2.t: Likewise.
	* testsuite/script_test_3.t: Likewise.
	* testsuite/script_test_4.t: Likewise.
	* testsuite/script_test_5.t: Likewise.
	* testsuite/script_test_6.t: Likewise.
	* testsuite/script_test_7.t: Likewise.
	* testsuite/script_test_9.t: Likewise.
2012-09-05 11:01:43 +00:00
Cary Coutant f1415016b6 2012-07-18 Cary Coutant <ccoutant@google.com>
PR gold/14344
	* configure.ac: Add check for -gpubnames support.
	* configure: Regenerate.
	* testsuite/Makefile.am (gdb_index_test_1): Add check for -gpubnames
	support; force -gno-pubnames.
	(gdb_index_test_2, gdb_index_test_3): Add check for -gpubnames
	support.
	(gdb_index_test_4): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/gdb_index_test_1.sh: Refactor code into common file.
	* testsuite/gdb_index_test_2.sh: Likewise.
	* testsuite/gdb_index_test_3.sh: Don't look for space after colon.
	* testsuite/gdb_index_test_4.sh: New script.
	* testsuite/gdb_index_test_comm.sh: New script with common code;
	don't look for space after colon.
2012-07-19 00:19:35 +00:00
Ian Lance Taylor 81c82a68dc PR gold/14309
* configure.ac: Test whether std::tr1::hash<off_t> works.
	* gold.h: Add a specialization for std::tr1::hash<off_t> if
	needed.
	* output.h (class Output_fill): Add virtual destructor.
	* configure, config.in: Rebuild.
2012-07-10 14:54:29 +00:00
Cary Coutant 7c0640fa36 gold/
* configure.ac: Add check for fallocate.
	* configure: Regenerate.
	* config.in: Regenerate.

	* options.h (class General_options): Add --mmap-output-file and
	--posix-fallocate options.
	* output.cc: (posix_fallocate): Remove; replace with...
	(gold_fallocate): New function.
	(Output_file::map_no_anonymous): Call gold_fallocate.
	(Output_file::map): Check --mmap-output-file option.
2012-06-06 22:12:47 +00:00
Nick Clifton df7b86aa4c PR 14072
* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* sysdep.h: Generate an error if included before config.h.
	* alpha-opc.c: Include sysdep.h before any other header file.
	* alpha-dis.c: Likewise.
	* avr-dis.c: Likewise.
	* cgen-opc.c: Likewise.
	* cr16-dis.c: Likewise.
	* cris-dis.c: Likewise.
	* crx-dis.c: Likewise.
	* d10v-dis.c: Likewise.
	* d10v-opc.c: Likewise.
	* d30v-dis.c: Likewise.
	* d30v-opc.c: Likewise.
	* h8500-dis.c: Likewise.
	* i370-dis.c: Likewise.
	* i370-opc.c: Likewise.
	* m10200-dis.c: Likewise.
	* m10300-dis.c: Likewise.
	* micromips-opc.c: Likewise.
	* mips-opc.c: Likewise.
	* mips61-opc.c: Likewise.
	* moxie-dis.c: Likewise.
	* or32-opc.c: Likewise.
	* pj-dis.c: Likewise.
	* ppc-dis.c: Likewise.
	* ppc-opc.c: Likewise.
	* s390-dis.c: Likewise.
	* sh-dis.c: Likewise.
	* sh64-dis.c: Likewise.
	* sparc-dis.c: Likewise.
	* sparc-opc.c: Likewise.
	* spu-dis.c: Likewise.
	* tic30-dis.c: Likewise.
	* tic54x-dis.c: Likewise.
	* tic80-dis.c: Likewise.
	* tic80-opc.c: Likewise.
	* tilegx-dis.c: Likewise.
	* tilepro-dis.c: Likewise.
	* v850-dis.c: Likewise.
	* v850-opc.c: Likewise.
	* vax-dis.c: Likewise.
	* w65-dis.c: Likewise.
	* xgate-dis.c: Likewise.
	* xtensa-dis.c: Likewise.
	* rl78-decode.opc: Likewise.
	* rl78-decode.c: Regenerate.
	* rx-decode.opc: Likewise.
	* rx-decode.c: Regenerate.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* sysdep.h: Generate an error if included before config.h.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* aclocal.m4: Regenerate.
	* bfd-in.h: Generate an error if included before config.h.
	* sysdep.h: Likewise.
	* bfd-in2.h: Regenerate.
	* compress.c: Remove #include "config.h".
	* plugin.c: Likewise.
	* elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
	* elf64-hppa.c: Likewise.
	* som.c: Likewise.
	* xsymc.c: Likewise.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* aclocal.m4: Regenerate.
	* Makefile.am: Use wrappers around C files generated by flex.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* itbl-lex-wrapper.c: New file.
	* config/bfin-lex-wrapper.c: New file.
	* cgen.c: Include as.h before setjmp.h.
	* config/tc-dlx.c: Include as.h before any other header.
	* config/tc-h8300.c: Likewise.
	* config/tc-lm32.c: Likewise.
	* config/tc-mep.c: Likewise.
	* config/tc-microblaze.c: Likewise.
	* config/tc-mmix.c: Likewise.
	* config/tc-msp430.c: Likewise.
	* config/tc-or32.c: Likewise.
	* config/tc-tic4x.c: Likewise.
	* config/tc-tic54x.c: Likewise.
	* config/tc-xtensa.c: Likewise.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* unwind-ia64.h: Include config.h.
2012-05-17 15:13:28 +00:00
Roland McGrath 5879767462 binutils/
2012-04-06  Roland McGrath  <mcgrathr@google.com>

	* configure.in (AC_CHECK_HEADERS): Add locale.h.
	* config.in: Regenerate.
	* configure: Regenerate.

gas/
2012-04-06  Roland McGrath  <mcgrathr@google.com>

	* configure.in (AC_CHECK_HEADERS): Add locale.h.
	* config.in: Regenerate.
	* configure: Regenerate.

gold/
2012-04-06  Roland McGrath  <mcgrathr@google.com>

	* configure.in (AC_CHECK_HEADERS): Add locale.h.
	* config.in: Regenerate.
	* configure: Regenerate.

ld/
2012-04-06  Roland McGrath  <mcgrathr@google.com>

	* configure.in (AC_CHECK_HEADERS): Add locale.h.
	* config.in: Regenerate.
	* configure: Regenerate.
2012-04-06 16:49:02 +00:00
Nick Clifton 443507505d * configure.in (AC_CHECK_FUNCS): Add setlocale.
(AM_LC_MESSAGES): Add.
	* aclocal.m4: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
2012-04-05 08:43:41 +00:00
H.J. Lu 63887f3df5 Check if -fpic -mtls-dialect=gnu2 works
2012-01-30  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.ac: Check if -fpic -mtls-dialect=gnu2 works.
	* configure: Regenerated.
2012-01-30 21:13:30 +00:00
H.J. Lu 24482ca057 Check if -mcmodel=medium works
2012-01-27  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.ac: Check if -mcmodel=medium works.
	* configure: Regenerated.
2012-01-27 23:23:37 +00:00
Ian Lance Taylor 3f3cddf146 * configure.ac: Add --with-lib-path option. Define LIB_PATH and
NATIVE_LINKER.
	* Makefile.am (AM_CPPFLAGS): Define TOOLLIBDIR.
	* options.cc (General_options::finalize): Use library search path
	from configure script if specified.  If not native and no sysroot,
	only search TOOLLIBDIR.
	* options.h (Search_directory::Search_directory): Change name to
	const std::string&.
	(General_options::add_to_library_path_with_sysroot): Change arg to
	const std::string&.
	* configure, Makefile.in, config.in: Rebuild.
2011-11-03 04:32:01 +00:00
Ian Lance Taylor dc87f62014 * configure.ac: Add new --with-gold-ldadd and --with-gold-ldflags
configuration options.
	* configure: Regenerate.
	* Makefile.am: Handle GOLD_LDADD and GOLD_LDFLAGS.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2011-09-23 15:02:32 +00:00
Cary Coutant ebb300b244 * configure.ac: Check for glibc support for gnu_indirect_function
support with static linking, setting automake conditional
	IFUNC_STATIC.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

	* testsuite/Makefile.am (ifuncmain1static, ifuncmain2static)
	(ifuncmain4static, ifuncmain5static, ifuncmain7static): Add check
	for IFUNC_STATIC.
	* testsuite/Makefile.in: Regenerate.
2011-09-14 01:29:01 +00:00
Ian Lance Taylor dd7af07463 Correct last commit. 2011-07-02 00:31:35 +00:00
Ian Lance Taylor 328c7c2f68 PR gold/12525
* configure.ac: Test whether static linking works, setting
	the automake conditional HAVE_STATIC.
	* testsuite/Makefile.am: Disable tests using -static if
	HAVE_STATIC is not true.
	* configure, testsuite/Makefile.in: Rebuild.
2011-07-02 00:19:04 +00:00
Ian Lance Taylor 5393d7415a PR gold/12910
* options.h (class General_options): Add --ctors-in-init-array.
	* layout.cc (Layout::get_output_section): Treat SHT_INIT_ARRAY and
	friends as SHT_PROGBITS for merging sections.
	(Layout::layout): Remove special handling of .init_array and
	friends.  Don't sort if doing relocatable link.  Sort for .ctors
	and .dtors if ctors_in_init_array.
	(Layout::make_output_section): Force correct section types for
	.init_array and friends.  Don't sort if doing relocatable link,
	Don't sort .ctors and .dtors if ctors_in_init_array.
	(Layout::section_name_mapping): Remove .ctors. and .dtorso.
	(Layout::output_section_name): Add relobj parameter.  Change all
	callers.  Handle .ctors. and .dtors. in code rather than table.
	Handle .ctors and .dtors if ctors_in_init_array.
	(Layout::match_file_name): New function, moved from output.cc.
	* layout.h (class Layout): Update declarations.
	* output.cc: Include "layout.h".
	(Input_section_sort_entry::get_priority): New function.
	(Input_section_sort_entry::match_file_name): Just call
	Layout::match_file_name.
	(Output_section::Input_section_sort_init_fini_compare::operator()):
	Handle .ctors and .dtors.  Sort by explicit priority rather than
	by name.
	* configure.ac: Remove CONSTRUCTOR_PRIORITY test and conditional.
	* testsuite/initpri2.c: New test.
	* testsuite/Makefile.am: Don't test CONSTRUCTOR_PRIORITY.
	(check_PROGRAMS): Add initpri2.
	(initpri2_SOURCES, initpri2_DEPENDENCIES): New variables.
	(initpri2_LDFLAGS, initpri2_LDADD): New variables.
	* configure, testsuite/Makefile.in: Rebuild.
2011-06-23 00:46:14 +00:00
Ian Lance Taylor 88597d3422 * configure.ac: Check for sys/mman.h and mmap. Check for mremap
with MREMAP_MAYMOVE.
	* output.h (class Output_file): Add map_is_allocated_ field.
	* output.cc: Only #include <sys/mman.h> if it exists.  If mmap is
	not available, provide stubs.  If mremap is not available, #define
	it to gold_mremap.
	(MREMAP_MAYMOVE): Define if not defined.
	(Output_file::Output_file): Initialize map_is_allocated_.
	(Output_file::resize): Check map_is_allocated_.
	(Output_file::map_anonymous): If mmap fails, use malloc.
	(Output_file::unmap): Don't do anything for an anonymous map.
	* fileread.cc: Only #include <sys/mman.h> if it exists.  If mmap
	is not available, provide stubs.
	(File_read::View::~View): Use free rather than delete[].
	(File_read::make_view): Use malloc rather than new[].  If mmap
	fails, use malloc.
	(File_read::find_or_make_view): Use malloc rather than new[].
	* gold.h: Remove HAVE_REMAP code.
	* mremap.c: #include <errno.h>.  Only #include <sys/mman.h> if it
	exists.  Rename mremap to gold_mremap.  If mmap is not available
	don't do anything.
	* configure, config.in: Rebuild.
2011-04-12 18:06:16 +00:00
Ian Lance Taylor d0773f31b4 * configure.ac: Add check for gnu_indirect_function support in
the toolchain building binutils.
	* configure: Rebuild.
2011-03-02 14:51:42 +00:00
Nick Clifton c77912127f * configure.ac: For --enable-gold, handle value `default' instead of
`both*'.   New configure option --{en,dis}able-ld.

ld, gold/
	* configure.ac: For --enable-gold, handle value `default' instead of
	`both*'. Always install ld as ld.gold, install as ld if gold is
	the default.
2010-11-23 13:39:57 +00:00