]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin : Adjust defaults for the linker.
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 31 Dec 2020 14:51:56 +0000 (14:51 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 29 May 2022 19:07:59 +0000 (20:07 +0100)
Ideally, the linker will be queried for its version and that will be
used to determine capabilities that cannot be discovered from
reasonable configuration testing.

When building cross tools, this might not be possible, and we have
strategies for providing useful defaults.  These are adjusted here to
refect current choices.

gcc/ChangeLog:

* config/darwin.h (MIN_LD64_NO_COAL_SECTS): Adjust.
Amend handling for LD64_VERSION fallback defaults.

(cherry picked from commit ef370f933c03b95ff0e8ae86b3422d26fc5c49c6)

gcc/config/darwin.h

index 4153bbee1aa4f5e172cba393d8905a01c533f9f3..d3ed5ca072a7f92c0ee87abc98476dcbe6c48fdb 100644 (file)
@@ -1094,16 +1094,20 @@ extern void darwin_driver_init (unsigned int *,struct cl_decoded_option **);
 /* Later versions of ld64 support coalescing weak code/data without requiring
    that they be placed in specially identified sections.  This is the earliest
    _tested_ version known to support this so far.  */
-#define MIN_LD64_NO_COAL_SECTS "236.4"
+#define MIN_LD64_NO_COAL_SECTS "236.3"
 
 /* From at least version 62.1, ld64 can build symbol indirection stubs as
    needed, and there is no need for the compiler to emit them.  */
 #define MIN_LD64_OMIT_STUBS "62.1"
 
+/* If we have no definition for the linker version, pick the minimum version
+   that will bootstrap the compiler.  */
 #ifndef LD64_VERSION
-#define LD64_VERSION "62.1"
-#else
-#define DEF_LD64 LD64_VERSION
+# ifndef  DEF_LD64
+#  define LD64_VERSION "85.2.1"
+# else
+#  define LD64_VERSION DEF_LD64
+# endif
 #endif
 
 #endif /* CONFIG_DARWIN_H */