Commit Graph

223 Commits

Author SHA1 Message Date
christos
d55974ab54 Move HAS_SSP and USE_SSP out of bsd.sys.mk. They did not belong there in
the first place. Rename HAS_SSP to HAVE_SSP to match existing practice.
2013-01-27 02:31:44 +00:00
christos
84be08d909 CTFCONVERT complains and coredumps for c++ 2013-01-26 22:04:18 +00:00
christos
08c1bf572c CTFCONVERT me harder. 2013-01-26 21:49:20 +00:00
joerg
666a12c72f Revert two unintentional changes from the PPC tests 2012-09-23 19:20:44 +00:00
joerg
2b3d1ee8a7 Update LLVM/Clang snapshot to r164464. This adopts the GCC options for
the SSP parameters and a not-yet-default rewrite of SROA.
2012-09-23 17:22:22 +00:00
riz
fb761f7bcb Remap X11SRCDIR to /usr/xsrc for the MKREPRO=yes case. 2012-09-05 22:40:30 +00:00
joerg
8b623749df Make linker warnings fatal by default for Clang, even if not building
GCC.
2012-08-10 16:11:43 +00:00
abs
5659783547 Whatever "-Wl,--fatal-warnings" get-out-of-jail-free card gcc-4.5 gets,
give the same treatment to gcc-4.1.
2012-06-25 16:48:55 +00:00
matt
a969b57018 Add WARNS=5 to enable -Wold-style-definitions 2012-03-20 21:48:20 +00:00
christos
4254cd9bee allow file-specific lint flag additions 2012-03-17 18:02:41 +00:00
joerg
f03aabbcc7 Don't error out for non-literal format strings with Clang until the rest
of the __printflike changes are in the tree.
2012-03-15 15:04:23 +00:00
joerg
17cb70e7b4 Decouple HAVE_LLVM from HAVE_GCC. For GCC, add -Wno-format-zero-length
when -Wformat is used.
2012-03-15 02:00:52 +00:00
christos
c37ad7ee66 Provide a way to override the default objcopy flags for library modules. 2012-01-28 21:32:13 +00:00
chs
8c0bc12273 switch everything except vax to gcc 4.5.
switch m68k to -Os since -O2 produces much bigger code
with gcc 4.5 than it did with gcc 4.1.
2011-10-31 14:20:11 +00:00
joerg
9b296e99bc Decouple clang and gcc handling a bit. Add -Wmissing-noreturn for clang
builds. GCC complains about about non-void functions not returning,
which is quite a bit more bogus, so don't enable it for that.
2011-09-20 09:11:06 +00:00
christos
875018bf8a add -Wformat=2 2011-08-23 05:22:25 +00:00
uwe
cc65ce8e22 Augment previous. Use -Wno-uninitialized for sh3 in general, not just
dreamcast.  The problem is not sh3 per-se, but the fact that for sh3
we use -Os by default.  That causes false positives since gcc doesn't
detect that e.g. a variable is set and used under the same condition
in different "if" statements.

XXX: This should probably check for optimization level instead,
though, for all I know, phase of moon might be a contributing cause
too.

XXX2: MACHINE_CPU is set in bsd.own.mk and is not available here, so
we have to spell the test in terms of MACHINE_ARCH.
2011-07-08 20:59:53 +00:00
mrg
5f311ecb4a # XXX GCC 4.5 for dreamcast is extra noisy for cases it should be better with
workaround via: CFLAGS+=      -Wno-uninitialized
2011-07-08 03:29:52 +00:00
mrg
f53e78abc3 XXX: for now, disable fatal linker warnings for GCC 4.5. 2011-06-29 08:10:05 +00:00
mrg
8f161cd6d3 remove all the code that supported HAVE_GCC=3. mostly from chuq. 2011-06-20 06:52:36 +00:00
joerg
78ec0254df Reorder CWARNFLAGS and -Werror in CFLAGS to allow CWARNFLAGS and by
extension CWARNFLAGS.${SOURCE} to override it selectively.
2011-05-30 13:56:34 +00:00
joerg
70e887f5ec Add an alternative to NOGCCERROR for clang. 2011-05-30 13:47:01 +00:00
joerg
a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
joerg
7e217e1f53 Restrict -Wno-non-template-friend and -Wno-pmf-conversions to GCC. 2011-05-25 15:02:25 +00:00
joerg
175c50ac7e Add support for compiler specific warning flags with
CWARNFLAGS.${COMPILER}
2011-05-25 15:01:08 +00:00
joerg
0cd1e39abe Disable Clang's array boundary checker for now (hits e.g. in GCC and BDB) 2011-05-23 14:32:05 +00:00
joerg
1742cf8828 Simplify a bit 2011-05-22 20:52:12 +00:00
joerg
7cfd64c6f6 Split SSP parameters on a per-compiler base 2011-05-22 20:49:16 +00:00
joerg
e7d3de7e55 No -Wno-traditional for clang. 2011-05-22 20:24:46 +00:00
christos
6bbebf8328 Enable c99 mode by default.
This has the side effect of complaining for missing prototypes
implicit type declarations and missing return statements.

NB:	I've only ran a build on amd64, so other platforms MI code might break.
	If you can't wait for me to fix them, revert this commit.
2011-05-17 01:12:34 +00:00
joerg
762325586d If MKREPRO, transform ${NETBSDSRCDIR} to /usr/src and ${DESTDIR} to /
for the purpose of the C preprocessor.  This avoids leaking the source
path into the final binaries.
2010-12-25 18:56:44 +00:00
pooka
1ceaafde2e dial . for operator 2010-04-21 16:09:11 +00:00
christos
21003f688c don't try to build PIE binaries when LDSTATIC 2010-04-21 15:07:20 +00:00
darran
61fb3737eb DTrace: Add CTF generation to the make framework. Only enabled when
MKDTRACE=yes.
2010-03-02 20:49:18 +00:00
mrg
6540a82b31 brace a --fatal-warnings with a NOGCCERROR check. 2009-12-15 04:03:55 +00:00
matt
1e301281a1 Merge from matt-nb5-mips64 2009-12-14 01:00:46 +00:00
christos
2561f2eece Don't add the .h rule for yacc if we are not really building (-n) 2009-12-13 18:40:50 +00:00
uebayasi
d166c4bf28 Support "extsrc", externally added programs and libraries. Users can write
their own reach-overs, cross-build, install, and get set files just like base
and X11 / X.org.  (These sets are not included as TNF releases.)
2009-11-30 16:13:22 +00:00
tron
d6e33297fb Revert SSP changes because at least rmind@, pooka@ and haad@ consider
5% more performance more important than the gain in security.
2009-11-12 14:30:34 +00:00
tron
559872b175 Invent a new flag "USE_SSP_DEFAULT" which defines whether we want to use
SSP for building the whole source tree. Set this to "yes" for
NetBSD/amd64 and NetBSD/i386. It is now possible to get the old
behavior (build libs and certain programs with SSP) by setting
"USE_SSP_DEFAULT" to "no".
2009-11-12 13:22:34 +00:00
tron
47db09157e Fix broken conditional to get manual builds (not using "build.sh")
working again.
2009-11-12 08:51:50 +00:00
tron
840a46601a Enable Stack Smash Protection (SSP) by default for NetBSD/amd64 and
NetBSD/i386 as previously discussed on the "port-amd64" and
"port-i386" mailing lists. No objections from the core team.

Thanks a lot to Tobias Nygren for helping me with the benchmarking
and to Christos Zoulas for fixing SSP problems in cgd(4).
2009-11-11 16:35:45 +00:00
skrll
29d2620fc4 IA64 doesn't have SSP. 2009-11-09 15:58:09 +00:00
lukem
c0d472c616 Enable -Wsign-compare for WARNS=4 (and above).
Test compiled on i386 and amd64; there may be some stragglers
on other platforms.

Note: -Wall has this by default in gcc4, and we explicitly disable it at
WARNS=1 (i.e., -Wall -Wno-sign-compare).  A goal is to reduce the WARNS level
where this feature is enabled, so we can eventually remove -Wno-sign-compare.
2009-02-12 22:49:05 +00:00
apb
2962a4be8e Always define TOOL_* variables in bsd.own.mk, not in bsd.sys.mk.
Previously, they were defined in bsd.own.mk if USETOOLS=yes, but in
bsd.sys.mk if USETOOLS!=yes.  This caused makefiles that did this:

	.include <bsd.own.mk>
	FOO != ${TOOL_BAR} args...

to work in the USETOOLS=yes case but not in the USETOOLS!=yes case.
2008-10-26 23:13:24 +00:00
apb
6710f563cb Set HOST_SH?=/bin/sh unconditionally. Previously, it was conditionally
set to /usr/bin/bash if HOST_CYGWIN was defined, but now build.sh
tries to set HOST_SH appropriately.

Remove the HOST_CYGWIN variable, which was not used for any other purpose.

Document that HOST_SH should be an absolute path.

THis was proposed in tech-toolchain.
2008-10-26 15:51:20 +00:00
apb
8140020f95 Remove AWK variable, which is no longer used. All previous users
now use TOOL_AWK instead.
2008-10-25 18:29:03 +00:00
apb
60f5d15a00 Define TOOL_AWK. 2008-10-19 19:44:47 +00:00
christos
81dd08df0d handle assembly files for MKPIE 2008-10-19 15:22:50 +00:00
christos
18c51ff05b Provide a way for a program to override the PIE flags. 2008-10-16 14:36:42 +00:00