Commit Graph

2361 Commits

Author SHA1 Message Date
mrg
26f35dd6b6 remove the build support for GCC 4.1, and any hacks i found for it.
there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)
2014-06-13 01:17:45 +00:00
skrll
90a8b32c92 Switch sh3 to gcc 4.8. My landisk just survived two atf runs through
/usr/tests with

Summary for 587 test programs:
    3691 passed test cases.
    50 failed test cases.
    27 expected failed test cases.
    137 skipped test cases.
2014-06-06 21:04:02 +00:00
martin
84d9bd2e1d Switch ia64 to gcc 4.8 2014-06-06 20:24:03 +00:00
matt
96c7d9c422 Switch VAX to default to GCC 4.8 2014-06-05 21:05:42 +00:00
joerg
4692c72dc2 If clang is requested for i386, amd64 or eARM, also build libc++. 2014-05-30 18:39:29 +00:00
joerg
b983dfb658 Always use our exception handling code for eARM. 2014-05-30 18:31:58 +00:00
joerg
d4f1ac8b3b Remove platform support list for libc unwinder, just keep comment about
ia64 state.
2014-05-30 18:30:32 +00:00
plunky
6fbec3793c use -Wno-traditional only for GCC rather than !CLANG 2014-05-27 16:16:01 +00:00
plunky
4eab4174d7 we use C99 syntax but with some GCC extensions, so signal that depending
on the compiler in use
2014-05-27 16:14:03 +00:00
matt
acf5e54066 Since the majority of architectures uses GCC 4.8, make it the default.
Only ia64, m68k, 32-bit powerpc, and sh3 still use GCC 4.5
2014-05-23 18:51:31 +00:00
skrll
3d91f85ed1 Under "switch it" instructions from matt@ make mips use gcc 4.8 2014-05-23 18:35:36 +00:00
martin
b179bc7a0f Switch powerpc64 architectures over to gcc 4.8.
OK: mrg@
2014-05-20 09:59:20 +00:00
joerg
767787d382 Use compiler-rt in libc for Clang on NetBSD/ARM as well. 2014-05-17 23:32:32 +00:00
joerg
38febcf304 Structure HAVE_LIBGCC condition similar to HAVE_LIBGCC_EH. 2014-05-17 23:31:57 +00:00
joerg
d47b3f5c30 Mark unwinding as supported for eARM. 2014-05-16 00:19:00 +00:00
phx
3cf2564bdb Use TOOL_NCDCS to turn an ibmnws kernel automatically into a valid NCD
firmware image for netbooting. This is still a valid ELF kernel, but with
a patched CRC checksum and image size included.
2014-05-08 13:58:34 +00:00
martin
ecad429601 As discussed on tech-toolchain, offer a new make variable MKKDEBUG - if
set to "yes", kernel builds will gain debug info and a netbsd.gdb will
be created (same as adding "makeoptions DEBUG=-g" to the config file).
2014-05-05 19:06:29 +00:00
wiz
5f9e0f41f2 Fix typo in previous. 2014-04-26 20:25:07 +00:00
joerg
380ce570fd Add initial unwind support for MIPS and MIPS64. 2014-04-26 20:15:48 +00:00
pooka
d6b3d0da5a allow use with linkers that don't support --warn-shared-textrel
(Solaris, OpenBSD)
2014-04-24 00:14:59 +00:00
joerg
61731496eb Retire USE_COMPILERCRTSTUFF=yes. 2014-04-22 13:20:58 +00:00
joerg
f76ae5ef4f Basic unwind support for HPPA. 2014-04-19 21:21:24 +00:00
christos
4730dabc79 Add -g (gnu) so lint recognizes __attribute__ 2014-04-18 00:37:46 +00:00
joerg
a997683cbb Add basic Alpha support to libunwind. 2014-04-15 18:40:34 +00:00
joerg
7209984597 Add initial unwind support for SPARC/SPARC64. 2014-04-15 11:44:26 +00:00
matt
c5ab5d969b Back changes from 1.349 on since the -Wl,-x bug has been fixed in binutils. 2014-04-11 16:51:43 +00:00
christos
2e21bd91e3 explain what's going on, add another kludge for -g 2014-04-11 15:56:09 +00:00
plunky
daae7d153c the value of HOST_MKDEP previously depended on USETOOLS;
make it do so again, and centralise the USETOOLS=no case
into bsd.host.mk
2014-04-10 19:02:18 +00:00
christos
cb8da48e03 Since the objcopy -x removes debugging symbols, delay that if we are building
debugging libraries and do the stripping with the debug symbol separation
step.
2014-04-09 19:23:09 +00:00
christos
eec8658016 change -x to OBJCOPYLIBFLAGS like everywhere else. 2014-04-09 16:29:08 +00:00
christos
f8008b9438 convert i386 to gcc-4.8. boot blocks tested by booting netbsd/i386 multiuser on:
qemu
    dell precision t5400
    sony vaio vgn250p
2014-04-05 02:22:56 +00:00
matt
5cb8c9ae75 Using -Wl,-x breaks build ARM BE8 shared libraries by striping the $a/$d/$t
symbols before the linker can use them.  Instead do ${OBJCOPY} -x ${.TARGET}
afterwards.
2014-04-04 05:10:15 +00:00
christos
69aa090e6b Add NOCTF 2014-04-04 01:20:12 +00:00
riastradh
52c664e0cd Elide broken exists tests for TOOL_CTFCONVERT and TOOL_CTFMERGE.
Either you set MKCTF=yes and they should exist, or you set MKCTF=no
and it doesn't matter.  If MKCTF=yes and they don't exist, something
is broken, and this should fail noisily, not silently.
2014-04-03 18:29:11 +00:00
riastradh
3938a82dfd By default define CTFCONVERT and CTFMERGE to be no-ops in sys.mk.
Don't test for /usr/bin/ctfconvert or /usr/bin/ctfmerge -- that is
completely bonkers and breaks the build if the host's ctfconvert and
ctfmerge are too old.

Strip the broken conditionals in the .c.o &c. rules.

bsd.own.mk will override CTFCONVERT and CTFMERGE with TOOL_CTFCONVERT
and TOOL_CTFMERGE if MKCTF=yes.

XXX The way CTFCONVERT and CTFMERGE are integrated into the rules is
bogus -- it is not safe to interrupt them.  We need some intermediate
object to do this right.

Please let me know if I broke anything with this -- I am not an elvin
or dwarven wizard, nor a dtrace expert.  But this has been breaking
builds for ages now and nobody else seems to want to do anything
about it.
2014-04-03 18:27:37 +00:00
joerg
8886a873b8 Support SH3 in our unwinder. 2014-04-02 22:34:29 +00:00
mrg
40f1a24e2d make pkg-config files be cleaned by "make clean" 2014-03-31 01:59:36 +00:00
ozaki-r
1339b2cc13 Add MKCTF
This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.
2014-03-25 09:52:55 +00:00
joerg
0378fc4757 Add m68k support to our unwinder. 2014-03-24 21:25:03 +00:00
mrg
c4dae12d14 allow for .pc substitutions to be listed per makefile
(could maybe do per-target, as well.)  fix the remaining
substitutions for xcb-proto, fontconfig and xorg-server.

(XXX: move many per-package-specific parts out of
bsd.x11.mk itself, into the relevant Makefile.)
2014-03-23 20:40:18 +00:00
tron
cb1db61165 Fix generation of pkg-config(1) files. Patch from Ryo ONODERA via
"current-users" mailing list.
2014-03-23 19:49:52 +00:00
mrg
375467851c substitute several more values for .pc files:
+ 		s,@LIBXML2_CFLAGS@,,; \
+ 		s,@ICONV_CFLAGS@,,; \
+ 		s,@PACKAGE@,${PKGDIST},; \
+ 		s,@PKGCONFIG_REQUIRES@,xx,; \
+ 		s,@PKGCONFIG_REQUIRES_PRIVATELY@,xx,; \
+ 		s,@ERRORDBDIR@,${X11LIBDIR},; \
+ 		s,@EXPAT_CFLAGS@,,; \
+ 		s,@FREETYPE_CFLAGS@,-I${X11ROOTDIR}/include/freetype2 -I${X11ROOTDIR}/include,; \
+ 		s,@SDK_REQUIRED_MODULES@,xproto >= 7.0.17 randrproto >= 1.2.99.3 renderproto >= 0.11 xextproto >= 7.1.99 inputproto >= 1.9.99.902 kbproto >= 1.0.3 fontsproto," \
2014-03-20 22:24:32 +00:00
joerg
056a4fb13e libunwind supports vax now. 2014-03-18 13:10:27 +00:00
mrg
fba338c9bb add libpthread-stubs. 2014-03-17 07:11:40 +00:00
mrg
c010f18e24 add dri2proto and presentproto. 2014-03-16 23:07:42 +00:00
joerg
6ba3d41e6f libunwind supports PowerPC. 2014-03-16 13:34:33 +00:00
joerg
4ccb06d5e3 Add quotes. 2014-03-12 01:49:58 +00:00
joerg
db0508b291 More readable condition. 2014-03-12 00:07:33 +00:00
christos
2aa52e016a switch amd64 to gcc-4.8 2014-03-11 23:22:36 +00:00
pooka
495782ee0e Move the "is arch capable of loading native kernel modules into
rump kernel" clauses from bsd.own.mk to Makefile.rump.  Also,
add a rump_nativeabi_p() call to determine if rump kernel is
compiled with native ABI support.
2014-03-10 22:38:53 +00:00
nakayama
23f5183fd7 -mcmodel option is CPU specific not machine specific. 2014-03-10 12:13:14 +00:00
matt
69e3c65933 Fix inverted test MKCOMPATMODULES 2014-03-09 19:58:43 +00:00
christos
e946daf13f XXX: use only thread for ctfmerge 2014-03-09 19:10:01 +00:00
christos
1242d4e5d5 Elide ctfmerge bug. 2014-03-09 18:01:06 +00:00
christos
199409cf03 let's see if the new dwarf library can handle dwarf 4 2014-03-09 18:00:51 +00:00
skrll
4aa91ecac7 Switch arm to gcc 4.8
OK matt@
2014-03-07 16:22:24 +00:00
martin
3412e5549c Switch alpha over to gcc 4.8 2014-03-07 08:31:05 +00:00
matt
afc10638c6 Make MKCOMPAT default to yes for powerpc64.
Make MKCOMPATMODULES defaultt to no for evbppc && powerpc64.
2014-03-07 06:01:34 +00:00
mrg
bb0ad61c84 switch sparc* to GCC 4.8. 2014-03-06 11:21:05 +00:00
skrll
02c42edde9 Switch hppa to gcc 4.8 2014-03-06 09:03:41 +00:00
joerg
3dfb7837bb When using Clang, disable integrated assembler for genassym. It creates
syntactically invalid assembler, which is normally not a problem as it
is also using -S.
2014-03-04 21:06:02 +00:00
christos
aca5beab65 If we are compiling with -g and using gcc4.8 and dtrace downgrade
dwarf generation to version 2 for now.
2014-03-02 22:22:05 +00:00
matt
f5f79614ed Add OBJECT_FMTS which is a list of object formats supported by the MACHINE_ARCH 2014-03-02 03:33:29 +00:00
tsutsui
e9a418e5e7 Switch x68k to X11FLAVOUR=Xorg, including a working monolithic X68k server.
Confirmed that "build.sh -m x68k -x release" gets no error.
2014-03-01 20:34:17 +00:00
martin
49c0570cfc Make powerpc64 use Matt's new csu stuff 2014-02-28 09:42:33 +00:00
mrg
93fdebb1e5 remove the GCC 4 EXTERNAL_GCC_SUBDIR, and switch GCC 4.8 to use gcc.old. 2014-02-27 20:43:33 +00:00
martin
6d0f155ac4 For now, provide a path to the gcc 4.1 distribution as well 2014-02-27 10:42:30 +00:00
mrg
dc63ee27d6 put the new EXTERNAL_GCC_SUBDIR under MKGCC. 2014-02-26 05:51:11 +00:00
christos
f7ecbf3884 powerpc64 needs USE_COMPILERCRTSTUFF=yes 2014-02-26 03:09:42 +00:00
mrg
e849bbac94 define EXTERNAL_GCC_SUBDIR based upon HAVE_GCC, for GCC >= 4.5,
and use it in the one place (bsd.lib.mk) it's used in share/mk.
2014-02-26 02:51:02 +00:00
skrll
6d3ceb1d61 Rename NetBSD/hp700 to NetBSD/hppa.
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
joerg
a8d5e9bfd0 Use small code model for LLVM on SPARC64, it should be equivalent to
GCC's medlow.
2014-02-21 20:44:03 +00:00
tsutsui
dfc90f22bb Switch ews4800mips and newsmips to Xorg server.
There is ~no user of X11R6 Xservers except a few developers on these ports
and Xorg wsfb server should work with manual keymap settings.
2014-01-31 18:17:27 +00:00
martin
fe2c82ab03 As discussed on tech-toolchain: untill gcc is fixed (or our ABI changed, ...)
make stack protection warnings non-fatal if using gcc 4.8 on sh3/m68k/vax.
2014-01-28 19:41:52 +00:00
apb
23e368546c Document TOOL_GZIP. 2014-01-27 07:57:28 +00:00
christos
af73cd2b49 For now, ignore errors from creating klinks. This is racy and you can get
it to trigger in 1/4 of the builds with -j 40 on a 24 processor box. Typical
error is:

    ln: machine/include: File exists
    *** Failed target:  .BEGIN
    *** Failed command: rm -f machine && ln -s /p/netbsd/cvsroot/src/sys/arch/vax/include machine
    *** Error code 1
    Stop.

Another approach to fixing this is to create a lockfile or adding other flags
to ln to change its behavior.
2014-01-22 15:19:05 +00:00
matt
5be5871ebb Add MKGCCCMDS to _MKVARS.yes after the loop. 2014-01-22 15:04:19 +00:00
matt
aab0ce25e7 Make MKGCCCMDS default mirror MKGCC. (if MKGCC is no, MKGCCCMDS must be no). 2014-01-21 16:40:24 +00:00
joerg
527d1fa144 Use a separate variable for the use of GCC's unwind code. 2014-01-18 01:08:56 +00:00
christos
5344ef6679 - Add a new bsd.host.mk that contains all the HOST_ variables extracted from
bsd.sys.mk and bsd.own.mk
- Add protection requiring that:
	1. bsd.sys.mk is not include from other Makefiles directly
	2. bsd.own.mk must be included before bsd.sys.mk since it
	   sets variables that bsd.sys.mk uses as conditionals.

This is step 1 of removing all variable settings from bsd.sys.mk and
leaving behind only rules. This way, the structure of a standard Makefile
is:
	variable overrides

	optionally include bsd.own.mk
	optionally include bsd.endian.mk

	variable settings that use variables defined in bsd.own.mk

	include a one or more rule .mk files (such as bsd.prog.mk etc)
2014-01-16 01:19:46 +00:00
christos
2b043c75b6 eliminate use of bsd.sys.mk from Makefiles 2014-01-16 01:15:32 +00:00
joerg
55c499f97a -shared-libgcc is a GCC option, so only use it for gcc. 2014-01-15 14:00:09 +00:00
joerg
937a61eb8d -Wl,-pie and -r don't agree with each other, so filter the former out. 2014-01-15 13:59:38 +00:00
christos
97d4e30936 use bsd.syscall.mk 2014-01-14 18:51:45 +00:00
apb
adecfa9d02 Document new default for MKARZERO. 2014-01-14 11:32:35 +00:00
apb
33295e8a08 Let MKARZERO default to the same value as MKREPRO, so callers
can set MKREPRO=yes and automatically get MKARZERO=yes.
2014-01-14 11:31:01 +00:00
apb
e50114d2aa Use parentheses in .if A && ( B || C || D || ... ) 2014-01-14 11:14:27 +00:00
christos
fca2a7349b not so fast, let's fix the tree first. 2014-01-10 16:20:14 +00:00
christos
b393459455 Add protection against direct inclusion of this file from other Makefiles.
This file is only intended to be included from the other rules files like
bsd.lib.mk or bsd.prog.mk. If you need things to be defined early, use
bsd.own.mk.
2014-01-10 16:16:57 +00:00
joerg
715627650d Non-literal format strings should be an error by default for clang. 2014-01-07 02:16:41 +00:00
christos
15db747847 disable ctf handling for the shuttle .c -> '' rule since we don't create
an object file to work on.
2014-01-02 19:25:08 +00:00
christos
d2c532bec7 redo the ctf stuff to handle the USETOOLS=never case correctly and explain
how.
2013-12-31 18:46:09 +00:00
matt
e3a958c021 Back out change for bsd.lib.mk which skips objcopy -x for BE ARM.
Change OBJCOPYLIBFLAGS to keep $a/$d/$t symbols on BE ARM.
2013-12-16 21:34:16 +00:00
skrll
84c03d543e Provide ARM_APCS_FLAGS on arm and earm. 2013-12-16 19:06:41 +00:00
joerg
69fd5d473d Move flags for ARM's APCS ABI into a common variable. Add some forces to
deal with limitations in the Clang <-> LLVM backend interaction to pick
the correct ABI and target assembler.
2013-12-15 18:08:37 +00:00
christos
6d47ec32bb centralize the rpcgen flags and set for BSD output 2013-12-15 00:28:45 +00:00
matt
a49b15d8d8 Don't strip local symbols for earmv7*eb images since that will break linking. 2013-12-13 02:47:45 +00:00
matt
732b0a7b58 Describe MACHINES.${MACHINE_CPU}. <fixme>
Add sparc64 to MACHINES.sparc since sparc64 can be build as sparc.
2013-12-06 23:14:15 +00:00
matt
70922e5c64 Add MACHINES.${MACHINE_CPU} values. 2013-12-05 22:51:08 +00:00
matt
1b730ee018 add ${MKTARGET_CREATE} for tags 2013-12-05 22:49:33 +00:00