From f4b0948abd9cad576d2def3d1cd52b9ef956ef52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6chtrager?= Date: Sat, 14 Sep 2019 11:37:05 +0200 Subject: [PATCH] Fix building GCC with 10.15 SDK --- build.sh | 9 +++++++++ patches/gcc_availability.h | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 patches/gcc_availability.h diff --git a/build.sh b/build.sh index 1872038..a7b235d 100755 --- a/build.sh +++ b/build.sh @@ -260,6 +260,15 @@ if [ $(osxcross-cmp ${SDK_VERSION/u/} ">=" 10.7) -eq 1 ]; then fi fi fi + if [ -f "usr/include/Availability.h" ]; then + if [ $(osxcross-cmp $SDK_VERSION "==" 10.15) -eq 1 ]; then + # 10.15 comes with a broken Availability.h header file + # which breaks building GCC + set +e + cat $PATCH_DIR/gcc_availability.h >> usr/include/Availability.h + set -e + fi + fi popd &>/dev/null echo "" if [ $I386_SUPPORTED -eq 1 ]; then diff --git a/patches/gcc_availability.h b/patches/gcc_availability.h new file mode 100644 index 0000000..42d6fef --- /dev/null +++ b/patches/gcc_availability.h @@ -0,0 +1,10 @@ +#ifndef __AVAILABILITY_HACK__ +#define __AVAILABILITY_HACK__ + +#ifndef __OSX_AVAILABLE_STARTING +#define __OSX_AVAILABLE_STARTING(...) +#define __OSX_AVAILABLE_BUT_DEPRECATED(...) +#define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(...) +#endif + +#endif \ No newline at end of file