https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90835
--- Comment #6 from John Marshall <John.W.Marshall at glasgow dot ac.uk> --- > let's not speculate ... could you (and/or Rainer) try this (untested) patch > and > see how far it gets you? Fails in approximately the same place as without: ../../gcc/configure --disable-nls --disable-multilib --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --enable-languages=c,c++ Make [...] /Users/johnm/thirdparty/build/gcc-perbrew-iains/./gcc/xgcc -B/Users/johnm/thirdparty/build/gcc-perbrew-iains/./gcc/ -B/usr/local/x86_64-apple-darwin18.6.0/bin/ -B/usr/local/x86_64-apple-darwin18.6.0/lib/ -isystem /usr/local/x86_64-apple-darwin18.6.0/include -isystem /usr/local/x86_64-apple-darwin18.6.0/sys-include -fno-checking -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition -isystem ./include -mmacosx-version-min=10.5 -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -mmacosx-version-min=10.5 -pipe -fno-common -I. -I. -I../.././gcc -I../../../../gcc/libgcc -I../../../../gcc/libgcc/. -I../../../../gcc/libgcc/../gcc -I../../../../gcc/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -o _muldi3_s.o -MT _muldi3_s.o -MD -MP -MF _muldi3_s.dep -DSHARED -DL_muldi3 -c ../../../../gcc/libgcc/libgcc2.c In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:69, from /Users/johnm/thirdparty/build/gcc-perbrew-iains/gcc/include-fixed/stdio.h:78, from ../../../../gcc/libgcc/../gcc/tsystem.h:87, from ../../../../gcc/libgcc/libgcc2.c:27: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h: In function 'renameat': /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/stdio.h:39:56: error: expected declaration specifiers before '__AVAILABILITY_INTERNAL__MAC_10_10' 39 | int renameat(int, const char *, int, const char *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ^~~~~~~~~~~~~~~~~~~~~~~~ I.e. it got no definition of __AVAILABILITY_INTERNAL__MAC_10_10.