Commit Graph

268 Commits

Author SHA1 Message Date
mrg
a9f7df428e pass -Wno-error=implicit-fallthrough for zlib.c.
XXX: consider using copts.mk for various warning/copt flags passed
in kernel builds currently set via 'makeoptions' in files.* files.
this is suboptimal, as those all get embedded into the kernel with
config_file.h.
2019-02-05 08:33:25 +00:00
pgoyette
d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
rin
e9ac1fc994 - Determine KERN_AS automatically depending on whether OPT_MODULAR is
set or not, in the same way as libcompat.

- Specify OPT_MODULAR in the port Makefile instead of KERN_AS.

Now, KERN_AS=library is used for kernels without module(7) for all ports.

OK christos
2018-09-22 12:24:01 +00:00
riastradh
84ec051ab9 Add CFLAGS, CPPFLAGS, and CWARNFLAGS from options to .c files. 2018-08-27 05:35:22 +00:00
joerg
9d01073d28 Restrict -fno-delete-null-pointer-checks to GCC. 2018-02-17 22:47:14 +00:00
mrg
fa27b654ce use -fno-delete-null-pointer-checks for kernels. 2018-02-13 09:50:35 +00:00
christos
b73f1c7610 - Coverity does not like -std=gnu99
- Another lose is that you need to manually edit the compiler XML to add
  all the kernel options because cov-configure barfs because it tries to
  test the compilation environment thinking that we are userland even
  when options like -ffreestanding are present.
2018-01-22 17:38:46 +00:00
martin
9f8ff67109 We use .BEGIN for our own cleanup and won't ever need DTS support - so
avoid inclusion of dts.mk by defining _SKIP_DTS
2017-12-04 09:44:33 +00:00
christos
1f3e5b1b5c Move the dts rule to a separate file and add dependencies handling. 2017-07-15 15:20:52 +00:00
jmcneill
1b047987b1 Add support for dts files outside of external/gpl2. 2017-07-13 01:17:03 +00:00
christos
20db6eee6d Assign DTB files to a variable so we can make -V DTB 2017-06-17 17:08:49 +00:00
jmcneill
77f306ac09 Add support for building DTB files during kernel build, from christos. 2017-06-15 21:41:01 +00:00
joerg
f9c2736326 Disable a couple of warnings until further investigation. 2017-01-11 12:19:43 +00:00
christos
6be7068cf1 Move to ssp.c suggested by uebayasi@ 2017-01-08 17:10:35 +00:00
christos
65ce4b4f2f Add COPTS for xhci.c, since the do_command_locked causes a spurious stack
proector warning.
2017-01-08 05:02:08 +00:00
christos
f83bb9fcab Collect a list of kernel swap files to be removed (Yorick Hardy) 2017-01-04 21:37:46 +00:00
christos
393981f1b2 match the M* and N* targets. 2017-01-04 19:55:06 +00:00
christos
772001de84 PR/51772: Yorick Hardy: Don't hard-code "netbsd", use ${.TARGET} consistently. 2017-01-04 15:43:04 +00:00
riastradh
617d199e69 Use && to fail early if subcommands of kernel link fail.
(Remind me why we string together shell commands instead of just
using make targets?)
2016-04-09 18:51:44 +00:00
christos
e77b077223 use commands() instead of target() because assym.mk creates all the targets
unconditionally.
2015-11-27 20:59:47 +00:00
christos
8089a0f85d PR/50483: David A. Holland: fix building of assym.d:
1. use += to add to DEPS
	2. move inclusion of rules mk. files before the rules are defined
	   so that variables are set.

Now we get on amd64:

	mkdep: ignoring acpi_wakeup_low.d: No such file or directory
	mkdep: ignoring amd64func.d: No such file or directory
	mkdep: ignoring busfunc.d: No such file or directory
	mkdep: ignoring copy.d: No such file or directory
	mkdep: ignoring cpu_in_cksum.d: No such file or directory
	mkdep: ignoring cpufunc.d: No such file or directory

because there are no rules to generate those, but it is harmless.
2015-11-27 20:33:55 +00:00
uebayasi
229ff8e5ba Clean up splash image build. Print messages when creating files. 2015-09-15 02:22:43 +00:00
uebayasi
133a84bb3c Indent. 2015-09-11 01:40:52 +00:00
uebayasi
a8bf1974db Fix dependency of *.d -> assym.h in `-S' mode. 2015-09-10 13:11:39 +00:00
uebayasi
b04184e8d4 Preserve the order of files in ${ALLFILES} -> ${OBJS} conversion. 2015-09-07 15:55:06 +00:00
uebayasi
c009404037 More build ordering. 2015-09-06 15:20:59 +00:00
uebayasi
9e0fc0ebb7 Don't pass ``-DCOPY_SYMTAB'' to ${CC}; it's replaced with opt_copy_symtab.h. 2015-09-06 14:35:01 +00:00
uebayasi
2d76cceae9 Move ldscript related code out of Makefile.kern.inc. 2015-09-06 06:41:14 +00:00
uebayasi
ed2bed87de Clean up. Move assym.h/vers.c related code out of Makefile.kern.inc. 2015-09-06 06:13:16 +00:00
uebayasi
347749a8bd Clean up. Move SSP-specific adjustment out of Makefile.kern.inc. 2015-09-06 04:42:06 +00:00
uebayasi
472997e0ab Allow MD to link libraries. Build rules are written in MD makefiles until
config(1) will support library properly.
2015-09-06 02:05:11 +00:00
uebayasi
ce4642ec41 Make config(1) output only ${ALLFILES}, selected input files, and pass it to
Makefile.kern.inc, where files are filtered by suffix.
2015-09-04 06:10:47 +00:00
uebayasi
bc619545b7 Add generated *.c files (devsw.c and ioconf.c) to ${CFILES} by config(1)
internally.  ${MI_CFILES} in Makefile.kern.inc is no longer needed.
2015-09-03 14:23:52 +00:00
uebayasi
361a961386 Prepare for relative ${MD_OBJS}. 2015-09-03 12:31:16 +00:00
uebayasi
eaa72931c4 Move `all' target definition to Makefile.kern.inc. 2015-09-03 09:28:00 +00:00
uebayasi
caf44640e0 Kernel depends on swap<kernel>.o too. 2015-09-03 06:24:15 +00:00
uebayasi
fc3a975cb5 Sort dependendy to keep alphabetical build order. 2015-09-03 06:10:53 +00:00
uebayasi
d891b756ba Define kernel dependency in Makefile.kern.inc. 2015-09-03 06:09:46 +00:00
uebayasi
d01cbd6db6 Rename ${COMPILE.c} to ${KCOMPILE.c} to avoid potential conflicts with those
in sys.mk.  Define .go/.po suffix rules.
2015-09-03 04:17:55 +00:00
uebayasi
10a39df2f6 Refactor. 2015-09-03 03:47:25 +00:00
uebayasi
1d638ab7bf Simplify. Wrap long lines. 2015-09-03 01:40:06 +00:00
uebayasi
1587c3fa3a Stop ordering objects alphabetically now that I am sure I can fix fallouts. 2015-09-03 01:30:18 +00:00
uebayasi
185d99e39a Build conf/param.c normally. 2015-09-03 01:09:38 +00:00
uebayasi
4c17ec775b Fix link of kernels whose name don't start with "netbsd*". 2015-09-02 23:03:41 +00:00
uebayasi
350968d06a Build param.c under conf/ using suffix rules in `-S' mode. 2015-09-02 15:35:52 +00:00
uebayasi
4af08e031f Clean up `swap<kernel>.o' handling. 2015-09-02 15:29:23 +00:00
uebayasi
7a8426662a Define ${OBJS} in `Makefile.kern.inc'. Relative paths are not truncated
(a/b/c/x.c -> x.c) in `-S' mode.  Don't provide some explicit rules for `-S'
mode for safety.
2015-09-02 14:17:03 +00:00
uebayasi
558aab1be0 Output relative path for ${CFILES} and ${SFILES} in generated `Makefile'.
`Makefile.kern.inc' knows how to deal with $S prefix, so don't bother it in
config(1).
2015-09-02 13:42:14 +00:00
uebayasi
054cd04942 Add swap<kernel>.o to common ${SYSTEM_LD} as it is always linked. 2015-09-02 12:38:48 +00:00
uebayasi
d9bb176d5f Clean up some rules and make them less error prone. 2015-09-02 03:22:41 +00:00