* libc/posix/wordfree.c (wordfree): The wrong words are freed
when WRDE_DOOFFS is in use. Restructure the code so that the memory
needed to be freed is instead kept in an internal linked list...
* libc/posix/wordexp2.h: ...as defined here...
* libc/posix/wordexp.c (wordexp): ...and build this internal
linked list here, avoiding wasteful strdup calls in the process.
H.J. Lu [Sat, 29 Sep 2012 15:35:53 +0000 (15:35 +0000)]
Sync toplevel files with GCC tree
2012-09-28 Ian Lance Taylor <iant@google.com>
* Makefile.def: Make all-target-libgo depend on
all-target-libbacktrace.
* Makefile.in: Rebuild.
2012-09-26 Ian Lance Taylor <iant@google.com>
* Makefile.def: Make all-gcc depend on all-libbacktrace.
* Makefile.in: Rebuild.
2012-09-06 Diego Novillo <dnovillo@google.com>
* configure.ac: Bump minimum GMP version to 4.2.3.
* configure: Re-generate.
2012-09-05 Georg-Johann Lay <avr@gjlay.de>
PR target/54461
* configure.ac (noconfigdirs,target=avr-*-*): Add target-newlib,
target-libgloss if not configured --with-avrlibc=no.
* configure: Regenerate.
2012-09-04 Jason Merrill <jason@redhat.com>
* configure.ac: Fix --enable-languages=all.
2012-09-03 Richard Guenther <rguenther@suse.de>
PR bootstrap/54138
* configure.ac: Re-organize ISL / CLOOG checks to allow
disabling with either --without-isl or --without-cloog.
* configure: Regenerated.
Mike Wrighton [Wed, 12 Sep 2012 20:01:10 +0000 (20:01 +0000)]
* gdb/remote.c (remote_insert_hw_breakpoint): Throw exception if
there is an error inserting hardware breakpoints and use the
error message from the target.
* gdb/breakpoint.c (insert_bp_location, insert_breakpoint_locations):
Catch this exception and print the error message contained within. Do not
print the default hardware error breakpoint message in this case.
Richard Earnshaw [Wed, 12 Sep 2012 16:25:49 +0000 (16:25 +0000)]
2012-09-11 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
bfd/
* bfd-in2.h: Regenerated.
* elf64-aarch64.c
(elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
(elf64_aarch64_reloc_map): Add reloc entry.
(aarch64_resolve_relocation): Likewise.
(bfd_elf_aarch64_put_addend): Likewise.
(aarch64_reloc_got_type): Likewise.
(elf64_aarch64_final_link_relocate): Likewise.
(lf64_aarch64_check_relocs): Likewise.
(elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
reloc.
* libbfd.h: Regenerated.
* reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.
gas/
* config/tc-aarch64.c
(reloc_table): Add reloc to table entry.
(parse_address_main): Add support for #:<reloc_op>:<symbol>.
(parse_operands): Check for unused reloc.
(md_apply_fix): New case for reloc.
(aarch64_force_relocation): Likewise.
gas/testsuite
* gas/aarch64/reloc-insn.d
(BFD_RELOC_AARCH64_GOT_LD_PREL19): Add expected asm for new reloc test.
* gas/aarch64/reloc-insn.s
(BFD_RELOC_AARCH64_GOT_LD_PREL19): Add test for reloc.
include/
* elf/aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc.
ld/testsuite
* ld-aarch64/aarch64-elf.exp: New reloc tests.
* ld-aarch64/emit-relocs-309-low-bad.d: New file. Expected asm for test
failure (lower bound overflow).
* ld-aarch64/emit-relocs-309-low.d: New file. Expected asm for test
success (lower bound).
* ld-aarch64/emit-relocs-309-up-bad.d: New file. Expected asm for test
failure (upper bound overflow).
* ld-aarch64/emit-relocs-309-up.d: New file. Expected asm for test
success (upper bound).
* ld-aarch64/emit-relocs-309.s: New file. Asm for new reloc tests.
H.J. Lu [Tue, 4 Sep 2012 13:52:04 +0000 (13:52 +0000)]
Add Intel Itanium Series 9500 support
bfd/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* cpu-ia64-opc.c (ins_cnt6a): New function.
(ext_cnt6a): Ditto.
(ins_strd5b): Ditto.
(ext_strd5b): Ditto.
(elf64_ia64_operands): Add new operand types.
gas/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* config/tc-ia64.c (reg_symbol): Add a new register.
(indirect_reg): Ditto.
(pseudo_func): Add new symbolic constants.
(operand_match): Add new operand types recognition.
(operand_insn): Add new register recognition.
(md_begin): Add new register definition.
(specify_resource): Add new register recognition.
gas/testsuite/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* gas/testsuite/gas/ia64/psn.d: New file.
* gas/testsuite/gas/ia64/psn.s: New file.
* gas/testsuite/gas/ia64/ia64.exp: Add new testcase.
* gas/testsuite/gas/ia64/opc-i.d: Fixed failing tests.
* gas/testsuite/gas/ia64/opc-m.d: Ditto.
include/opcode/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* ia64.h (ia64_opnd): Add new operand types.
opcodes/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* ia64-asmtab.h (completer_index): Extend bitfield to full uint.
* ia64-gen.c: Promote completer index type to longlong.
(irf_operand): Add new register recognition.
(in_iclass_mov_x): Add an entry for the new mov_* instruction type.
(lookup_specifier): Add new resource recognition.
(insert_bit_table_ent): Relax abort condition according to the
changed completer index type.
(print_dis_table): Fix printf format for completer index.
* ia64-ic.tbl: Add a new instruction class.
* ia64-opc-i.c (ia64_opcodes_i): Define new I-instructions.
* ia64-opc-m.c (ia64_opcodes_m): Define new M-instructions.
* ia64-opc.h: Define short names for new operand types.
* ia64-raw.tbl: Add new RAW resource for DAHR register.
* ia64-waw.tbl: Add new WAW resource for DAHR register.
* ia64-asmtab.c: Regenerate.
* pseudo-reloc.cc (auto_protect_for): New function.
(__write_memory): Call auto_protect_for to handle page protection.
(do_pseudo_reloc): Call auto_protect_for to restore old page protection.
H.J. Lu [Sun, 26 Aug 2012 14:34:40 +0000 (14:34 +0000)]
Sync toplevel files with GCC tree
2012-08-14 Diego Novillo <dnovillo@google.com>
Merge from cxx-conversion branch.
* Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove
POSTSTAGE1_CONFIGURE_FLAGS.
* Makefile.in: Regenerate.
* configure.ac (ENABLE_BUILD_WITH_CXX): Remove. Update all users.
Force C++ when bootstrapping.
* configure: Regenerate.
2012-07-06 Richard Guenther <rguenther@suse.de>
* Makefile.def (cloog): Pass $(HOST_GMPINC) and $(HOST_ISLINC)
as CPPFLAGS, pass path to built gmp as LDFLAGS, always use
--with-gmp=system.
* Makefile.in: Regenerated.
* configure: Likewise.
2012-07-06 Richard Guenther <rguenther@suse.de>
* configure.ac (extra_isl_gmp_configure_flags): Initialize and subst.
* Makefile.def (isl): Use extra_isl_gmp_configure_flags and
supply V=1 as extra_make_flags.
* configure: Regenerated.
* Makefile.in: Likewise.
2012-07-03 Richard Guenther <rguenther@suse.de>
* Makfile.def (isl): Remove not necessary extra_exports and
extra_make_flags.
(cloog): Use $$CPPFLAGS instead of ${CPPFLAGS}.
* Makefile.in: Regenerated.
2012-07-03 Richard Guenther <rguenther@suse.de>
* Makefile.def (cloog): Add V=1 to extra_make_flags.
* configure.ac: If either the ISL or the CLooG check failed
do not try to build in-tree versions.
* Makefile.in: Regenerated.
* configure: Regenerated.
2012-07-02 Richard Guenther <rguenther@suse.de>
Michael Matz <matz@suse.de>
Tobias Grosser <tobias@grosser.es>
Sebastian Pop <sebpop@gmail.com>
* Makefile.def: Add ISL host module, remove PPL host module.
Adjust ClooG host module to use the proper ISL.
* Makefile.tpl: Pass ISL include flags instead of PPL ones.
* configure.ac: Include config/isl.m4. Add ISL host library,
remove PPL. Remove PPL configury, add ISL configury, adjust
ClooG configury.
* Makefile.in: Regenerated.
* configure: Likewise.
2012-07-02 Richard Guenther <rguenther@suse.de>
Merge from graphite branch
2011-07-21 Tobias Grosser <tobias@grosser.es>
* configure: Regenerated.
* config/cloog.m4: Remove support for CLooG-ppl and CLooG-parma,
both cloog.org and legacy versions. The only supported version will
be CLooG with the isl backend.
* Makefile.tpl (gcc-no-fixedincludes): Rename into ...
(gcc-install-no-fixedincludes): Now forwarder to local target in gcc/
(install-no-fixedincludes): Adjust accordingly.
* Makefile.in: Regenerate.
2012-05-09 Nick Clifton <nickc@redhat.com>
Paul Smith <psmith@gnu.org>
PR bootstrap/50461
* configure.ac (mpfr-dir): When using in-tree MPFR sources
allow for the fact that from release v3.1.0 of MPFR the source
files were moved into a src sub-directory.
* configure: Regenerate.
2012-05-07 Janne Blomqvist <jb@gcc.gnu.org>
* configure.ac: Bump minimum MPFR version to 2.4.0.
* configure: Regenerated.
2012-05-01 Richard Henderson <rth@redhat.com>
* Makefile.def (libatomic): New target_module.
* configure.ac (target_libraries): Add libatomic.
(noconfigdirs): Check if libatomic is supported.
* Makefile.in, configure: Rebuild.
config/
2012-08-26 Art Haas <ahaas@impactweather.com>
* cloog.m4 (CLOOG_INIT_FLAGS): Use = instead of == in test.
2012-07-04 Tristan Gingold <gingold@adacore.com>
* isl.m4 (ISL_CHECK_VERSION): Set to yes if cross-compiling.
Fix comments.
Sriraman Tallam [Fri, 24 Aug 2012 18:35:35 +0000 (18:35 +0000)]
Patch adds support to allow plugins to map selected subset of sections to unique
segments.
2012-08-24 Sriraman Tallam <tmsriram@google.com>
* gold.cc (queue_middle_tasks): Call layout again when unique
segments for sections is desired.
* layout.cc (Layout::Layout): Initialize new members.
(Layout::get_output_section_flags): New function.
(Layout::choose_output_section): Call get_output_section_flags.
(Layout::layout): Make output section for mapping to a unique segment.
(Layout::insert_section_segment_map): New function.
(Layout::attach_allocated_section_to_segment): Make unique segment for
output sections marked so.
(Layout::segment_precedes): Check for unique segments when sorting.
* layout.h (Layout::Unique_segment_info): New struct.
(Layout::Section_segment_map): New typedef.
(Layout::insert_section_segment_map): New function.
(Layout::get_output_section_flags): New function.
(Layout::is_unique_segment_for_sections_specified): New function.
(Layout::set_unique_segment_for_sections_specified): New function.
(Layout::unique_segment_for_sections_specified_): New member.
(Layout::section_segment_map_): New member.
* object.cc (Sized_relobj_file<size, big_endian>::do_layout):
Rename is_gc_pass_one to is_pass_one.
Rename is_gc_pass_two to is_pass_two.
Rename is_gc_or_icf to is_two_pass.
Check for which pass based on whether symbols data is present.
Make it two pass when unique segments for sections is desired.
* output.cc (Output_section::Output_section): Initialize new
members.
* output.h (Output_section::is_unique_segment): New function.
(Output_section::set_is_unique_segment): New function.
(Output_section::is_unique_segment_): New member.
(Output_section::extra_segment_flags): New function.
(Output_section::set_extra_segment_flags): New function.
(Output_section::extra_segment_flags_): New member.
(Output_section::segment_alignment): New function.
(Output_section::set_segment_alignment): New function.
(Output_section::segment_alignment_): New member.
(Output_segment::Output_segment): Initialize is_unique_segment_.
(Output_segment::is_unique_segment): New function.
(Output_segment::set_is_unique_segment): New function.
(Output_segment::is_unique_segment_): New member.
* plugin.cc (allow_unique_segment_for_sections): New function.
(unique_segment_for_sections): New function.
(Plugin::load): Add new functions to transfer vector.
* Makefile.am (plugin_final_layout.readelf.stdout): Add readelf output.
* Makefile.in: Regenerate.
* testsuite/plugin_final_layout.sh: Check if unique segment
functionality works.
* testsuite/plugin_section_order.c (onload): Check if new interfaces
are available.
(allow_unique_segment_for_sections): New global.
(unique_segment_for_sections): New global.
(claim_file_hook): Call allow_unique_segment_for_sections.
(all_symbols_read_hook): Call unique_segment_for_sections.
2012-08-24 Sriraman Tallam <tmsriram@google.com>
* plugin-api.h (ld_plugin_allow_unique_segment_for_sections):
New interface.
(ld_plugin_unique_segment_for_sections): New interface.
(LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val.
(LDPT_UNIQUE_SEGMENT_FOR_SECTIONS): New enum val.
(tv_allow_unique_segment_for_sections): New member.
(tv_unique_segment_for_sections): New member.
* libc/stdio/flags.c (__sflags): Rewrite recognition of extended mode flags to
just loop over more allowed flags. Support glibc 'e' flag on systems defining
_GLIBC_EXTENSION. Support C11 'x' flag.
* DevNotes: Add entry cgf-000016.
* cygtls.h (_cygtls::push): Inline.
(_cygtls::interrupt_now): Change signal number argument to siginfo_t argument.
(_cygtls::interrupt_setup): Ditto.
(_cygtls::set_siginfo): Delete declaration.
(_cygtls::reset_signal_arrived): Don't reset signal_arrived signal. Just reset
flag.
* exceptions.cc (_cygtls::interrupt_now): Reflect argument changes. Pass si to
interrupt_setup.
(_cygtls::interrupt_setup): Reflect argument changes. Fill out tls infodata
here using passed-in si. Use si.si_signo instead of sig.
(sigpacket::setup_handler): Move this function into sigpacket class. Use si
field from the class as appropriate.
(sigpacket::process): Don't call tls->set_siginfo here since setup_handler
could fail. Eliminate now-unneeded sig argument.
* sigproc.h (sigpacket::setup_handler): Move setup_handler to this class.
Corinna Vinschen [Fri, 17 Aug 2012 09:23:34 +0000 (09:23 +0000)]
* fhandler_clipboard.cc (fhandler_dev_clipboard::read): Use
read-ahead buffer for reading Windows clipboard if caller's
buffer is too small for complete characters.
* include/limits.h: Remove outdated TODO comment.
* cygheap.cc (init_cygheap::find_tls): Don't consider unitialized threads.
* cygtls.cc (_cygtls::operator HANDLE): Return NULL when tid is not set.
* exceptions.cc (setup_handler): Don't try to suspend a thread if it has no
handle.
* cygtls.h (_cygtls::create_signal_arrived): New function.
(_cygtls::set_signal_arrived): Lock creation of signal_arrived.
* cygwait.cc (cancelable_wait): Ignore signal_arrived event if _my_tls 'sig'
element does not exist.
* exceptions.cc (_cygtls::interrupt_setup): Create signal_arrived if recipient
thread has not created it.
* exceptions.cc (sigdelayed): Move declaration to sigproc.h.
* sigproc.h (sigdelayed): Make symbol globally available.
* gendef (sigdelayed): Specifically zero incyg and stacklock.
* signal.cc (sigwaitinfo): Lock _my_tls and try harder to clean up signal
information.
include/opcode/
* mips.h (mips_opcode): Add the exclusions field.
(OPCODE_IS_MEMBER): Remove macro.
(cpu_is_member): New inline function.
(opcode_is_member): Likewise.
opcodes/
* micromips-opc.c (micromips_opcodes): Update comment.
* mips-opc.c (mips_builtin_opcodes): Likewise. Mark coprocessor
instructions for IOCT as appropriate.
* mips-dis.c (print_insn_mips): Replace OPCODE_IS_MEMBER with
opcode_is_member.
* configure.in: Substitute NO_WMISSING_FIELD_INITIALIZERS with
the result of a check for the -Wno-missing-field-initializers
GCC option.
* Makefile.am (NO_WMISSING_FIELD_INITIALIZERS): New variable.
(mips-opc.lo): Pass $(NO_WMISSING_FIELD_INITIALIZERS) to
compilation.
(mips16-opc.lo): Likewise.
(micromips-opc.lo): Likewise.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
Earnie Boyd [Wed, 8 Aug 2012 20:28:26 +0000 (20:28 +0000)]
* lib/kernel32.def (InterlockedDecrement): Remove the @BYTE count since
we now declare it as __cdecl.
(InterlockedIncrement): Ditto.
(InterlockedExchange): Ditto.
* libc/include/stdio.h (_rename): Define when building newlib.
* libc/include/sys/signal.h (_kill): Ditto.
* libc/include/sys/stat.h (_mkdir): Ditto.
* libc/include/sys/time.h (_gettimeofday): Ditto.
* libc/include/sys/times.h (_times): Ditto.
* libc/include/sys/wait.h (_wait): Ditto.
* libc/locale/lmessages.c (empty): Don't define for Cygwin.
* libc/locale/lmonetary.c (cnv): Ditto.
* libc/locale/nl_langinfo.c (nl_langinfo): Ditto for variable s.
* libc/posix/collate.c: Throughout cast to avoid compiler warning.
* libc/posix/engine.c (matcher): Initialize dp to avoid compiler
warning.
* libc/posix/glob.c: Disable on Cygwin. Explain why.
* libc/posix/regcomp.c: Fix "uninitialized" compiler warnings.
(dissect): Deliberately silence gcc compiler warning. Add comment to
explain why.
* libc/posix/wordexp.c (wordexp): Remove num_bytes variable since result
is never used.
* libc/posix/popen.c (popen): Ditto for variable last.
* libc/reent/mkdirr.c: Include sys/stat.h.
* libc/reent/renamer.c: Include stdio.h.
* libc/search/hash.c: Throughout use underscored variants of the stat
function family.
(init_hash): Add missing definition for the __USE_INTERNAL_STAT64 case.
* libc/search/hash_bigkey.c (__big_insert): Add parenthesis to avoid
compiler warning.
* libc/search/hash_page.c (overflow_page): Initalize freep to NULL to
avoid compiler warning.
* libc/stdio/asiprintf.c (_asiprintf_r): Cast unsigned char * to char *
to avoid compiler warning.
(asiprintf): Ditto.
* libc/stdio/asprintf.c (_asprintf_r): Ditto.
(asprintf): Ditto.
* libc/stdio/vasiprintf.c (_vasiprintf_r): Ditto.
* libc/stdio/vasprintf.c (_vasprintf_r): Ditto.
* libc/stdio/mktemp.c (_gettemp): Cast to unsigned char in call to
isdigit to avoid compiler warning.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Initialize variables used for
grouping to avoid compiler warning. Only define and set nseps and
nrepeats if they are really used.
* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Ditto. Only define state if
it is really used.
* libc/stdio/vfscanf.c (u_char): Revert to be defined as unsigned char.
(__SVFSCANF_R): Cast fmt in call to __mbtowc.
* libc/stdlib/mbtowc_r.c (JIS_state_table): Disable when building
Cygwin.
(JIS_action_table): Ditto.
* libc/stdlib/wctomb_r.c (__utf8_wctomb): Add parenthesis to avoid
compiler warning.
* libc/string/strcasestr.c: Deliberately silence gcc compiler warning.
Add comment to explain why.
* libc/time/strptime.c (strptime): Cast to unsigned char in calls to
isspace to avoid compiler warning.
* libm/math/e_atan2.c (__ieee754_atan2): Add parenthesis to avoid
compiler warning.
* libm/math/e_exp.c (__ieee754_exp): Initialize k to 0 to avoid
compiler warning. Drop setting it to 0 later.
* libm/math/ef_exp.c (__ieee754_expf): Ditto.
* libm/math/e_pow.c (__ieee754_pow): Add braces to avoid compiler
warning.
* libm/math/ef_pow.c (__ieee754_powf): Ditto.
* libm/math/er_lgamma.c (__ieee754_lgamma_r): Initialize nadj to 0 to
avoid compiler warning.
* libm/math/erf_lgamma.c (__ieee754_lgammaf_r): Ditto.
* libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Ditto for variable z.
* libm/common/sf_round.c (roundf): Remove signbit variable since result
is never used.
Earnie Boyd [Mon, 6 Aug 2012 18:12:53 +0000 (18:12 +0000)]
* include/winnt.h (MemoryBarrier): Define to __mingworg_MemoryBarrier()
which is in libmingwex.a.
MODIFIED FROM: Use __sync_synchronize instead of
creating a function due to multiple definition.
NOTE: Not using __sync_synchronize to allow applications to mix-n-match
C libraries from different vendors.
* exceptions.cc (sigdelayed): Simplify declaration.
(_cygtls::call_signal_handler): Fix test for when to pop signal stack. Only do
it exactly when what is on the stack is a no-op.
* spawn.cc (child_info_spawn::worker): Put back a minor variation of Corinna's
test for detecting a background process when starting a non-cygwin process.