vlc | branch: master | David Fuhrmann <dfuhrm...@videolan.org> | Fri Mar  2 
19:56:42 2018 +0100| [3a2d0c820cb1dc97a0816a0b6954e42909c4e965] | committer: 
David Fuhrmann

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3a2d0c820cb1dc97a0816a0b6954e42909c4e965
---

 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 cc9425e43e..ee72346173 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)
+XCODE_FLAGS += -arch $(ARCH)
 
 endif
 
diff --git a/extras/package/macosx/build.sh b/extras/package/macosx/build.sh
index 8158bc7bed..c3343a989c 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"

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to