summaryrefslogtreecommitdiff
path: root/gcc/config/darwin12.h
diff options
context:
space:
mode:
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-27 14:29:36 +0000
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-27 14:29:36 +0000
commit6afab66ea6311211e0e82963e372daf7a7e86da8 (patch)
tree3025ca76070f4fc7fb893b3a09ca0f62f3d28227 /gcc/config/darwin12.h
parent4f3ac3c871d691833e652b4de82794ce82b82ee6 (diff)
downloadgcc-6afab66ea6311211e0e82963e372daf7a7e86da8.tar.gz
[Darwin, config] Arrange for ld64 to be detected as Darwin's linker.
This is an initial patch in a series that converts Darwin's configury to detect ld64 features, rather than the current process of hard-coding them on target system version. A ld64-compatible linker is currently required and assumed by Darwin. If a DEFAULT_LINKER is set via --with-ld= then this will be tested to see if it is ld64. The ld64 version is determined for the chosen ld and this is exported for use in setting a default value for -mtarget-linker (needed for run-time code-gen changes to section choices). The support for -rdynamic is converted to be detected at config time, or by the ld64 version if that is found. gcc/ 2016-11-27 Iain Sandoe <iain@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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242894 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/darwin12.h')
-rw-r--r--gcc/config/darwin12.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/darwin12.h b/gcc/config/darwin12.h
index e3669826dc3..f88e2a46901 100644
--- a/gcc/config/darwin12.h
+++ b/gcc/config/darwin12.h
@@ -21,10 +21,15 @@ along with GCC; see the file COPYING3. If not see
#undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC \
"%:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) \
- %{rdynamic:-export_dynamic} %{!static:%{!static-libgcc: \
+ %{!static:%{!static-libgcc: \
%:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \
%{fno-pic|fno-PIC|fno-pie|fno-PIE|fapple-kext|mkernel|static|mdynamic-no-pic: \
%:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } %G %L"
#undef DEF_MIN_OSX_VERSION
#define DEF_MIN_OSX_VERSION "10.8"
+
+#ifndef LD64_VERSION
+#undef DEF_LD64
+#define DEF_LD64 "236.4"
+#endif