iains / gcc-darwin-arm64

GCC master branch for Darwin with experimental support for Arm64. Currently GCC-15.0.0 [September 2024]
GNU General Public License v2.0
268 stars 33 forks source link

GCC 12.1 #92

Closed ilg-ul closed 2 years ago

ilg-ul commented 2 years ago

I just gave GCC 12.1 a try. It passed on Intel, but failed on M1:

checking if mkdir takes one argument... no
*** Configuration aarch64-apple-darwin20.6.0 not supported
make[1]: *** [Makefile:4555: configure-gcc] Error 1
make[1]: Leaving directory '/Users/ilg/Work/gcc-12.1.0-1/darwin-arm64/build/gcc-12.1.0'
make: *** [Makefile:1031: all] Error 2
ilg@cloud ~ % 

Any thoughts?

iains commented 2 years ago

you would need to use the 12.1-darwin-release-0 branch: https://github.com/iains/gcc-12-branch/releases/tag/gcc-12.1-darwin-r0 aarch64 darwin supports is not yet upstreamed, so only available here.

ilg-ul commented 2 years ago

aarch64 darwin supports is not yet upstreamed

For the record, I just finished building the cross RISC-V toolchain based on 12.1, so host support for AArch64 Darwin is already there (actually not a big deal); only the target part is not yet upstreamed.

iains commented 2 years ago

aarch64 darwin supports is not yet upstreamed

For the record, I just finished building the cross RISC-V toolchain based on 12.1, so host support for AArch64 Darwin is already there (actually not a big deal); only the target part is not yet upstreamed.

That's correct - although the target part is ≈ 100x the size of the host support.

NOTE : Host support is only available on the 'darwin' branch for 11.x (since adding that is not a 'regression fix').

ilg-ul commented 2 years ago

NOTE : Host support is only available on the 'darwin' branch for 11.x (since adding that is not a 'regression fix').

And I guess the same will be true for the target part in 12.x, so 13.x might be the next chance to include it.

iains commented 2 years ago

NOTE : Host support is only available on the 'darwin' branch for 11.x (since adding that is not a 'regression fix').

And I guess the same will be true for the target part in 12.x, so 13.x might be the next chance to include it.

Upstream, yes that's right (hopefully, there will be enough time this cycle, all depends on $dayjob);

The 12.x darwin branch version will be maintained to keep track of any fixes made to the master/upstream version.

ilg-ul commented 2 years ago

@fxcoudert, do you have any updates for this?

I saw there was some work on building GCC 12 on Homebrew, including merging the fix in CMake issue 23500, and there is a separate gcc@12.rb, but the public gcc.rb still points to 11.3.

Do you expect more work on 12.1 for Homebrew, or I can already use your patch?

fxcoudert commented 2 years ago

For Homebrew: a technical issue on Linux is preventing us from migrating to gcc 12 as the “main” gcc formula at the moment 😢 But we have a gcc@12 version available, which can be used by users who request it.

I will update the GCC versions 11 and 12 in Homebrew with Iain's new release when it's out.

ilg-ul commented 2 years ago

I compiled 12.1 in my build environment, with the patch used in gcc@12.rb, and it passed. :-)

But if it is not final, I can postpone my release.

iains commented 2 years ago

I will update the GCC versions 11 and 12 in Homebrew with Iain's new release when it's out.

I am only now waiting for confirmation (or otherwise) that the pre-releases fix the reported bad relocations and resulting link error. For 11.3-pre-r2 I think we can be quite confident after Matthew's testing - but as for 12.1-pre-r1, it would be good to confirm that it fixes the second reported issue (if possible).

iains commented 2 years ago

https://github.com/iains/gcc-12-branch/releases/tag/gcc-12.1-darwin-r1

Please put GCC 12 issues here: https://github.com/iains/gcc-12-branch/issues

ilg-ul commented 2 years ago

@fxcoudert, any changes in gcc-12.1-darwin-r1 worth an update of gcc@12.rb?

fxcoudert commented 2 years ago

@ilg-ul it is being done in https://github.com/Homebrew/homebrew-core/pull/103713

ilg-ul commented 2 years ago

Great, thank you!

ilg-ul commented 2 years ago

The xPack GCC 12.1.0-1 binaries are also available: