Commit graph

66 commits

Author SHA1 Message Date
Ben Huntsman
6c4260fc67 bin/9c, bin/9l: Re-enable optimization on AIX. 2021-08-30 19:40:49 -04:00
Russ Cox
4692dd4786 9c: drop PLAN9PORT_ASAN
It is no longer special.
2020-12-30 08:38:57 -05:00
Russ Cox
99dee78c2d all: remove $OBJTYPE from build
Now that we assume pthreads, the only assembly
left is in libmp and libsec.
We only ever added assembly for 386.
The portable C code is fine for plan9port.
2020-12-30 07:53:28 -05:00
Russ Cox
69439fae67 9c: use -fcommon for clang
Fixes #469.
2020-12-30 00:06:35 -05:00
Anthony Sorace
291f741178 9c, 9l: updates for macOS arm64. 2020-09-27 06:45:02 -04:00
Russ Cox
fa157263c8 9c: fix tab 2020-05-18 22:38:54 -04:00
Russ Cox
9444b8e4bc 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.
2020-05-17 20:15:41 -04:00
Ben Huntsman
4982d4ebc3 all: update build scripts to fix AIX XL/C compatibility 2020-05-07 20:36:03 -04:00
sean
c1c1b5267f 9c: added explicit -fcommon to gcc defaults.
Version 10 of gcc enforces -fno-common which breaks a lot of things.

This fix reverts to the pre-10 behaviour. The real fix is to clean up
stray redefinitions which should be declarations.
2020-04-30 20:51:47 +02:00
Russ Cox
cb8f735786 all: remove Linux 2.4 vs 2.6 detection
Linux 2.4 is dead.
(The libthread code hasn't worked for Linux 2.4 for a long time.)
2020-01-19 23:04:58 -05:00
Russ Cox
fafa622a5b all: fix or silence various gcc warnings
As usual, gcc finds some real problems but also reports a ton
of noise. Fix the problems and quiet the noise.
2020-01-12 15:07:42 -05:00
Martin Kühl
194178b578 9c: Fix case patterns for DragonFly and other BSDs
POSIX does not support grouping in case item patterns.
Installing with a strict POSIX shell fails with:

/usr/local/plan9/bin/9c: line 82: syntax error near unexpected token `('
/usr/local/plan9/bin/9c: line 82: `*(DragonFly|BSD)*gcc*)	usegcc ;;'

This change expands the patterns to work around the limitation.

See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10
(and search for case_clause)
2020-01-07 18:13:02 -05:00
Leonid Bobrov
cf6b778799 INSTALL, 9c, 9l: improve handling of *BSD (#302) 2020-01-07 14:51:42 -05:00
Jason Felice
436ff26c36 9c, 9l: use $TMPDIR if available (#272)
NixOS sandboxed builds (at least on Mac) don't have access to /tmp,
and this should be better POSIX.
2019-11-11 17:06:55 -05:00
Russ Cox
310ae03327 all: fix or silence all INSTALL warnings on macOS
Should be a clean build now.

Change-Id: Id3460371cb5e8d4071f8faa9c2aec870d213a067
Reviewed-on: https://plan9port-review.googlesource.com/2781
Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-06 21:37:31 +00:00
David du Colombier
6c7443a653 fix clang 3.4 warnings and ignore uninteresting ones
fixed warnings:
src/cmd/fossil/disk.c:37:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/cmd/fossil/disk.c:38:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/cmd/fossil/disk.c:39:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/cmd/fossil/disk.c:40:13: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/cmd/fossil/disk.c:41:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator]
src/libndb/ndbreorder.c:41:55: warning: for loop has empty body [-Wempty-body]

ignored warnings:
src/cmd/acid/dbg.y:393:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/bc.y:1327:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/bc.y:1327:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/grep/grep.y:420:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/grep/grep.y:420:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/hoc/hoc.y:692:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/hoc/hoc.y:692:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/lex/parser.y:886:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/rc/syn.y:303:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/cmd/units.y:1003:9: warning: array index -1 is before the beginning of the array [-Warray-bounds]
src/libregexp/regcomp.c:19:16: warning: variable 'reprog' is not needed and will not be emitted [-Wunneeded-internal-declaration]

LGTM=rsc
R=rsc
https://codereview.appspot.com/158250043
2014-10-21 14:22:12 +02:00
Shenghou Ma
20035ed43c all: DragonFly port.
Fix compilation problems, libdraw still doesn't work right yet.

LGTM=rsc
R=rsc
https://codereview.appspot.com/67820046
2014-02-27 23:17:47 -05:00
Russ Cox
b0ae8a46a0 9c: support clang on Mac
R=rsc
http://codereview.appspot.com/6744055
2012-10-21 12:01:13 -04:00
Russ Cox
34d629c857 9c: add more clang warning silencers, use signed chars
R=rsc
http://codereview.appspot.com/6741053
2012-10-20 13:51:01 -04:00
Russ Cox
fc567f476a build: OS X 64-bit build
R=rsc
http://codereview.appspot.com/4838047
2011-08-02 14:28:04 -04:00
Russ Cox
af0dea4531 SunOS fixes (thanks Aram Hăvărneanu)
R=rsc, rsc
http://codereview.appspot.com/4271084
2011-05-17 18:48:42 -04:00
Nikolai Saoukh
0c6074b692 9c, 9l: allow CC9=clang
R=rsc
CC=codebot
http://codereview.appspot.com/217045
2010-02-22 16:53:37 -08:00
Russ Cox
fa662c9571 INSTALL: fix build on Snow Leopard
http://codereview.appspot.com/116073
2009-09-11 13:51:50 -04:00
Russ Cox
e6c837d612 merge 2009-07-14 22:55:52 -07:00
Russ Cox
eb1392208c 9c: another gcc, another useless warning 2008-12-06 15:34:59 -08:00
Russ Cox
7733377c43 9c: grep away Apple SetCursor/InitCursor warnings 2008-07-09 14:36:32 -04:00
Russ Cox
5f6612babb merge 2008-05-31 12:09:43 -04:00
rsc
f7954492d5 define __Linux24__ for mount-Linux.c in vbackup 2006-05-05 15:29:07 +00:00
rsc
065cba5bac no more pedantry 2006-04-04 19:11:50 +00:00
rsc
cbeb0b26e4 Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms. 2006-04-01 19:24:03 +00:00
rsc
e2c0697736 undo 2006-03-20 04:04:21 +00:00
rsc
17157e4aa8 update lucida 2006-03-20 02:25:59 +00:00
rsc
746d2e1ab0 adapt to gcc error messages 2006-02-14 19:38:15 +00:00
rsc
6637b803f6 Make install less chatty, more useful. 2005-11-28 21:14:44 +00:00
rsc
77fd60a177 shut up openbsd 2005-11-27 23:58:32 +00:00
rsc
3b8f0b79d7 errors to stderr 2005-07-22 18:56:31 +00:00
rsc
593ac8b3a6 do not process stdout, to play nice with ccache 2005-07-22 12:37:20 +00:00
rsc
eacba19d74 add uniq 2005-03-18 19:32:06 +00:00
rsc
4b089276b8 even more quieting of gcc 2005-03-18 18:50:08 +00:00
rsc
2548dc0d11 even quieter gcc 2005-02-16 17:14:01 +00:00
rsc
b49d0f4b37 initial stab at ipso 2005-02-13 18:05:40 +00:00
rsc
7637c81af0 silence gcc chatter 2005-02-12 16:48:46 +00:00
rsc
4fc1f5f949 bad $variable names 2005-01-19 16:45:27 +00:00
rsc
eea5f6adfe source $PLAN9/config 2005-01-17 20:57:57 +00:00
rsc
9e863cf561 add -mt for sun 2005-01-07 07:16:53 +00:00
rsc
d756dc5e15 better status handling for sun 2005-01-07 07:15:31 +00:00
rsc
ead3e31153 9c: ignore autolib symbols
9l: use autolib symbols
2005-01-04 21:13:58 +00:00
wkj
89a4515039 GC now-unused FreeBSD-specific #defines. 2004-12-29 01:32:12 +00:00
rsc
7033e49de1 set flag for freebsd 5 2004-12-28 23:14:43 +00:00
rsc
fa267621f8 match Linux 2.6 kernel better 2004-12-24 07:12:30 +00:00