Building GCC on Macintosh


9 Nov 2020

2019 MBP 15: i9-9880H/2.3-4.8GHz/8C/16T/16MB/16GB/2400MHz/512GB/Radeon560X4GB/3840x2400/801.11ac.
MacOS X: 10.15.7, BuildVersion: 19H15
Buildtools: gcc-10-20201031

gcc-10-20201107:
C, C++, Fortran bootstrap built successfully.
Prebuild: 105,426 files, 850,012 KB
Postbuild: 122,150 files, 4,687,124 KB
Time: 25 min 20 seconds.


8 Nov 2020

In order to build on Catalina, I used these steps: This allows GCC's triple bootstrap to work! Alas, once you have a working GCC, builds with it do not work until you delete the newly created /usr/include link. There is more to do.

2019 MBP 15: i9-9880H/2.3-4.8GHz/8C/16T/16MB/16GB/2400MHz/512GB/Radeon560X4GB/3840x2400/801.11ac.
MacOS X: 10.15.7, BuildVersion: 19H15
Buildtools: Apple clang version 12.0.0 (clang-1200.0.32.21) Target: x86_64-apple-darwin19.6.0

gcc-9-20201106:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,919 files, 777,040 KB
Postbuild: 110,410 files, 4,266,208 KB
Time: 27 min 44 seconds.


30 Jul 2020

I reverted my 2015 MacBook Pro to macOS 10.14 Mojave, and built a recent GCC 10.
2015 MBP 13: i7-5557U/3.1-3.4GHz/2C/4T/4MB/16GB/1866MHz/512GBSSD/Iris/802.11ac.
MacOS X: 10.12.6, BuildVersion: 16G2136
Buildtools: Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin16.7.0

gcc-10-20200725:
C, C++, Fortran bootstrap built successfully.
Prebuild: 105,442 files, 854,184 KB
Postbuild: 122,553 files, 4,363,692 KB
Time: 1 hr 35 min 49 seconds.


3 Jun 2020

GCC no longer builds on macOS 10.15 Catalina, due to Apple's horrible decision to get rid of /usr/include. My builds have therefore largely come to a stop. Today (3 Jun 2020) I booted my iMac up off an external SSD running Mac OS X 10.13.6 High Sierra, and I was able to build GCC 10 just fine.
Late 2015 iMac 27: 4.0GHz i7 QC, 8MB L3, 32GB 1866MHz, 120GB SSD, M395+2GB, 5120x2880, G+802.11ac.
macOS: 10.13.6, Xcode for High Sierra with Apple LLVM version 11.0.3 (clang-1103.0.32.62).

gcc-10-20200530:
C, C++, Fortran bootstrap built successfully.
Prebuild: 105,195 files, 852,772 KB
Postbuild: 122,312 files, 4,376,660 KB
Time: 33 minutes 2 seconds.


28 Dec 2019

iMac27: i7-6700K/4.0-4.2GHz/4C/8T/8MB/32GB/1866MHz/3.1TB/ATIM395+2GB/5120x2880/G+802.11ac.
macOS: 10.14.6 build 18G2022, Xcode 10.3 with Apple LLVM version 10.0.1 (clang-1001.0.46.4).

gcc-9-20191221:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,804 files, 779,732 KB
Postbuild: 110,693 files, 4,285,664 KB
Time: 30 minutes 9 seconds.

gcc-10-20191222:
C, C++, Fortran bootstrap built successfully.
Prebuild: 99,442 files, 815,348 KB
Postbuild: 116,339 files, 4,588,956 KB
Time: 32 minutes 1 second.


18 Dec 2019

MBP15: 2.3-4.8GHz i9, 8 cores/16 threads, 16MB L3, 16GB 2400MHz, 512GB SSD, 3360x2100, 802.11ac.
macOS: 10.14.6 build 18G1012, Xcode 10.3 with Apple LLVM version 10.0.1 (clang-1001.0.46.4).

gcc-8-20191213:
gcc-8 continues to NOT build. gcc/gimple-streamer-in.c has an undefined type, cgraph_node.
There are many ATTRIBUTE_NONNULL related preprocessor errors.

gcc-9-20191214:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,778 files, 779,588 KB
Postbuild: 110,667 files, 4,285,944 KB
Time: 24 minutes 12 seconds.

gcc-10-20191215:
C, C++, Fortran bootstrap built successfully.
Prebuild: 99,315 files, 814,524 KB
Postbuild: 116,212 files, 4,580,112 KB
Time: 24 minutes 23 seconds.


13 Dec 2019

MBP15: 2.3-4.8GHz i9, 8 cores/16 threads, 16MB L3, 16GB 2400MHz, 512GB SSD, 3360x2100, 802.11ac.
macOS: 10.14.6 build 18G1012, Xcode 10.3 with Apple LLVM version 10.0.1 (clang-1001.0.46.4).

gcc-9-20191207:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,770 files, 779,556 KB
Postbuild: 110,659 files, 4,272,132 KB
Time: 23 minutes 7 seconds. (6% faster than last gcc-9 build, same machine, as it used gcc-10 rather than clang for first build.)

gcc-10-20191208:
C, C++, Fortran bootstrap built successfully.
Prebuild: 99,189 files, 811,652 KB
Postbuild: 116,086 files, 4,576,600 KB
Time: 23 minutes 33 seconds. (6% faster than last gcc-10 build, same machine, as it used gcc-10 rather than clang for first build.)


30 Nov 2019

MBP15: 2.3-4.8GHz i9, 8 cores/16 threads, 16MB L3, 16GB 2400MHz, 512GB SSD, 3360x2100, 802.11ac.
macOS: 10.14.6 build 18G1012, Xcode 10.3 with Apple LLVM version 10.0.1 (clang-1001.0.46.4).

gcc-10-20191124:
C, C++, Fortran bootstrap built successfully.
Prebuild: 98,969 files, 810,376 KB
Postbuild: 115,863 files, 4,403,796 KB (1% larger than last gcc-10)
Time: 24 minutes 37 seconds. (18% faster on the new MBP15 compared to the last iMac gcc-10 build)
Comparing clang 10 and gcc-10-20191124, building tools using -Oz for clang, -Ofast for gcc:


5 Nov 2019

iMac27: 4.0GHz i7 QC, 8MB L3, 32GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS: 10.14.6, Xcode 10.3.
Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0

gcc-9-20191102:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,729 files, 779,348 KB
Postbuild: 110,618 files, 4,107,076 KB
Time: 29 minutes 8 seconds. (6% faster than last build.)

gcc-10-20191103:
C, C++, Fortran bootstrap built successfully.
Prebuild: 98,541 files, 807,508 KB (1.5% larger than last build.)
Postbuild: 115,429 files, 4,360,600 KB
Time: 30 minutes 11 seconds. (4% faster than last build.)


24 Oct 2019

iMac27: 4.0GHz i7 QC, 8MB L3, 32GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS: 10.14.6, Xcode 10.3.
Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0

gcc-9-20191019:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,664 files, 778,960 KB
Postbuild: 110,553 files, 4,096,144 KB
Time: 31 minutes 3 seconds.

gcc-10-20191020:
C, C++, Fortran bootstrap built successfully.
Prebuild: 96,448 files, 795,304 KB
Postbuild: 113,321 files, 4,353,192 KB
Time: 31 minutes 32 seconds.


8 Oct 2019

iMac27: 4.0GHz i7 QC, 8MB L3, 32GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS: 10.14.6, Xcode 10.3.
Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0

gcc-7-20191003:
C, C++, Fortran bootstrap built successfully.
Prebuild: 80,380 files, 672,936 KB
Postbuild: 96,640 files, 4,181,840 KB
Time: 22 minutes 37 seconds.

gcc-8-20191004:
C, C++, Fortran bootstrap built successfully.
Prebuild: 85,880 files, 711,972 KB
Postbuild: 102,774 files, 4,491,932 KB
Time: 27 minutes 32 seconds.

gcc-9-20191005:
Build dies due to missing #include of <bits/enable_special_members.h>.
Prebuild: 93,648 files, 778,880 KB

gcc-10-20191006:
C, C++, Fortran bootstrap built successfully.
Prebuild: 96,096 files, 793,340 KB
Postbuild: 11,2960 files, 4,314,500 KB
Time: 29 minutes 37 seconds.


17 Sep 2019

MBP15: 2.3-4.8GHz i9, 8 cores/16 threads, 16MB L3, 16GB 2400MHz, 512GB SSD, 3360x2100, 802.11ac.
macOS: 10.14.6, Xcode 10.3.
Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0

gcc-9-20190914:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,628 files, 778,772 KB
Postbuild: 110,520 files, 4,109,220 KB
Time: 24 minutes 40 seconds. (18% shorter time than last build.)


4 Aug 2019

MBP15: 2.3-4.8GHz i9, 8 cores/16 threads, 16MB L3, 16GB 2400MHz, 512GB SSD, 3360x2100, 802.11ac.
macOS: 10.14.6, Xcode 10.3.
Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0

gcc-9-20190727:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,472 files, 777,772 KB
Postbuild: 121,236 files, 5,550,836 KB
Time: 29 minutes 59 seconds. (30% shorter due to new reference hardware!)


15 May 2019

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.5, Xcode 10.2.1.
Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.6.0

gcc-9-20190511:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,334 files, 777,160 KB
Postbuild: 121,082 files, 5,525,476 KB
Time: 42 minutes 27 seconds. (6.3% longer!)


30 Apr 2019

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.4, Xcode 10.2.1.
Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.5.0

gcc-7-20190425:
gcc-8-20190426:

Both fail to bootstrap build due to the same error while compiling gcc/c-family/cppspec.c:
---
In file included from /usr/include/sys/sysctl.h:83:0,
                 from ../.././gcc/config/darwin-driver.c:30:
/usr/include/sys/ucred.h:94:2: error: '_Atomic' does not name a type
  _Atomic u_long          cr_ref;  /* reference count */
---

gcc-9-20190428:
C, C++, Fortran bootstrap built successfully.
Prebuild: 93,311 files, 776,816 KB
Postbuild: 121,058 files, 5,523,292 KB
Time: 39 minutes, 56 seconds.


15 Mar 2019

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.3, Xcode 10.1.0.
Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin18.2.0

gcc-7-20190314:
C, C++, Fortran bootstrap built successfully.
Prebuild: 75,882 files, 671,164 KB.
Postbuild: 101,061 files, 5,545,188 KB.
Time: 31 minutes 5 seconds.

gcc-8-20190308:
C, C++, Fortran bootstrap built successfully.
Prebuild: 81,125 files, 710,128 KB.
Postbuild: 107,431 files, 5,914,564 KB.
Time: 36 minutes, 14 seconds.

gcc-9-20190310:
C, C++, Fortran bootstrap built successfully.
Prebuild: 87,966 files, 772,632 KB.
Postbuild: 114,851 files, 5,656,128 KB.
Time: 43 minutes, 2 seconds. (1.9% slower than last tested release.)


22 Feb 2019

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.3, Xcode 10.1.0.
Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin18.2.0

gcc-7-20190214:
C, C++, Fortran bootstrap built successfully.
Prebuild: 75,867 files, 671,084 KB.
Postbuild: 101,046 files, 5,551,696 KB.
Time: 30 minutes 59 seconds.

gcc-8-20190215:
C, C++, Fortran bootstrap built successfully.
Prebuild: 81,078 files, 709,904 KB.
Postbuild: 107,384 files, 5,897,896 KB.
Time: 37 minutes, 7 seconds. (3.1% slower than last tested release.)

gcc-9-20190217:
C, C++, Fortran bootstrap built successfully.
Prebuild: 87,668 files, 769,752 KB.
Postbuild: 114,553 files, 5,668,808 KB.
Time: 42 minutes, 13 seconds. (3.8% slower than last tested release.)


30 Jan 2019

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.3, Xcode 10.1.0.
Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin18.2.0

gcc-7-20190124:
C, C++, Fortran bootstrap built successfully.
Prebuild: 75,837 files, 670,948 KB.
Postbuild: 101,016 files, 5,555,816 KB.
Time: 30 minutes 41 seconds.

gcc-8-20190125:
C, C++, Fortran bootstrap built successfully.
Prebuild: 80,942 files, 709,224 KB.
Postbuild: 107,248 files, 5,911,940 KB.
Time: 35 minutes, 59 seconds.

gcc-9-20190127:
C, C++, Fortran bootstrap built successfully.
Prebuild: 87,474 files, 767,027 KB.
Postbuild: 114,354 files, 5,654,936 KB.  (7.7% smaller than last tested release.)
Time: 40 minutes, 40 seconds.


20 Dec 2018

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.2, Xcode 10.1.0.
Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin18.2.0

gcc-7-20181213:
C, C++, Fortran bootstrap built successfully.
Prebuild: 75,805 files, 670,796 KB.
Postbuild: 100,984 files, 5,552,352 KB.
Time: 30 minutes 55 seconds.

gcc-8-20181214:
C, C++, Fortran bootstrap built successfully.
Prebuild: 80,845 files, 708,784 KB.
Postbuild: 107,151 files, 5,896,408 KB.
Time: 36 minutes, 33 seconds.

gcc-9-20181216:
C, C++, Fortran bootstrap built successfully.
Prebuild: 86,748 files, 760,788 KB.
Postbuild: 113,754 files, 6,127,408 KB.
Time: 41 minutes, 27 seconds.


19 Nov 2018

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.1, Xcode 10.1.0.
Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin18.2.0

gcc-7-20181115:
C, C++, Fortran bootstrap built successfully.
Prebuild: 75,779 files, 670,680 KB.
Postbuild: 100,958 files, 5,554,352 KB.
Time: 31 minutes 3 seconds.

gcc-8-20181116:
C, C++, Fortran bootstrap built successfully.
Prebuild: 80,817 files, 708,624 KB.
Postbuild: 107,123 files, 5,907,912 KB.
Time: 36 minutes, 6 seconds.

gcc-9-20181118:
C, C++, Fortran bootstrap built successfully.
Prebuild: 86,466 files, 762,420 KB.
Postbuild: 113,472 files, 6,102,376 KB.
Time: 41 minutes, 33 seconds.


23 Oct 2018

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.0, Xcode 10.0.0.
Apple LLVM version 10.0.0 (clang-1000.11.45.2) Target: x86_64-apple-darwin18.0.0

gcc-7-20181018:
C, C++, Fortran bootstrap built successfully.
Prebuild: 75,764 files, 670,600 KB.
Postbuild: 100,949 files, 5,632,960 KB.
Time: 31 minutes 25 seconds.

gcc-8-20181019:
C, C++, Fortran bootstrap built successfully.
Prebuild: 80,783 files, 708,472 KB.
Postbuild: 107,089 files, 5,921,120 KB.
Time: 36 minutes, 26 seconds.

gcc-9-20181021:
C, C++, Fortran bootstrap built successfully.
Prebuild: 82,634 files, 721,168 KB.
Postbuild: 109,113 files, 6,044,812 KB.
Time: 40 minutes, 39 seconds.


10 Oct 2018

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.14.0, Xcode 10.0.0. - First GCC builds on Mojave!
Apple LLVM version 10.0.0 (clang-1000.11.45.2) Target: x86_64-apple-darwin18.0.0
du -s used for file sizes, files|wc used for number of files.

gcc-7-20181004:
C, C++, Fortran bootstrap built successfully.
Prebuild: 75,726 files, 670,412 KB.
Postbuild: 100,911 files, 5,628,292 KB.
Time: 31 minutes 14 seconds.

gcc-8-20181005:
C, C++, Fortran bootstrap built successfully.
Prebuild: 80,736 files, 708,252 KB.
Postbuild: 107,042 files, 5,914,820 KB.
Time: 37 minutes 49 seconds.

gcc-9-20181007:
C, C++, Fortran bootstrap built successfully.
Prebuild: 82,377 files, 719,668 KB.
Postbuild: 108,799 files, 6,036,972 KB.
Time: 41 minutes 49 seconds.


18 Sep 2018

iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
macOS 10.13.6, Xcode 10.0.0.
Apple LLVM version 10.0.0 (clang-1000.11.45.2) Target: x86_64-apple-darwin17.7.0

gcc-7-20180913:
C, C++, Fortran bootstrap built successfully.
Prebuild: 75,723 files, 946,752 KB.
Postbuild: 100,908 files, 5,692,408 KB.
Time: 31 minutes 33 seconds.

gcc-8-20180914:
C, C++, Fortran bootstrap built successfully.
Prebuild: 80,720 files, 1,003,232 KB.
Postbuild: 107,026 files, 6,071,400 KB.
Time: 36 minutes 44 seconds.

gcc-9-20180916:
C, C++, Fortran bootstrap built successfully.
Prebuild: 81,713 files, 1,013,704 KB.
Postbuild: 108,129 files, 6,132,856 KB.
Time: 40 minutes 54 seconds.


28 Aug 2018

Using Xcode 9.4.1CL.

gcc-7-20180823:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 453,124,658 bytes (969.4 MB on disk) for 79,875 items
Postbuild: 5,155,097,977 bytes (5.82 GB on disk) for 99,510 items
Time: 31 minutes 45 seconds.

gcc-8-20180824:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 476,030,382 bytes (1.03 GB on disk) for 85,082 items
Postbuild: 5,500,092,261 bytes (6.21 GB on disk) for 105,520 items
Time: 37 minutes 40 seconds.

gcc-9-20180826:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 479,923,618 bytes (1.04 GB on disk) for 85,990 items
Postbuild: 5,446,320,260 bytes (6.16 GB on disk) for 106,520 items
Time: 42 minutes 26 seconds.


26 Jul 2018

Using Xcode 9.4.1CL.

gcc-7-20180719:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 453,081,740 bytes (969.3 MB on disk) for 79,863 items
Postbuild: 5,154,953,534 bytes (5.82 GB on disk) for 99,492 items
Time: 32 minutes 44 seconds.

gcc-8-20180719:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 498,073,217 bytes (1.05 GB on disk) for 85,126 items
Postbuild: 5,487,929,155 bytes (6.19 GB on disk) for 105,408 items
Time: 40 minutes 28 seconds.

gcc-9-20180722:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 478,208,672 bytes (1.03 GB on disk) for 85,611 items
Postbuild: 5,445,409,973 bytes (6.16 GB on disk) for 106,074 items
Time: 42 minutes 24 seconds.


9 Jul 2018

Using Xcode 9.4.1CL.

gcc-7-20180705:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 453,073,906 bytes (969.3 MB on disk) for 79,856 items
Postbuild: 5,154,942,816 bytes (5.82 GB on disk) for 99,485 items
Time: 31 minutes 20 seconds.

gcc-8-20180706:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 475,829,721 bytes (1.03 GB on disk) for 85,005 items
Postbuild: 5,498,337,470 bytes (6.21 GB on disk) for 105,437 items
Time: 36 minutes 1 second.

gcc-9-20180708:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 477,677,352 bytes (1.03 GB on disk) for 85,421 items
Postbuild: 5,433,179,464 bytes (6.14 GB on disk) for 105,875 items
Time: 46 minutes 35 seconds.


30 Jun 2018

Using Xcode 9.4.1CL.

gcc-7-20180628:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 453,060,790 bytes (969.2 MB on disk) for 79,851 items
Postbuild: 5,152,081,395 bytes (5.82 GB on disk) for 99,480 items
Time: 31 minutes 0 seconds.

gcc-8-20180622:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 475,765,893 bytes (1.03 GB on disk) for 84,984 items
Postbuild: 5,496,725,657 bytes (6.2 GB on disk) for 105,416 items
Time: 36 minutes 13 seconds.

gcc-9-20180624:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Prebuild: 477,144,287 bytes (1.03 GB on disk) for 85,213 items
Postbuild: 5,432,772,081 bytes (6.14 GB on disk) for 105,658 items
Time: 39 minutes 49 seconds.


22 Jun 2018

Using Xcode 9.4.1CL.

gcc-7-20180614:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 33 minutes 10 seconds.

gcc-8-20180615:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 38 minutes 11 seconds.

gcc-9-20180617:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 39 minutes 38 seconds.


9 Jun 2018

gcc-9-20180603:
C, C++, Fortran bootstrap built successfully once again! (Mid May snapshots would not build with clang.)
C31 2013.12: 3.1GHz i7, 8MB L3, 16GB 1600MHz, 1.1TB Fusion, GT750M 1GB, 1920x1080, G+802.11ac.
Time: 48 minutes 44 seconds, 5.5 GB, 105687 files.


7 Jun 2018

gcc-8-20180601:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 36 minutes 7 seconds, 5.50 GB, 105286 files.

gcc-7-20180531:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 38 minutes 26 seconds, 5.15 GB, 99362 files.


25 May 2018

gcc-8-20180518:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 40 minutes 10 seconds, 5.49 GB, 105247 files.

gcc-7-20180517:
C, C++, Fortran bootstrap built successfully.
C31 2013.12: 3.1GHz i7, 8MB L3, 16GB 1600MHz, 1.1TB Fusion, GT750M 1GB, 1920x1080, G+802.11ac.
Time: 34 minutes 3 seconds, 5.15 GB, 99352 files.


9 May 2018

gcc-9-20180506:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 41 minutes 11 seconds, 5.49 GB, 105253 files.


2 May 2018

gcc-8-20180427:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 36 minutes 54 seconds, 5.49 GB, 105022 files.

gcc-7-20180426:
C, C++, Fortran bootstrap built successfully.
C31 2013.12: 3.1GHz i7, 8MB L3, 16GB 1600MHz, 1.1TB Fusion, GT750M 1GB, 1920x1080, G+802.11ac.
Time: 37 minutes 15 seconds, 5.15 GB, 99325 files.


19 Apr 2018

gcc-8-20180415:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 36 minutes 39 seconds, 5.49 GB, 105136 files.

gcc-7-20180412:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 31 minutes 6 seconds, 5.15 GB, 99305 files.


10 Apr 2018

gcc-8-20180408:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 36 minutes 48 seconds, 5.49 GB, 105072 files.
https://twitter.com/danallen46/status/983792188277440513


6 Apr 2018

gcc-8-20180401:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 38 minutes 47 seconds, 5.49 GB, 104983 files.


31 Mar 2018

gcc-8-20180325:
C, C++, Fortran bootstrap built successfully.
iMac27: 4.0GHz i7 QC, 8MB L3, 16GB 1866MHz, 3.1TB Fusion, M395+2GB, 5120x2880, G+802.11ac.
Time: 37 minutes 26 seconds, 5.49 GB, 104928 files.

gcc-7-20180329:
C, C++, Fortran bootstrap built successfully.
C31 2013.12: 3.1GHz i7, 8MB L3, 16GB 1600MHz, 1.1TB Fusion, GT750M 1GB, 1920x1080, G+802.11ac.
Time: 36 minutes 34 seconds, 5.15 GB, 99274 files.


21 Mar 2018

I built gcc-8-20180318 today on my iMac 27" (4.0 GHz i7, 16 GB RAM, 3 TB Fusion). I used macOS 10.13.3 and the Xcode 9.2 command line toolset (Apple clang-900.39.2). It took 37 minutes 48 seconds to do a triple bootstrap build of C, C++, and Fortran. It resulted in 104,835 files using 5.78 GB of drive space.


19 Mar 2018

I built the latest snapshots of gcc-7 and gcc-8 today. I used macOS 10.13.3 and the Xcode 9.2 command line tools. gcc-7-20180315 built fine in 37m 9s on a 3.1GHz i7 iMac. gcc-8-20180311 built fine in 36m 15s on a 4.0GHz i7 iMac. https://twitter.com/danallen46/status/975775233507442689


8 Mar 2018

I bootstrap built gcc-8-20180304 (C, C++, Fortran) ok in 36m 57s. 104,658 files used 5.49 GB for the build. iMac 27", 4.0 GHz i7, 16 GB RAM, 3 TB Fusion, macOS 10.13.3, Xcode 9.2. https://twitter.com/danallen46/status/971819963743813632


11 Aug 2016

Update: I built gcc-6.1 using Xcode 7.3.1's command-line tools and did not have to make this fix. gcc-6.1 bootstrapped itself perfectly without any issues.


4 Jun 2016

Fix for building gcc-4.8.5 using Xcode 7

Building gcc-4.8.5 with Apple's Xcode 7 on the Mac will not complete due to a bug in gcc code generating some assembly language that Xcode 7 will not allow, while earlier versions of Xcode worked. If you are using an earlier Xcode before El Capitan 10.11, this fix is therefore not needed.

So to fix this problem, in the source file:


  gcc-4.8.5/gcc/config/darwin.c

there is the darwin_mark_decl_preserved function. All you need to do is to add one line of code to the start of the function. The fixed function in its entirety is shown below, with the change noted by my DKA comment.

void
darwin_mark_decl_preserved (const char *name)
{
  if (darwin_label_is_anonymous_local_objc_name (name)) return; /* DKA 4 Jun 2016 */
  fprintf (asm_out_file, "\t.no_dead_strip ");
  assemble_name (asm_out_file, name);
  fputc ('\n', asm_out_file);
}

You should be able to do a

  ./configure
  make -j8
and a while later have a working C, C++, and Fortran compiler. I have personally built gcc-4.8.5 using Xcode 7.3.1 successfully once I made this fix.

I did not invent the fix. I found the fix here:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66523


 Created:  4 Jun 2016
Modified: 10 Nov 2020