bsd.linker.mk (6f81bd02b3f6a3b48dbfc6416288346b97e87d7c) bsd.linker.mk (83cff1f8e51a29aaef1a598af5589398bd64478e)
1# $FreeBSD$
2
3# Setup variables for the linker.
4#
5# LINKER_TYPE is the major type of linker. Currently binutils and lld support
6# automatic detection.
7#
8# LINKER_VERSION is a numeric constant equal to:

--- 33 unchanged lines hidden (view full) ---

42
43.if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD})
44.if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION)
45_ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none
46.if ${_ld_version} == "none"
47.error Unable to determine linker type from ${ld}=${${ld}}
48.endif
49.if ${_ld_version:[1..2]} == "GNU ld"
1# $FreeBSD$
2
3# Setup variables for the linker.
4#
5# LINKER_TYPE is the major type of linker. Currently binutils and lld support
6# automatic detection.
7#
8# LINKER_VERSION is a numeric constant equal to:

--- 33 unchanged lines hidden (view full) ---

42
43.if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD})
44.if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION)
45_ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none
46.if ${_ld_version} == "none"
47.error Unable to determine linker type from ${ld}=${${ld}}
48.endif
49.if ${_ld_version:[1..2]} == "GNU ld"
50${X_}LINKER_TYPE= binutils
50${X_}LINKER_TYPE= bfd
51_v= ${_ld_version:M[1-9].[0-9]*:[1]}
52.elif ${_ld_version:[1]} == "LLD"
53${X_}LINKER_TYPE= lld
54_v= ${_ld_version:[2]}
55.else
56.error Unknown linker from ${ld}=${${ld}}: ${_ld_version}
57.endif
58${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \

--- 23 unchanged lines hidden ---
51_v= ${_ld_version:M[1-9].[0-9]*:[1]}
52.elif ${_ld_version:[1]} == "LLD"
53${X_}LINKER_TYPE= lld
54_v= ${_ld_version:[2]}
55.else
56.error Unknown linker from ${ld}=${${ld}}: ${_ld_version}
57.endif
58${X_}LINKER_VERSION!= echo "${_v:M[1-9].[0-9]*}" | \

--- 23 unchanged lines hidden ---