diff --git a/libraries/osx/build-osx-libs.sh b/libraries/osx/build-osx-libs.sh
index 5bb32d4f5e..a26d05a0b3 100755
a
|
b
|
then
|
625 | 625 | tar -xf $LIB_ARCHIVE |
626 | 626 | pushd $LIB_DIRECTORY |
627 | 627 | |
628 | | (./configure CFLAGS="$CFLAGS" \ |
| 628 | (patch -Np1 -i ../../patches/vorbis_flags.diff \ |
| 629 | && ./configure CFLAGS="$CFLAGS" \ |
629 | 630 | LDFLAGS="$LDFLAGS" \ |
630 | 631 | --prefix="$INSTALL_DIR" \ |
631 | 632 | --enable-shared=no \ |
diff --git a/libraries/osx/patches/vorbis_flags.diff b/libraries/osx/patches/vorbis_flags.diff
new file mode 100644
index 0000000000..ba2e28ea0b
-
|
+
|
|
| 1 | Remove -force_cpusubtype_ALL. It is only useful when building for PowerPC and as |
| 2 | of Xcode 15 the linker no longer accepts this flag. |
| 3 | |
| 4 | https://gitlab.xiph.org/xiph/vorbis/-/issues/2348 |
| 5 | |
| 6 | --- configure.orig 2020-07-04 01:20:13.000000000 -0500 |
| 7 | +++ configure 2023-09-25 19:53:58.000000000 -0500 |
| 8 | @@ -12840,9 +12840,9 @@ |
| 9 | CFLAGS="-O3 -Wall -Wextra -ffast-math -D__NO_MATH_INLINES -fsigned-char $sparc_cpu" |
| 10 | PROFILE="-pg -g -O3 -D__NO_MATH_INLINES -fsigned-char $sparc_cpu" ;; |
| 11 | *-*-darwin*) |
| 12 | - DEBUG="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O0 -fsigned-char" |
| 13 | - CFLAGS="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O3 -ffast-math -fsigned-char" |
| 14 | - PROFILE="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -pg -O3 -ffast-math -fsigned-char";; |
| 15 | + DEBUG="-DDARWIN -fno-common -Wall -g -O0 -fsigned-char" |
| 16 | + CFLAGS="-DDARWIN -fno-common -Wall -g -O3 -ffast-math -fsigned-char" |
| 17 | + PROFILE="-DDARWIN -fno-common -Wall -g -pg -O3 -ffast-math -fsigned-char";; |
| 18 | *-*-os2*) |
| 19 | # Use -W instead of -Wextra because gcc on OS/2 is an old version. |
| 20 | DEBUG="-g -Wall -W -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char" |