[vlc-devel] [RFC][PATCH 1/2] contrib: check os x gcc v4.2 before overriding
Faustino E. Osuna
enrique.osuna at gmail.com
Wed Dec 14 21:35:25 CET 2011
Check to see if the supplied CC and CCX compilers are compatible with
GCC version 4.2. If it is not compatible, then override them with
their explicit 4.2 counterparts (gcc-4.2 and g++-4.2 respectively).
In Xcode 4.2.1, the default compilers are no longer GCC 4.2, this
should compensate for that behavior and allow older versions of Xcode
to safely be used.
---
contrib/src/main.mak | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index fdd0892..7d65b6d 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -109,8 +109,16 @@ endif
ifdef HAVE_MACOSX
MIN_OSX_VERSION=10.5
MACOSX_SDK=/Developer/SDKs/MacOSX$(OSX_VERSION).sdk
+
+ifneq ($(findstring --4.2,--$(shell $(CC) -dumpversion)),--4.2)
+$(warning overring CC=$(CC) with gcc-4.2)
CC=gcc-4.2
+endif
+ifneq ($(findstring --4.2,--$(shell $(CXX) -dumpversion)),--4.2)
+$(warning overring CC=$(CXX) with g++-4.2)
CXX=g++-4.2
+endif
+
AR=ar
LD=ld
STRIP=strip
--
1.7.7.4
More information about the vlc-devel
mailing list