[vlc-commits] macOS build.sh: Fix contrib flags to signal minimum macosx version
David Fuhrmann
git at videolan.org
Sat Mar 24 14:19:39 CET 2018
vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Fri Mar 2 19:56:42 2018 +0100| [d3c5d180f307bcd6832506024db9d1c5b2cae961] | committer: Felix Paul Kühne
macOS build.sh: Fix contrib flags to signal minimum macosx version
Followup fix for 6c6bc89cf0d8377532fa04394d23bc0cea4d9eab.
This sets the contribs flags now in the same way as before, to
correctly build a contrib package with minimum macosx version
repected.
Also add WARNING_CFLAGS, to enable availability errors for all
Xcode based projects.
(cherry picked from commit 3a2d0c820cb1dc97a0816a0b6954e42909c4e965)
Signed-off-by: Felix Paul Kühne <felix at feepk.net>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=d3c5d180f307bcd6832506024db9d1c5b2cae961
---
contrib/src/main.mak | 2 +-
extras/package/macosx/build.sh | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 48c54fb5d4..f43bf03d70 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -122,7 +122,7 @@ EXTRA_CFLAGS += -m32
EXTRA_LDFLAGS += -m32
endif
-XCODE_FLAGS = MACOSX_DEPLOYMENT_TARGET=$(MIN_OSX_VERSION) -sdk macosx$(OSX_VERSION) -arch $(ARCH) WARNING_CFLAGS=-Werror=partial-availability
+XCODE_FLAGS += -arch $(ARCH)
endif
diff --git a/extras/package/macosx/build.sh b/extras/package/macosx/build.sh
index 146dd7aeb7..5b2402a9ed 100755
--- a/extras/package/macosx/build.sh
+++ b/extras/package/macosx/build.sh
@@ -192,16 +192,13 @@ spopd
# enabled. (e.g. ffmpeg)
# - This will fail the build if a partially available symbol is added later on
# in contribs and not mentioned in the list of symbols above.
-CFLAGS="-Werror=partial-availability "
-CXXFLAGS="-Werror=partial-availability "
-OBJCFLAGS="-Werror=partial-availability "
+export CFLAGS="-Werror=partial-availability"
+export CXXFLAGS="-Werror=partial-availability"
+export OBJCFLAGS="-Werror=partial-availability"
-CFLAGS+="-isysroot "$SDKROOT" -mmacosx-version-min="$MINIMAL_OSX_VERSION" -DMACOSX_DEPLOYMENT_TARGET="$MINIMAL_OSX_VERSION
-LDFLAGS+="-Wl,-syslibroot,"$SDKROOT" -mmacosx-version-min="$MINIMAL_OSX_VERSION" -isysroot "$SDKROOT" -DMACOSX_DEPLOYMENT_TARGET="$MINIMAL_OSX_VERSION
-
-export CFLAGS=${CFLAGS}
-export CXXFLAGS=${CXXFLAGS}
-export LDFLAGS=${LDFLAGS}
+export EXTRA_CFLAGS="-isysroot $SDKROOT -mmacosx-version-min=$MINIMAL_OSX_VERSION -DMACOSX_DEPLOYMENT_TARGET=$MINIMAL_OSX_VERSION"
+export EXTRA_LDFLAGS="-Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MINIMAL_OSX_VERSION -isysroot $SDKROOT -DMACOSX_DEPLOYMENT_TARGET=$MINIMAL_OSX_VERSION"
+export XCODE_FLAGS="MACOSX_DEPLOYMENT_TARGET=$MINIMAL_OSX_VERSION -sdk macosx$OSX_VERSION WARNING_CFLAGS=-Werror=partial-availability"
info "Building contribs"
spushd "${vlcroot}/contrib"
@@ -230,6 +227,10 @@ unset CFLAGS
unset CXXFLAGS
unset OBJCFLAGS
+unset EXTRA_CFLAGS
+unset EXTRA_LDFLAGS
+unset XCODE_FLAGS
+
# Enable debug symbols by default
export CFLAGS="-g"
export CXXFLAGS="-g"
More information about the vlc-commits
mailing list