public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: 徐保钰 <xubaoyu12@gmail.com>
Cc: gcc-help@gcc.gnu.org, Jonathan Wakely <jwakely.gcc@gmail.com>
Subject: Re: get make error when build gcc-13 on m1 MacOS 13
Date: Sat, 14 Jan 2023 14:34:54 +0000	[thread overview]
Message-ID: <1061A598-B3EF-4F79-9500-E8EC53AD1DFA@sandoe.co.uk> (raw)
In-Reply-To: <CAH6eHdSdHbR95USedQhbMHOPGfbN8gJdFsJ=5RMaB0mCGYL9=A@mail.gmail.com>



> On 14 Jan 2023, at 14:23, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> 
> On Sat, 14 Jan 2023 at 13:31, 徐保钰 via Gcc-help <gcc-help@gcc.gnu.org> 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


      reply	other threads:[~2023-01-14 14:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-14 13:30 徐保钰
2023-01-14 14:23 ` Jonathan Wakely
2023-01-14 14:34   ` Iain Sandoe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1061A598-B3EF-4F79-9500-E8EC53AD1DFA@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    --cc=xubaoyu12@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).