> On 14 Jan 2023, at 14:23, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > > On Sat, 14 Jan 2023 at 13:31, 徐保钰 via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: >> I want to build gcc-13 on my M1 MacBook Pro. Following official document >> <https://gcc.gnu.org/install/>, I download source code using git, configure >> and make. >> >> For configure, I refer to the way of Homebrew configure gcc-12 on link >> <https://github.com/Homebrew/homebrew-core/blob/master/Formula/gcc.rb>. > > I think Homebrew uses a patched version of GCC, because there are > changes for M1 support that are not yet available in upstream GCC. So > the same config used for the Homebrew build will not necessarily work > for the unpatched upstream sources. As Jonathan says, the M1 (Arm64 / aarch64) support for macOS is not yet upstreamed. The prototype / experimental branch is here: https://github.com/iains/gcc-darwin-arm64 I rebase that work from time to time, (should be an update in the next week or so). NOTE you might run into https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568 with the macOS13 SDK - the work-around is to: make BOOT_CFLAGS="-O2 -g -Wno-error=deprecated-declarations” (with your -jXX and any other flags you use unchanged) HTH, Iain