https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71767

--- Comment #56 from Iain Sandoe <iains at gcc dot gnu.org> ---
Author: iains
Date: Sun Dec 11 16:01:35 2016
New Revision: 243524

URL: https://gcc.gnu.org/viewcvs?rev=243524&root=gcc&view=rev
Log:
[Darwin] Back-port fix for PR71767.

gcc/

2016-12-11  Iain Sandoe  <i...@codesourcery.com>

        Backport from mainline
        2016-11-27  Iain Sandoe  <i...@codesourcery.com>

        PR target/71767
        * config/darwin-sections.def (picbase_thunk_section): New.
        * config/darwin.c (darwin_init_sections): Set up picbase thunk
        section. (darwin_rodata_section, darwin_objc2_section,
        machopic_select_section, darwin_asm_declare_constant_name,
        darwin_emit_weak_or_comdat, darwin_function_section): Don’t use
        coalesced with newer linkers.
        (darwin_override_options): Decide on usage of coalesed sections
        on the basis of the target linker version.
        * config/darwin.h (MIN_LD64_NO_COAL_SECTS): New.
        * config/darwin.opt  (mtarget-linker): New.
        * config/i386/i386.c (ix86_code_end): Do not force the thunks into
        a coalesced section, instead use a thunks section.

        Backport from mainline
        2016-11-28  Iain Sandoe  <i...@codesourcery.com>

        PR target/71767
        * configure.ac (with_ld64): Use portable method to extract the
        major part of the version number.
        * configure: Regenerated.

        Backport from mainline
        2016-11-27  Iain Sandoe  <i...@codesourcery.com>

        PR target/71767
        * configure.ac (with-ld64): New var, set for Darwin, set on
        detection of ld64, gcc_cv_ld64_export_dynamic: New, New test.
        * config/darwin.h: Use LD64_HAS_DYNAMIC export. DEF_LD64: New,
        define.
        * config/darwin10.h(DEF_LD64): Update for this target version.
        * config/darwin12.h(LINK_GCC_C_SEQUENCE_SPEC): Remove rdynamic
        test.  (DEF_LD64): Update for this target version.
        * configure: Regenerated.
        * config.in: Regenerated.

        Backport from mainline
        2016-11-27  Iain Sandoe  <i...@codesourcery.com>

        PR target/71767
        * config/darwin.c (imachopic_indirection_name): Make data
        section indirections linker-visible.
        * config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): Make local
        constant labels linker-visible.

gcc/testsuite/

2016-12-11  Iain Sandoe  <i...@codesourcery.com>

        Backport from mainline
        2016-11-27  Dominique d'Humieres  <domi...@lps.ens.fr>
                    Iain Sandoe  <i...@codesourcery.com>

        PR target/71767
        * g++.dg/abi/key2.C: Adjust for changed Darwin sections and
        linker-visible symbols.
        * g++.dg/torture/darwin-cfstring-3.C: Likewise.
        * gcc.dg/const-uniq-1.c: Likewise.
        * gcc.dg/torture/darwin-cfstring-3.c: Likewise.
        * gcc.target/i386/pr70799-1.c: Likewise.



Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/config.in
    branches/gcc-6-branch/gcc/config/darwin-sections.def
    branches/gcc-6-branch/gcc/config/darwin.c
    branches/gcc-6-branch/gcc/config/darwin.h
    branches/gcc-6-branch/gcc/config/darwin.opt
    branches/gcc-6-branch/gcc/config/darwin10.h
    branches/gcc-6-branch/gcc/config/darwin12.h
    branches/gcc-6-branch/gcc/config/i386/i386.c
    branches/gcc-6-branch/gcc/configure
    branches/gcc-6-branch/gcc/configure.ac
    branches/gcc-6-branch/gcc/testsuite/ChangeLog
    branches/gcc-6-branch/gcc/testsuite/g++.dg/abi/key2.C
    branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/darwin-cfstring-3.C
    branches/gcc-6-branch/gcc/testsuite/gcc.dg/const-uniq-1.c
    branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/darwin-cfstring-3.c

Reply via email to