aboutsummaryrefslogtreecommitdiff
path: root/bin/9l
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-05-17 20:07:52 -0400
committerRuss Cox <rsc@swtch.com>2020-05-17 20:15:41 -0400
commit9444b8e4bc847f8fd9d02466976b962288cedf31 (patch)
tree2cc0867e99fae93f4b48d7193d5a93a172c1fac6 /bin/9l
parent154140a22b1c697f6a3edb3e5913efded1be082a (diff)
downloadplan9port-9444b8e4bc847f8fd9d02466976b962288cedf31.tar.gz
plan9port-9444b8e4bc847f8fd9d02466976b962288cedf31.tar.bz2
plan9port-9444b8e4bc847f8fd9d02466976b962288cedf31.zip
9c, 9l: accept CC9FLAGS from config
Also, if CC9FLAGS includes -fsanitize=address (ASAN), predefine PLAN9PORT_ASAN for use by programs that need to know (mainly libthread). The 9c script used to have a variable called ngflags, which was ccflags except -g (ng stood for "no g"), but nothing needs it split out anymore, so simplify to just ccflags.
Diffstat (limited to 'bin/9l')
-rwxr-xr-xbin/9l14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/9l b/bin/9l
index 398adbd8..875e103a 100755
--- a/bin/9l
+++ b/bin/9l
@@ -12,29 +12,29 @@ extralibs="-lm"
tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}"
case "$tag" in
*DragonFly*|*BSD*)
- ld=${CC9:-gcc}
+ ld="${CC9:-gcc} $CC9FLAGS"
userpath=true
extralibs="$extralibs -lutil"
;;
*OSF1*)
- ld=${CC9:-cc}
+ ld="${CC9:-cc} $CC9FLAGS"
userpath=true
extralibs="$extralibs -lutil"
nmflags="-B"
;;
*Linux*)
- ld=${CC9:-gcc}
+ ld="${CC9:-gcc} $CC9FLAGS"
userpath=true
extralibs="$extralibs -lutil -lresolv -lpthread"
;;
*Darwin*x86_64*)
- ld="${CC9:-gcc} -m64"
+ ld="${CC9:-gcc} -m64 $CC9FLAGS"
;;
*Darwin*)
- ld="${CC9:-gcc} -m32"
+ ld="${CC9:-gcc} -m32 $CC9FLAGS"
;;
*SunOS*)
- ld="${CC9:-cc} -g"
+ ld="${CC9:-cc} -g $CC9FLAGS"
extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
# Record paths to shared libraries to avoid needing LD_LIBRARY_PATH
for i in "$libsl $@"
@@ -61,7 +61,7 @@ case "$tag" in
esac
;;
*AIX*)
- ld="${CC9:-xlc_r} -g -O0"
+ ld="${CC9:-xlc_r} -g -O0 $CC9FLAGS"
nmflags="-A -B"
extralibs="$extralibs -lpthread"
;;