Commit Graph

2429 Commits

Author SHA1 Message Date
rin
7b81801bbc Update as(1) failure on armv6; it occurs also for earmv6hfeb, whereas it
does not for earmv6{,eb}.
2021-04-25 15:32:24 +00:00
christos
2b59ea2015 fix cargo-cult 2021-04-25 15:09:08 +00:00
christos
ff47a56302 - include <bsd.init.mk>
- use MACHINE_MIPS64
2021-04-25 15:08:28 +00:00
mrg
ed99c7dc49 armv6 little endian has problems with GCC 10.
rpi# cat bar.s
        .cfi_startproc
        .cfi_endproc
rpi# as bar.s
bar.s: Assembler messages:
bar.s: Internal error (Illegal instruction).
Please report this bug.
2021-04-25 10:08:25 +00:00
mrg
9aab5f6a62 switch powerpc and arm64 to GCC 10. 2021-04-25 08:01:54 +00:00
mrg
0973f141b9 move the NetBSD version of:
__convert_from_v(const __c_locale& __cloc, char* __out,
		    const int __size __attribute__ ((__unused__)),
		    const char* __fmt, ...)

from the .h file into the .cc file.

NetBSD version relies upon vasprintf_l() being defined and compile
contexts such as _XOPEN_SOURCE=600 or _POSIX_C_SOURCE < 200809 may
not provide the definition of it, cause compile time issues for
3rdparty applications in c++locale.h.  This ensure that all the
required definitions are present when this code is compiled.
2021-04-24 21:17:40 +00:00
mrg
d09fcf21ff reduce diffs to upstream. 2021-04-24 06:44:24 +00:00
mrg
ca4eb663da make netbsd section more GNU-style. 2021-04-24 06:44:01 +00:00
rin
138c755404 Fix build with MKDEBUG=yes for aarch64. 2021-04-24 06:34:52 +00:00
mrg
f0fc1517e8 reduce diffs to upstream. 2021-04-24 06:32:09 +00:00
mrg
4568bc619b cc1objplus and lto-dump are now enabled. 2021-04-23 22:53:03 +00:00
mrg
7bcf01e5b9 build cc1objplus. don't forget debug set this time. 2021-04-23 22:50:05 +00:00
mrg
8147e6c899 build new GCC 10 lto-dump(1) tool. 2021-04-23 01:56:14 +00:00
mrg
7e0fcb8493 arm64eb works. 2021-04-22 20:45:00 +00:00
mrg
716f126bf9 arm64* now works. (thanks skrll.)
evbarmv5 and evbarmv7hfeb works.  (thanks martin.)
2021-04-22 05:00:35 +00:00
rin
7da850018c Apply this fix also for binutils.old.
http://www.nerv.org/netbsd/?q=id:20210422T010948Z.f87d2246188cfedb66a0d5a012c107b6a2b9f395

> Fix regression where ld(1) is trapped into infinite loop when
> linking binary whose text does not fit within R_PPC_REL24.
>
> Reported upstream as Bug 27755:
> https://sourceware.org/bugzilla/show_bug.cgi?id=27755
>
> This problem was introduced to binutils-2-31-1 for our tree.
> netbsd-9 is affected, while netbsd-8 is not.
2021-04-22 01:14:18 +00:00
rin
1c7fbcda57 Fix regression where ld(1) is trapped into infinite loop when
linking binary whose text does not fit within R_PPC_REL24.

Reported upstream as Bug 27755:
https://sourceware.org/bugzilla/show_bug.cgi?id=27755

This problem was introduced to binutils-2-31-1 for our tree.
netbsd-9 is affected, while netbsd-8 is not.
2021-04-22 01:09:48 +00:00
mrg
307da2e47a give a structure a name.
it makes GCC 10 less unhappy about building arm64 GCC 10.
2021-04-20 10:39:58 +00:00
mrg
12037e2a81 hppa switched. sh3el seems ready. m68k atf wasn't fail.. 2021-04-19 08:40:15 +00:00
mrg
6b7734269e arm64-gcc10 can run atf fine (with a GCC 9 kernel.) 2021-04-17 22:03:57 +00:00
mrg
05211fa483 it's spelled aarch64eb. now aarch64eb userland builds, too.
update arm64 status (kernels still need new libkern help.)
2021-04-17 22:01:02 +00:00
mrg
cab9e0888f add support for arm64 lse.S.
arm64 userland much happier now.  /usr/bin/gcc as gcc 10 on arm64
is fine, build is complete, though i did not test xsrc yet.
2021-04-17 10:54:46 +00:00
mrg
d44b5d46ab remove double arm64 netbsd target. add t-lse, though we don't
pull this out with mknative currently.
2021-04-17 10:53:18 +00:00
mrg
edc6087d66 port the -mnative support in GCC 10 to netbsd. (much simpler than 8->9!) 2021-04-17 10:19:09 +00:00
mrg
2c7f7c1589 switch alpha, ia64, sparc*, riscv*, amd64 and vax to GCC 10 default. 2021-04-17 04:07:16 +00:00
mrg
ddd88a608a various updates, thanks to those who provided feedback.
- powerpc ports work
- m68k ports work, x68k has a new caveat
- hppa works
- mips64eb vs UVMHIST has been fix
- i386 reboot problem fixed (cardbus issue, not GCC related)
2021-04-17 01:59:41 +00:00
rin
efb1d0a1d1 Restore our local change to remove GNU_STACK program header:
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c#rev1.13

This was removed accidentally when merging GCC10 into our tree.

Note that some firmwares, e.g., Explora, refuse to execute ELF
kernel image if this program header is present.

Now, GCC10 becomes just fine for all three powerpc sub-archs, i.e.,
oea, booke, and ibm4xx, as far as I can see. No regressions are
observed for ATF.

OK mrg
2021-04-16 02:33:28 +00:00
rin
3d5cb49cde Fix regression introduced to GCC10, where it wrongly recognizes 32-bit
processors as POWER9 if -misel flag is specified.

rs6000_machine_from_flags() assumes ISEL instructions are supported only
for POWER9 and successors. However, ISEL is also implemented for 32-bit
booke processors.

Since our kernel for booke is compiled with -misel, this regression
completely breaks it.

As a fix, check whether CPU is 64-bit capable or not, before checking
-misel flag.

The problem has been reported as 100108 to upstream:

	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100108

OK mrg
2021-04-16 02:26:43 +00:00
rin
3467bd47be Fix regression introduced to GCC10, by which inline assembler codes for
403/405 are miscompiled.

Redundant .machine directive introduced by upstream commit
2d94f7dea9c73ef3c116a0ddc722724578a860fe:

	https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=2d94f7dea9c73ef3c116a0ddc722724578a860fe

clobbers CPU flags passed to assembler. This results in miscompile for
inline assembler codes specific to 403/405 processors, at least.

Therefore, revert this commit locally.

The problem has been reported as 100107 to upstream:

	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100107

OK mrg
2021-04-16 02:18:04 +00:00
mrg
8842784405 document various gcc warnings that occur frequently enough to
inspire the GCC_NO_* series of variables, and explain some
about what the issues may be for each, hopefully providing some
direction on how to fix new warnings in this space.

christos asked me for this last year, and it's finally complete
enough to commit.  :-)
2021-04-15 05:15:04 +00:00
mrg
f83306c1b9 feedback from rin@: alpha and m68k work well, powerpc not so much
but fixes are known.

thanks!
2021-04-15 05:12:57 +00:00
mrg
5cf114ea09 i've test-built all platforms. everything except arm64, x68k and sun2
builds.  many of them work as well.  most mips are (minimally) tested.
2021-04-15 01:59:51 +00:00
christos
bed36db058 lto-common.c needs the stack protector treatment 2021-04-14 12:20:59 +00:00
mrg
a16a1d25de dtrace systrace.c issue fixed by christos (thanks!)
mips issue is related to memset.c miscompiling and does not
appear with -ffreestanding (thanks joerg & simonb.)
2021-04-14 01:19:13 +00:00
mrg
b62893b8db note amd64 dtrace issue is only warning for now.
note that i386 has problems in -current.
2021-04-13 22:24:56 +00:00
mrg
e43c684a44 with dtrace enabled, there is at least one remaining issue for amd64. 2021-04-13 10:10:25 +00:00
mrg
3a792618ec sparc and amd64 successfully finished their atf runs. 2021-04-13 08:57:39 +00:00
mrg
968c7bf770 update the status of GCC. summary: mostly looking good.
- all targets build or can be attempted
- arm64 needs __aarch64_swp1_acq in both libgcc and libkern
- earmv4 works, earmv7hf works, all arm32 builds, rest untested
- hppa, most/all m68k, alpha, and most ppc builds, none tested
- ia64 kernel runs as well as before, userland fails to build
- i386 runs, seems mostly fine except lib/libc/sys/t_ptrace_wait
  resume test is hung, and cpu-spinning in a zombie
- sun2 grew again, too large but builds besides RAMDISK not fitting
- mips seems problematic.  some kernels fail some work, userland
  has problems with both static and dynamic n32 and n64 programs
- sh3el seems ok in gxemul/landisk, sh3eb not tested
- vax seems OK in simh (same c++ exception issues)

all ports kernels have been tested to build (though perhaps with
some uncommited changes only needed for some, while most changes
are commited, about 15 are not but many ports build without them.)
2021-04-13 08:22:40 +00:00
mrg
ade90e4afe make this match the builtin prototypes. 2021-04-13 08:06:11 +00:00
mrg
1effc6f09c more -O0 for vax 2021-04-13 06:30:36 +00:00
mrg
f5c1005436 apply some -Wno- to ignore several new warnings with GCC 10.
ntp: ignore truncation beyond api sizes, and ignore wrongly
guessed underflow

tmux: ignore maybe uninitialised warning for impossible case

libbfd: signed/unsigned variables assigned in the same statement

dri/gallium: -Wno-builtin-declaration-mismatch for u_atomic.c as
it implements backend functions with different in-C-machine but
same-in-real-machine types

libXfont/libXfont2: signed/unsigned variables assigned in the same
statement

i915drm: ignore impossible maybe uninitialised warnings

sysinst: ignore an invalid string truncation issue
2021-04-13 04:58:59 +00:00
mrg
72ccf7c95b apply -fcommon to sources that still rely upon it. 2021-04-13 01:11:05 +00:00
mrg
b08b556d46 mknative-gcc for GCC 10 and earm ports (now including earmv7hf) after
the arm/netbsd-elf.h fix.  shark appears to work at least now.
2021-04-12 09:51:49 +00:00
mrg
f76800c4b6 arm/netbsd-elf.h is necessary for eabi targets. 2021-04-12 09:03:39 +00:00
mrg
e6db336e16 updates:
- arm64 doesn't build (missing __aarch64_swp1_acq in kernels)
- mips cpu targets all build (maybe not all ports)
- powerpc builds (maybe not all ports)
2021-04-12 08:31:30 +00:00
mrg
60ad6a583b mknative-gcc for GCC 10.3 and powerpc ports. 2021-04-12 08:29:18 +00:00
mrg
d68c9edc84 merge our changes into GCC 10. parts of the rs6000.c file were
split into separate files, and an old change to rs6000.c now
belongs in rs6000-logue.c.
2021-04-12 07:23:06 +00:00
mrg
b4369c1e58 various changes to get GCC 10 to build here.
- fix path to compiler-specific includes
- missing (void) for (older) C
- fix __is_signed/__is_signed_val change
- avoid compiler warning-as-errors
- add to existing COPTS.file values, instead of setting
- bump libgomp minor; functions were added
- add new 'compare' c++ header
- handle new analyzer subdirectory.  set TARGET_MACHINE for lto-streamer-in.c.
  remove params.list etc handling.
- coroutines.cc is another .cc not .c.  adjust .PATH to suit.
- add new lto1 sources
- couple of files not in /arch/ subdirs missed in mknative update.

rs6000.c is still not merged.
2021-04-12 00:05:54 +00:00
mrg
9d32163c94 revert sanitizer back to the version we were using with GCC 9, since
that one was already newer than the GCC 10 version.
2021-04-11 23:54:25 +00:00
mrg
9a218c9915 mknative-gcc for GCC 10 and almost all platforms. one of the
myriad of arm platforms, and the powerpc* platforms are not
yet done.
2021-04-11 20:26:42 +00:00