Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103002205
D14318.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14318.diff
View Options
Index: head/share/mk/bsd.linker.mk
===================================================================
--- head/share/mk/bsd.linker.mk
+++ head/share/mk/bsd.linker.mk
@@ -58,7 +58,7 @@
.if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD})
.if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION)
-_ld_version!= (${${ld}} --version || echo none) | sed -n 1p
+_ld_version!= (${${ld}} -v 2>&1 || echo none) | sed -n 1p
.if ${_ld_version} == "none"
.warning Unable to determine linker type from ${ld}=${${ld}}
.endif
@@ -73,6 +73,17 @@
${X_}LINKER_FREEBSD_VERSION:= ${_ld_version:[4]:C/.*-([^-]*)\)/\1/}
.else
${X_}LINKER_FREEBSD_VERSION= 0
+.endif
+.elif ${_ld_version:[1]} == "@(\#)PROGRAM:ld"
+# bootstrap linker on MacOS
+${X_}LINKER_TYPE= mac
+_v= ${_ld_version:[2]:S/PROJECT:ld64-//}
+# Convert version 409.12 to 409.12.0 so that the echo + awk below works
+.if empty(_v:M[1-9]*.[0-9]*.[0-9]*) && !empty(_v:M[1-9]*.[0-9]*)
+_v:=${_v}.0
+.else
+# Some versions do not contain a minor version so we need to append .0.0 there
+_v:=${_v}.0.0
.endif
.else
.warning Unknown linker from ${ld}=${${ld}}: ${_ld_version}, defaulting to bfd
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 4:57 PM (17 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14743056
Default Alt Text
D14318.diff (1 KB)
Attached To
Mode
D14318: Make bsd.linker.mk work with the MacOS linker
Attached
Detach File
Event Timeline
Log In to Comment