simonjwright / distributing-gcc

Binary releases of GCC (native and cross) on macOS; also, the scripts/Makefiles used for producing them.
BSD 3-Clause "New" or "Revised" License
40 stars 0 forks source link

GCC 12.0.1-2 Pre-release #1

Closed trashgod closed 2 years ago

trashgod commented 2 years ago

I installed GCC 12.0.1-2 Pre-release, seen here, on macOS 12.3/xcode-select version 2395 and modified the $PATH. Attempting to compile hello.adb, I get the following failure:

$ gprbuild hello
using project file /opt/gcc-12.0.1-2/share/gpr/_default.gpr
Compile
   [Ada]          hello.adb
clang (LLVM option parsing): Unknown command line argument '-x86-pad-for-align=false'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--x86-slh-loads=false'?
gprbuild: *** compilation phase failed

I see the similar output from gnatmake hello. Curiously, I see a similar result from gcc hello.c, although the same program compiles and runs with Apple clang version 12.0.0. Any guidance welcomed.

simonjwright commented 2 years ago

I’m using clang 13.1.6 on my Intel machine, and see that exact switch being used & accepted.

$ clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: x86_64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I found that the Command Line Tools weren’t getting updated, deleted /Library/Developer/CommandLineTools and re-ran xcode-select --install. Could this have something to do with it?

trashgod commented 2 years ago

That resolved the issue; thank you. I misinterpreted the xcode-select -version: it's the version of xcode-select itself, not the installed libraries and tools.

$ xcode-select -version
xcode-select version 2395.

$ gnat --version
GNAT 12.0.1 20220311 (experimental)
Copyright (C) 1996-2022, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin