* Building gcc-12 on MacOS Ventura (aarch64) @ 2023-03-24 23:02 Chris Johns 2023-03-24 23:07 ` Jonathan Wakely 0 siblings, 1 reply; 6+ messages in thread From: Chris Johns @ 2023-03-24 23:02 UTC (permalink / raw) To: GCC Mailing List Hi, I am sorting out some issues building RTEMS on MacOS including the M processors. The building gcc-12.2.1 for the few architectures I tested fail with sig faults in xgcc when building the runtime. I tried arm, aarch64 and sparc. As a result I wondered about bootstrapping gcc and using that to build the tools rather than clang from Xcode. Is aarch64-apple-darwin supported? I am seeing: *** Configuration aarch64-apple-darwin22.3.0 not supported Thanks Chris ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Building gcc-12 on MacOS Ventura (aarch64) 2023-03-24 23:02 Building gcc-12 on MacOS Ventura (aarch64) Chris Johns @ 2023-03-24 23:07 ` Jonathan Wakely 2023-03-24 23:07 ` Jonathan Wakely 0 siblings, 1 reply; 6+ messages in thread From: Jonathan Wakely @ 2023-03-24 23:07 UTC (permalink / raw) To: Chris Johns; +Cc: GCC Mailing List [-- Attachment #1: Type: text/plain, Size: 819 bytes --] On Fri, 24 Mar 2023, 23:03 Chris Johns, <chris@contemporary.net.au> wrote: > Hi, > > I am sorting out some issues building RTEMS on MacOS including the M > processors. > The building gcc-12.2.1 for the few architectures I tested fail with sig > faults > in xgcc when building the runtime. I tried arm, aarch64 and sparc. As a > result I > wondered about bootstrapping gcc and using that to build the tools rather > than > clang from Xcode. > > Is aarch64-apple-darwin supported? No. Iain Sandoe has some personal branches with changes to support it, but the changes are not in the official gcc repo yet. If you search the gcc-help@gcc.gnu.org list you'll find links to his code. I think Homebrew is his patches too. I am seeing: > > *** Configuration aarch64-apple-darwin22.3.0 not supported > > Thanks > Chris > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Building gcc-12 on MacOS Ventura (aarch64) 2023-03-24 23:07 ` Jonathan Wakely @ 2023-03-24 23:07 ` Jonathan Wakely 2023-03-24 23:51 ` Chris Johns 0 siblings, 1 reply; 6+ messages in thread From: Jonathan Wakely @ 2023-03-24 23:07 UTC (permalink / raw) To: Chris Johns; +Cc: GCC Mailing List [-- Attachment #1: Type: text/plain, Size: 964 bytes --] On Fri, 24 Mar 2023, 23:07 Jonathan Wakely, <jwakely.gcc@gmail.com> wrote: > > > On Fri, 24 Mar 2023, 23:03 Chris Johns, <chris@contemporary.net.au> wrote: > >> Hi, >> >> I am sorting out some issues building RTEMS on MacOS including the M >> processors. >> The building gcc-12.2.1 for the few architectures I tested fail with sig >> faults >> in xgcc when building the runtime. I tried arm, aarch64 and sparc. As a >> result I >> wondered about bootstrapping gcc and using that to build the tools rather >> than >> clang from Xcode. >> >> Is aarch64-apple-darwin supported? > > > > No. Iain Sandoe has some personal branches with changes to support it, but > the changes are not in the official gcc repo yet. If you search the > gcc-help@gcc.gnu.org list you'll find links to his code. I think Homebrew > is his patches too. > *uses his patches too. > > I am seeing: >> >> *** Configuration aarch64-apple-darwin22.3.0 not supported >> >> Thanks >> Chris >> > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Building gcc-12 on MacOS Ventura (aarch64) 2023-03-24 23:07 ` Jonathan Wakely @ 2023-03-24 23:51 ` Chris Johns 2023-03-25 0:08 ` Stuff Received 0 siblings, 1 reply; 6+ messages in thread From: Chris Johns @ 2023-03-24 23:51 UTC (permalink / raw) To: Jonathan Wakely; +Cc: GCC Mailing List On 25/3/2023 10:07 am, Jonathan Wakely wrote: > On Fri, 24 Mar 2023, 23:07 Jonathan Wakely, <jwakely.gcc@gmail.com > <mailto:jwakely.gcc@gmail.com>> wrote: > On Fri, 24 Mar 2023, 23:03 Chris Johns, <chris@contemporary.net.au > <mailto:chris@contemporary.net.au>> wrote: > > Hi, > > I am sorting out some issues building RTEMS on MacOS including the M > processors. > The building gcc-12.2.1 for the few architectures I tested fail with sig > faults > in xgcc when building the runtime. I tried arm, aarch64 and sparc. As a > result I > wondered about bootstrapping gcc and using that to build the tools > rather than > clang from Xcode. > > Is aarch64-apple-darwin supported? > > No. Iain Sandoe has some personal branches with changes to support it, but > the changes are not in the official gcc repo yet. If you search the > gcc-help@gcc.gnu.org <mailto:gcc-help@gcc.gnu.org> list you'll find links to > his code. I think Homebrew is his patches too. > > *uses his patches too. > I tried Iain's repo and it fails in the same way. I have been building the tools on MacOS for over a decade with just the Apple base to make sure we have a clean platform without any issues. To do that I avoid MacPorts and Homebrew. I am fine with our users making use of those packages however knowing a build works with just the Apple support makes our support simpler. Chris ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Building gcc-12 on MacOS Ventura (aarch64) 2023-03-24 23:51 ` Chris Johns @ 2023-03-25 0:08 ` Stuff Received 2023-03-26 1:05 ` Chris Johns 0 siblings, 1 reply; 6+ messages in thread From: Stuff Received @ 2023-03-25 0:08 UTC (permalink / raw) To: gcc On 2023-03-24 19:51, Chris Johns wrote: > On 25/3/2023 10:07 am, Jonathan Wakely wrote: >> On Fri, 24 Mar 2023, 23:07 Jonathan Wakely, <jwakely.gcc@gmail.com >> <mailto:jwakely.gcc@gmail.com>> wrote: >> On Fri, 24 Mar 2023, 23:03 Chris Johns, <chris@contemporary.net.au >> <mailto:chris@contemporary.net.au>> wrote: >> >> Hi, >> >> I am sorting out some issues building RTEMS on MacOS including the M >> processors. >> The building gcc-12.2.1 for the few architectures I tested fail with sig >> faults >> in xgcc when building the runtime. I tried arm, aarch64 and sparc. As a >> result I >> wondered about bootstrapping gcc and using that to build the tools >> rather than >> clang from Xcode. >> >> Is aarch64-apple-darwin supported? >> >> No. Iain Sandoe has some personal branches with changes to support it, but >> the changes are not in the official gcc repo yet. If you search the >> gcc-help@gcc.gnu.org <mailto:gcc-help@gcc.gnu.org> list you'll find links to >> his code. I think Homebrew is his patches too. >> >> *uses his patches too. >> > > I tried Iain's repo and it fails in the same way. > > I have been building the tools on MacOS for over a decade with just the Apple > base to make sure we have a clean platform without any issues. To do that I > avoid MacPorts and Homebrew. I am fine with our users making use of those > packages however knowing a build works with just the Apple support makes our > support simpler. > > Chris I am able to build gcc from Iain's repo gcc-darwin-arm64 on an M1 Mini, running macos 11.3.1, using the following configuration. (Change your language preferences accordingly.) I used make -j4. CC=/opt/homebrew/bin/gcc-12 \ CXX=/opt/homebrew/bin/g++-12 \ ../../src/gcc-darwin-arm64/configure \ --prefix=$HOME/gm2/arm64 \ --exec-prefix=$HOME/gm2/arm64 \ --enable-languages=c,c++,m2 \ --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk \ --with-mpc=/opt/homebrew \ --with-gmp=/opt/homebrew \ --with-mpfr=/opt/homebrew \ --disable-bootstrap \ --enable-threads=posix However, you must first define HAVE_FCNTL_H to 1 in libiberty/config.h (that is missed somehow by configure). Sincerely, N. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Building gcc-12 on MacOS Ventura (aarch64) 2023-03-25 0:08 ` Stuff Received @ 2023-03-26 1:05 ` Chris Johns 0 siblings, 0 replies; 6+ messages in thread From: Chris Johns @ 2023-03-26 1:05 UTC (permalink / raw) To: gcc On 25/3/2023 11:08 am, Stuff Received wrote: > On 2023-03-24 19:51, Chris Johns wrote: >> On 25/3/2023 10:07 am, Jonathan Wakely wrote: >>> On Fri, 24 Mar 2023, 23:07 Jonathan Wakely, <jwakely.gcc@gmail.com >>> <mailto:jwakely.gcc@gmail.com>> wrote: >>> On Fri, 24 Mar 2023, 23:03 Chris Johns, <chris@contemporary.net.au >>> <mailto:chris@contemporary.net.au>> wrote: >>> >>> Hi, >>> >>> I am sorting out some issues building RTEMS on MacOS including the M >>> processors. >>> The building gcc-12.2.1 for the few architectures I tested fail with >>> sig >>> faults >>> in xgcc when building the runtime. I tried arm, aarch64 and sparc. As a >>> result I >>> wondered about bootstrapping gcc and using that to build the tools >>> rather than >>> clang from Xcode. >>> >>> Is aarch64-apple-darwin supported? >>> >>> No. Iain Sandoe has some personal branches with changes to support it, but >>> the changes are not in the official gcc repo yet. If you search the >>> gcc-help@gcc.gnu.org <mailto:gcc-help@gcc.gnu.org> list you'll find >>> links to >>> his code. I think Homebrew is his patches too. >>> >>> *uses his patches too. >>> >> >> I tried Iain's repo and it fails in the same way. >> >> I have been building the tools on MacOS for over a decade with just the Apple >> base to make sure we have a clean platform without any issues. To do that I >> avoid MacPorts and Homebrew. I am fine with our users making use of those >> packages however knowing a build works with just the Apple support makes our >> support simpler. >> >> Chris > > I am able to build gcc from Iain's repo gcc-darwin-arm64 on an M1 Mini, running > macos 11.3.1, using the following configuration. (Change your language > preferences accordingly.) I used make -j4. > > CC=/opt/homebrew/bin/gcc-12 \ > CXX=/opt/homebrew/bin/g++-12 \ > ../../src/gcc-darwin-arm64/configure \ > --prefix=$HOME/gm2/arm64 \ > --exec-prefix=$HOME/gm2/arm64 \ > --enable-languages=c,c++,m2 \ > --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk \ > --with-mpc=/opt/homebrew \ > --with-gmp=/opt/homebrew \ > --with-mpfr=/opt/homebrew \ > --disable-bootstrap \ > --enable-threads=posix > > However, you must first define HAVE_FCNTL_H to 1 in libiberty/config.h (that is > missed somehow by configure). Thanks for this. It was helpful. I installed homebrew and the `gcc` package and updated the RTEMS RSB to use homebrew if installed. I can build RTEMS tools: % /Users/chris/development/rtems/6/bin/sparc-rtems6-gcc --version sparc-rtems6-gcc (GCC) 12.2.1 20230224 (RTEMS 6, RSB f0e34eab8bf33b833a7d9d0b2bddd3b89f6d83cb-modified, Newlib 17ac400) Copyright (C) 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. % file /Users/chris/development/rtems/6/bin/sparc-rtems6-gcc /Users/chris/development/rtems/6/bin/sparc-rtems6-gcc: Mach-O 64-bit executable arm64 This will work for us. Thanks to those who responded. Chris ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-26 1:05 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-03-24 23:02 Building gcc-12 on MacOS Ventura (aarch64) Chris Johns 2023-03-24 23:07 ` Jonathan Wakely 2023-03-24 23:07 ` Jonathan Wakely 2023-03-24 23:51 ` Chris Johns 2023-03-25 0:08 ` Stuff Received 2023-03-26 1:05 ` Chris Johns
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).