From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vmail1.sentex.ca (vmail1.sentex.ca [64.7.153.19]) by sourceware.org (Postfix) with ESMTPS id 9EF773858D28 for ; Sat, 25 Mar 2023 00:08:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9EF773858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=riddermarkfarm.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=riddermarkfarm.ca Received: (Haraka outbound); Fri, 24 Mar 2023 20:08:07 -0400 Authentication-Results: vmail1.sentex.ca; auth=pass (plain) Received: from [10.0.1.25] (198.27.14-65.ip.mltn.standardbroadband.ca [198.27.14.65]) by vmail1.sentex.ca (Haraka/2.8.25) with ESMTPSA id F20F7E95-42B7-4475-941E-BC7252CC82A3.1 envelope-from (authenticated bits=0) (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256); Fri, 24 Mar 2023 20:08:07 -0400 Message-ID: <85e4cae3-e629-73ab-467c-0df84709d27d@riddermarkfarm.ca> Date: Fri, 24 Mar 2023 20:08:07 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: Building gcc-12 on MacOS Ventura (aarch64) Content-Language: en-CA To: gcc@gcc.gnu.org References: <277f572d-3398-3f3e-847b-d5f0259db119@contemporary.net.au> <5dffdc29-f202-bc55-9f0c-c77771293e04@contemporary.net.au> From: Stuff Received In-Reply-To: <5dffdc29-f202-bc55-9f0c-c77771293e04@contemporary.net.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Haraka-GeoIP: NA, CA, ON, Georgetown, 55km X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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, > > wrote: >> On Fri, 24 Mar 2023, 23:03 Chris Johns, > > 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 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.