Re: macppc kernel and clang

2020-03-30 Thread George Koehler
On Mon, 30 Mar 2020 22:39:48 +0200 (CEST) Mark Kettenis wrote: > P.S. Userland seems to be in good shape as well. I built and rebuilt > the world with clang. That was on a kernel built with gcc, so > I'm repeating that now with a kernel built with clang. That's good. My iMac G3 is t

Re: macppc kernel and clang

2020-03-30 Thread Mark Kettenis
> Date: Sun, 29 Mar 2020 19:59:02 -0400 > From: George Koehler > > Here is a new diff for macppc's ofw_stack() problem, without using > __attribute__((noinline)). I use this diff to build and run a macppc > kernel with clang. It also works with gcc. > > The kernel did 3 steps to prepare an Ope

Re: macppc kernel and clang

2020-03-29 Thread George Koehler
Here is a new diff for macppc's ofw_stack() problem, without using __attribute__((noinline)). I use this diff to build and run a macppc kernel with clang. It also works with gcc. The kernel did 3 steps to prepare an Open Firmware call: 1. turn off interrupts (EE and RI in msr) 2. move the st

Re: macppc kernel and clang

2020-03-18 Thread George Koehler
On Tue, 17 Mar 2020 13:23:28 -0400 George Koehler wrote: > clang -static -L. -nopie -o instbin instbin.o dd.lo ... > /usr/bin/ld: dd.lo(.text+0x14): R_PPC_PLTREL24 reloc against local symbol > > ... > > Passing -M to crunchgen(8), as we do on {longsoon,octeon,sgi}, might > work around the prob

Re: macppc kernel and clang

2020-03-17 Thread George Koehler
On Mon, 16 Mar 2020 19:13:13 -0600 "Theo de Raadt" wrote: > How are the bootblocks faring? > > And userland? ofwboot with clang works for me. I failed to make bsd.rd (in src/distrib/macppc/ramdisk) with clang, but I don't remember exactly what I did, so I might have been making it the wrong wa

Re: macppc kernel and clang

2020-03-17 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Mon, 16 Mar 2020 19:13:13 -0600 > > ok deraadt > > Next up, to figure out the right plan for ofw. > > Thank you so much for figuring out these two details. > > How are the bootblocks faring? I believe somebody already tested the bootloader. Doesn't hurt to try

Re: macppc kernel and clang

2020-03-16 Thread Theo de Raadt
ok deraadt Next up, to figure out the right plan for ofw. Thank you so much for figuring out these two details. How are the bootblocks faring? And userland? George Koehler wrote: > On Mon, 16 Mar 2020 12:54:52 +0100 (CET) > Mark Kettenis wrote: > > > I had a look at what NetBSD does, and t

Re: macppc kernel and clang

2020-03-16 Thread George Koehler
On Mon, 16 Mar 2020 12:54:52 +0100 (CET) Mark Kettenis wrote: > I had a look at what NetBSD does, and they use '%L0' instead of > '%0+1'. As far as I can tell this works on both gcc and clang. The > diff below produces a working kernel when building with gcc. Not yet > in a position to test a

Re: macppc kernel and clang

2020-03-16 Thread Mark Kettenis
> Date: Sat, 14 Mar 2020 23:33:37 -0400 > From: George Koehler > > Hello tech@ list! > > With this diff, it becomes possible to build macppc kernel with > base-clang. The default compiler for macppc is base-gcc. > > rgc mailed the ppc@ list to report problems with > clang kernel, and got a wo

Re: macppc kernel and clang

2020-03-15 Thread rgc
On Sat, Mar 14, 2020 at 11:33:37PM -0400, George Koehler wrote: > After the diff, I put my dmesg; my iMac G3 isn't GENERIC.MP and > doesn't have radeondrm. --George > i've been using your ppc_mftb() patch on both clang ang gcc compiled kernel ... for SP though and there seems to be no issues at

macppc kernel and clang

2020-03-14 Thread George Koehler
Hello tech@ list! With this diff, it becomes possible to build macppc kernel with base-clang. The default compiler for macppc is base-gcc. rgc mailed the ppc@ list to report problems with clang kernel, and got a working kernel with clang -Oz (to stop clang inlining some functions in openfirm.c)