Commit Graph

143 Commits

Author SHA1 Message Date
maya
f9068bab35 Don't special case aarch64 and add -fomit-frame-pointer to builds.
This behaviour is probably due to a past behaviour of clang, where it
always emitted frame pointer code.
This is no longer true for clang on netbsd, and I don't think it was true
for GCC.

Meanwhile, this flag bleeds into pkgsrc where it breaks random packages,
requiring workarounds like lang/ruby*-base/hacks.mk.
2020-02-08 21:16:53 +00:00
christos
0fb78fffb4 Back out previous. This has no chance to work unless the make variable parsing
is not changed do that instead of scanning for a single character delim ':',
it scans for "?:". This is because !empty(COMPILE.c:M*-pg*) contains a ':'.
2020-01-08 22:04:24 +00:00
christos
42506d4e49 tweak the DBG rule that -fomit-frame-pointer for aarch64 when profiling
(because the compiler complains), to use a match with the compile flags
and *pg*, instead of using a match to a target suffix (which is NetBSD
build-specific). Pointed out by phone@.
2020-01-08 04:15:45 +00:00
christos
e33a0ba00d move MV to sys.mk because it is used there. Pointed out by joerg@ 2019-12-20 04:04:25 +00:00
christos
ac84be3749 Add -r so that we get the location of redefinitions 2019-04-07 19:32:24 +00:00
christos
0a4f449bbb Most of the mv operations are to move temporary files to their final place.
Some use -f, others don't. This can lead to spurious build failures when
the user performing the build changes. Centralize, and always use -f.
2019-01-21 21:11:54 +00:00
christos
d2abb1c68b remove random seed debugging 2018-08-13 13:07:04 +00:00
christos
8e0030187e Back to always using just the list of sources for the hash. Hopefully this
is reproducible now.
2018-07-10 23:25:27 +00:00
christos
305c0f0c67 Build seed fixes:
- use MKREPRO_TIMESTAMP as the seed if available.
    - skip relative paths that cannot be normalized if it is not
XXX: pullup-8
2018-07-10 16:53:16 +00:00
martin
6f60556b4a Debug hack: print out full random-seed for C++ compile/link. 2018-07-09 09:22:55 +00:00
maya
538feb9de7 Add comment describing why we remove -Wsystem-headers, requested by mrg. 2018-06-22 11:25:03 +00:00
maya
c017cf6e31 Strip -Wsystem-headers from CXXFLAGS.
GCC's C++ headers are not clean (yet). They are trying, but haven't got there
yet.

Necessary for including <atf-c++.hpp> which uses <sstream>.
2018-06-20 02:15:13 +00:00
christos
0ff9c30a3a Also substitute ${X11SRCDIR} for the random seed for reproducible builds so
that the random seed is consistent.
XXX: pullup-8
2018-05-20 14:39:53 +00:00
chs
3084abc1e1 add DTRACE_OPTS and HOST_DTRACE_OPTS to allow disabling various optimizations
that interfere with using dtrace.  use them when MKDTRACE=yes.
2018-02-25 18:53:23 +00:00
martin
e27f028ff5 Remove hacks for ancient vax gcc 2016-03-30 17:35:43 +00:00
chs
f047745321 reapply some fixes to make multi-threaded ctfmerge work
that were lost in the overzealous resync with freebsd.
remove the hacks which were applied to work around those problems.
2015-07-06 00:21:51 +00:00
matt
547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00
apb
146f7f2fe4 Wrap CTFCONVERT invocations in ${defined(CTFCONVERT):? ... :}
so it performs the test at the time the rule is invoked.  We can't
use a ".if defined" test because that would be tested at the time the
sys.mk file is parsed, which may be before CTFCONVERT has been set by
bsd.own.mk.

Remove the now-unnecessary assignment "CTFCONVERT ?= : ctfconvert",
and the similar assignment to CTFMERGE.  Now the build logs are not
cluttered by many unnecessary invocations of the ": ctfconvert ..."
2014-08-06 15:23:48 +00:00
tsutsui
9118f0148c Use "-O2 -fno-reorder-blocks" instead of "-Os" for m68k default optimization.
"-Os" was specfied when gcc 4.5.x was imported and the commit log says
"-O2 produces much bigger code with gcc 4.5 than it did with gcc 4.1"
but "-Os" disables most inline declarations and makes some applications
much slower.  "-O2 -fno-reorder-blocks" seems enough to reduce sizes
and disabling -freorder-blocks wouldn't cause particular performance
impact on ancient m68k machines with small cache memories.
See my post on port-m68k@ for more details:
http://mail-index.NetBSD.org/port-m68k/2014/06/22/msg000488.html

No objection in the thread and "seems fine to me" from mrg@.
2014-06-29 05:20:15 +00:00
christos
4730dabc79 Add -g (gnu) so lint recognizes __attribute__ 2014-04-18 00:37:46 +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
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
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
christos
ad3b972d11 ignore all -std=gnu patterns not just 99 2013-11-01 17:07:37 +00:00
matt
7640d05364 Test BSD makefile about coldfire.
XXX still hate m68k--netbsdelf-coldfire
2013-07-18 22:06:09 +00:00
yamt
eb29b1d4e9 don't make ctfconvert remove original debug info 2013-03-06 11:19:08 +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
christos
7097ec6251 Now that ctf is fixed for at least amd64, go back to an equivalent to the
original functionality, use the tool only if it exists.
2013-01-18 19:32:09 +00:00
christos
3dd38e1c8b Disable CTF Conversion for now until it is fixed.
- ERROR: ctrl_iface_ap.c: die 2767: failed to get unsigned: No entry found
  [dwarf _attrval_unsigned(219)]
2013-01-17 17:33:16 +00:00
christos
af499c4810 Remove bogus conditionals that were also copied to other files presumably
because they did not work from here, and explain why.
2013-01-17 15:27:50 +00:00
christos
9a046d1f16 old-style-definitions and no-format-zero-length are invalid for c++ 2012-10-06 20:54:58 +00:00
abs
86aebb49c7 Switch -current vax back to gcc 4.1 to match netbsd-6 - until someone has
time to look at the gcc 4.5 codegen issues we should at least have a usable
-current for vax.
2012-06-22 20:32:34 +00:00
matt
47dd0a4489 Switch VAX to use GCC 4.5 and GDB 7.
Change VAX to use DBG=-O2 like most other ports.
2012-02-10 05:57:42 +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
00f0e17e85 Fully support per-target AFLAGS. 2011-05-20 14:27:48 +00:00
joerg
8f1068802c Compute the build seed using :hash. 2011-04-07 01:40:32 +00:00
joerg
19b23810a0 Switch remaining platforms to modern CPP for assembler. 2011-01-21 15:59:04 +00:00
joerg
13d8b2b89c Move SPARC and SPARC64 to modern CPP. Update UPDATING note for this and
Alpha.
2011-01-17 18:11:09 +00:00
joerg
66ef8e5b14 Alpha doesn't need -traditional-cpp for assembler. 2011-01-16 19:29:59 +00:00
joerg
d3a052c472 Allow use of traditional CPP to be set on a per platform base in sys.mk.
Honour this for dependency processing in bsd.dep.mk.  Switch i386 and
amd64 assembly to use ISO C90 preprocessor concat and drop the
-traditional-cpp on this platform.
2011-01-12 23:12:10 +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
kent
9c8aa6615e Remove -Wno-pointer-sign and -ffreestanding from CXXFLAGS. g++
doesn't support for them.
2008-09-07 15:54:52 +00:00
joerg
9259cd05bd When compiling C++ sources and BUILDSEED is set, pass down
-frandom-seed with a reduced version of .ALLSRC and .TARGET
as argument.  This allows bit-identical builds of C++ files.
2008-08-04 16:02:25 +00:00
uwe
5e2fa55b72 For sh3 set default DBG to "-Os -freorder-blocks" which is almost like -O2
but without -falign-* that is too zealous for low-memory sh3 machines.
2008-05-06 22:19:11 +00:00
tsutsui
34dd728d42 There is only one more file which requires HACKS for m68000,
so handle it in each Makefile rather than sys.mk.

These ICEs might be related with GCC Bugzilla Bug 32424
which is not resolved yet even in the upstream.
2008-05-04 15:37:19 +00:00
tsutsui
c007028e0b Enable gcc optimization on m68000 (sun2) again with minimum hacks.
gcc -O0 generates a bit fat binaries.
2008-04-27 03:06:46 +00:00
mrg
ecc90aa046 make all sun2 use -O0 and move most of the hacks out into just 3 files. 2008-02-09 02:37:21 +00:00