This week (probably today), Alpine is going to upgrade their GCC from version 6 to 8 in Alpine edge. pmOS is based on Alpine edge, hence we need to adjust our aports as well.
I expect breakage in the kernels for example, as older kernels explicitly check for the GCC version and then include a file based on what it found. Newer kernels only include one file if the compiler is GCC, independent of the version.
Here's an issue, so we can note down the progress of the upgrade.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
GCC has been upgraded for all arches now. I'm not entirely sure if we have to rebuild all our packages that required GCC to build, does anyone know? I assume most stuff will compile fine (I know for a fact Phosh and it's dependencies did) except most of the kernels.
I've started the branch feature/gcc8 today which currently contains regenerated gcc and binutils aports and a commit that renamed the compiler-gcc6.h file to compiler-gcc8.h in the FP2 kernel and adjusts the devicepkg-dev package to that filename. Sadly the kernel does not compile due to very helpful errors
(In general, if it's not much extra effort, it would be nice if we could turn compiler-gcc*.h into a regular .patch file now that we need to touch it everywhere anyway.)
Update: The patch (adjusted) fixes the compilation but the kernel doesn't boot and I even with earlyprintk I didn't see any output out of the serial connection so I'm saying "it doesn't work".
After throughout research, I can't find any patch or even any mention of the error message you've posted.
It would be nice if we could all kernels work with GCC8 in theory. But when it starts with something like that, it doesn't seem feasible, and it doesn't really seem worth wasting a lot of time on this.
So I'm going the route of keeping gcc6 around, exclusively for the legacy vendor kernels.
TODO:
create main/gcc6 based on Alpine's latest gcc6 aport
(only package gcc there, not g++? gcc would be enough for the kernels)
make sure they don't conflict: apk add gcc gcc6 gcc-armhf gcc6-armhf should work
adjust cross compiler code to detect gcc6 packages (use CC=gcc6 in the APKBUILDs?) and to use the appropriate cross compiler for them instead of the gcc8 one
make sure all 3.x kernels compile with the new gcc6 packaging
adjust default aportgen template for linux-*
see the todo list below
nice to have:
test case: gcc6 packages must have the same version
test case: linux aports that depend on gcc6 should have the same HOSTCC=... lines (see below)
I just noticed that Linux 3.16 is still being maintained over at kernel.org. Maybe a relevant patch can be found here; however I did not find one as I looked through the results. So unless somebody is able to fix the error @z3ntu reported, we'll need to go with the GCC6 aport solution.
I don't have serial for this device so I don't know if it even had the boot loader issues mentioned above
I haven't used this downstream kernel a long time since there is a mainline(-ish) kernel for this device. I used this kernel for Android and had it compiling on GCC 5.x (iirc) before I stopped using it. There's more GCC related patches in the commit history but I don't remember all the details. The branch is here: https://github.com/Decatf/android_kernel_samsung_p4/tree/aosp-ng-gcc8
bd0772df2132bf56cda78e7204facf434cd5aa40 sounds like a good solution to getting rid of the compiler-N.h files. But it is unlikely that this would resolve the boot problem, right?
I'm making good progress with adding support for GCC6, see the checkboxes above.
The pmbootstrap aportgen gcc6-armhf etc. code lives in the feature/aportgen-gcc6 branch right now, and the changes necessary were rather simple. It's still WIP though, the resulting gcc6-armhf package is conflicting with gcc6 right now:
ERROR: gcc6-armhf-6.4.0-r0: trying to overwrite usr/bin/gcc6 owned by gcc6-6.4.0-r0.ERROR: gcc6-armhf-6.4.0-r0: trying to overwrite usr/gcc6/lib/libcc1.so owned by gcc6-6.4.0-r0.ERROR: gcc6-armhf-6.4.0-r0: trying to overwrite usr/gcc6/lib/libcc1.so.0 owned by gcc6-6.4.0-r0.ERROR: gcc6-armhf-6.4.0-r0: trying to overwrite usr/gcc6/lib/libcc1.so.0.0.0 owned by gcc6-6.4.0-r0.ERROR: gcc6-armhf-6.4.0-r0: trying to overwrite usr/gcc6/bin/gcc6 owned by gcc6-6.4.0-r0.ERROR: gcc6-armhf-6.4.0-r0: trying to overwrite usr/gcc6/bin/cc owned by gcc6-6.4.0-r0.
I'll continue working on this as soon as I find time for it. If somebody else wants to play with this in the meantime, take a look at the TODOs and go ahead!
Little status update, MRs coming as soon as this works.
Cross compilers can be generated now, they compile and they don't conflict.
gcc6 doesn't get installed to usr/bin/gcc6 anymore. Instead, all gcc6 programs get symlinked to /usr/bin/gcc6-... - that way they don't conflict with anything.
I've added gcc6 to the builddepends, and check for that in the Python code of pmbootstrap. When that is the case, it installs the gcc6 cross compiler.
So all in all it's pretty close to working as PoC. I need to fine tune the Linux APKBUILD now, so it really uses the cross compiler, and maybe a few other fixes.