Date: Thu, 11 Feb 2021 21:56:20 -0600 From: "Brandon Bergren" <bdragon@FreeBSD.org> To: "Julio Merino" <julio@meroh.net> Cc: "FreeBSD PowerPC ML" <freebsd-ppc@freebsd.org> Subject: Re: how many users of FreeBSD 12 do we have on powerpc? Message-ID: <2be9160d-cd4f-46a8-8fbc-c6fe3e821c08@www.fastmail.com> In-Reply-To: <CADyfeQUCbiQexEcGudYmYnZ194izAPqv_VJi7FndkZ9%2BoWdogg@mail.gmail.com> References: <20210210223920.GA31353@lonesome.com> <CADyfeQXbfRwRfe=TGARM5GQaqwKkA=4jsLBcz8oCDar5azijFg@mail.gmail.com> <345b1732-8042-4b1c-b1b5-f062b0d9e6a5@www.fastmail.com> <CADyfeQUizspmw4-hUNkyYAaQwTo-dz0Ct%2BprUOxM49uNq9hjNg@mail.gmail.com> <fd9dd6f9-3e2b-47ef-abf4-7e6b5800dc61@www.fastmail.com> <CADyfeQUCbiQexEcGudYmYnZ194izAPqv_VJi7FndkZ9%2BoWdogg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 11, 2021, at 9:08 PM, Julio Merino wrote: > > The magic is undocumented because it's only been accomplished natively by me and one other person, and you end up with a damaged system even when you do accomplish it. It's *much* more straightforward to install from prebuilt bits. > > What kind of brokenness? A system that contains a mixed set of headers and libraries until you successfully boot into it and make delete-old-files / delete-old-libs on it. Here's the basic idea regarding bootstrapping across the ELFv2 transition point: A) you have to bootstrap a toolchain from ports to even start, as gcc 4.2 does not support a new enough c++ standard to compile llvm/clang. You must then build using a toolchain file. The build you do with it will differ slightly from a native build. You will also likely have to patch a few things to get the world to compile with the external toolchain. B) you *must* do the install to an alternate root filesystem which is not the one you booted from. You must then boot into that filesystem and install again to your main filesystem. An attempt to install to the root filesystem you are booted from WILL crash in the middle, as the libraries are completely incompatible with each other and you will end up with an unusable mess when make invariably crashes out and leaves you in a shell that cannot even run ls without manually calling the /rescue copy. (at this point you end up without a working make, so there's no way to recover.) C) After that, you need to do ANOTHER build to ensure that the system is compiled with the new system compiler. And then rebootstrap pkg and rebuild all your ports. And make sure you tidied up old files. Given that you have to rebuild the world more than once and can't directly install the result, it's really not worth it IMO. I had started on some notes at https://wiki.freebsd.org/powerpc/llvm-elfv2 to do this process, but I never finished it because it was decided that we were only going to support doing a reinstall due to the difficulty of supporting people attempting to do the process. > > I noticed that my local patch over stable/12 to fix > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252720 still applies > to stable/13, so I'm wondering if that's what you are referring to. > > -- > jmmv.dev GCC 4.2.1 is completely gone for stable/13, the FreeBSD 13 toolchain is llvm-based. Which was the reason for the ELFv2 ABI change in the first place -- the lld linker only supports ELFv2, so we had to transition ABIs. And the old binutils/gcc predated ELFv2 entirely, so it is a clean break, as neither side could compile stuff that ran on the other side -- the transition happened in December 2019, and the officially supported way to cross the boundary is to reinstall from a newer installer. By the way, this is also the reason that there is no FreeBSD 13 for sparc64 -- nobody put in the necessary work to transition it to the llvm toolchain, so the entire sparc64 port was deleted from the tree. See https://lists.freebsd.org/pipermail/freebsd-arch/2019-August/019674.html for the original proposal that led to this. -- Brandon Bergren bdragon@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2be9160d-cd4f-46a8-8fbc-c6fe3e821c08>