|
root / base / usr / src / tools / scripts / sunld-kernel.sh
sunld-kernel.sh Bash 15 lines 552 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/sh
#
# sunld-kernel.sh — invoke the illumos native linker for kernel builds
# with LD_ALTEXEC cleared.
#
# On self-hosted Hammerhead, LD_ALTEXEC is set by env/hammerhead.sh to
# /usr/bin/gnu-ld-wrapper so user-space gcc/collect2 uses GNU ld with
# flag translation.  The kernel must use sunld directly and honor
# LOAD_SEGMENT mapfiles (which the wrapper drops).  `unexport` alone
# doesn't reliably remove the variable from recipe subshells, so we
# clear it here explicitly before exec'ing sunld.
#
unset LD_ALTEXEC
exec /usr/bin/sunld "$@"