Re: [PATCH] Fix J-core aic warning spam
Geert Uytterhoeven <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel |
|---|---|
| Message-ID | <CAMuHMdUwYZMfjWNidampfj2M=EawUYOR2VdG=Wv5Die+E6KGpA@mail.gmail.com> |
Hi Rob, On Thu, Apr 20, 2023 at 3:09 AM Rob Landley <[email protected]> wrote: > On 4/19/23 05:25, John Paul Adrian Glaubitz wrote: > > I just wanted to perform a test build of the J2 kernel, but I'm getting lots of error messages > > from the assembler about unknown opcodes when trying to build j2_defconfig. > > J-core binary toolchain tarball: > > https://landley.net/toybox/downloads/binaries/toolchains/latest/sh2eb-linux-muslfdpic-cross.tar.xz > > Build script on top of Rich's musl-cross-make: > > https://landley.net/toybox/faq.html#cross2 > > https://github.com/landley/toybox/blob/master/scripts/mcm-buildall.sh > > Fishing around in the for loop at the end of the script, the mcm-buildall.sh > invocation for _just_ sh2eb would be: > > ~/path/to/mcm-buildall.sh i686:: sh2eb:fdpic:--with-cpu=mj2 > > Alas, this will build an i686 compiler (twice!) before building the sh2eb > compiler, because the script makes portable toolchain tarballs which are > statically linked on the host, and you can't do that with glibc because Ulrich > Dr. Pepper was insane and his successors have been spineless, so it builds an > i686 musl compiler first. (Could do x86_64, but didn't see a reason to make it > less portable and use more memory? I should bench if it's noticeably faster...) Good luck building Firefox with a 32-bit compiler ;-) > The script builds an i686 host compiler internally (see > BOOTSTRAP=i686-linux-musl near-ish the top), but gcc has this horrific two stage > build thing it does where it builds and then rebuilds builds itself with itself, > and that second i686 compiler would be the "builds with itself" one. (That's why > it's at the start of the list in the for loop.) If you try to build anything > ELSE with that compiler, autoconf winds up going "compiler can't create > executables" because the stupid, it burns... > > Feel free to peel out simpler compiler toolchain builds if you've got a > preference? The interesting bits for your purposes are probably: > > https://github.com/richfelker/musl-cross-make/blob/master/patches/gcc-9.4.0/0007-j2.diff > > https://github.com/richfelker/musl-cross-make/blob/master/patches/binutils-2.33.1/0001-j2.diff > > Jeff also has an sh2-elf toolchain build somewhere. That's more for bare metal, > but I've confirmed it builds the kernel (as of 5.x somewhere anyway). There's also [1], which is why it's good for Arnd to have the J-core toolchain patches. [1] https://mirrors.edge.kernel.org/pub/tools/crosstool/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds