Ticket #6902: patch-vorbis-flags.diff

File patch-vorbis-flags.diff, 1.8 KB (added by Thomas Nyman, 3 months ago)

Patch to build-osx-libs.sh that removes the offending flags from libvorbis-1.3.7 configure

  • libraries/osx/build-osx-libs.sh

    diff --git a/libraries/osx/build-osx-libs.sh b/libraries/osx/build-osx-libs.sh
    index 5bb32d4f5e..a26d05a0b3 100755
    a b then  
    625625  tar -xf $LIB_ARCHIVE
    626626  pushd $LIB_DIRECTORY
    627627
    628   (./configure CFLAGS="$CFLAGS" \
     628  (patch -Np1 -i ../../patches/vorbis_flags.diff \
     629    && ./configure CFLAGS="$CFLAGS" \
    629630      LDFLAGS="$LDFLAGS" \
    630631      --prefix="$INSTALL_DIR" \
    631632      --enable-shared=no \
  • new file libraries/osx/patches/vorbis_flags.diff

    diff --git a/libraries/osx/patches/vorbis_flags.diff b/libraries/osx/patches/vorbis_flags.diff
    new file mode 100644
    index 0000000000..ba2e28ea0b
    - +  
     1Remove -force_cpusubtype_ALL. It is only useful when building for PowerPC and as
     2of Xcode 15 the linker no longer accepts this flag.
     3
     4https://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"