[vlc-devel] [RFC][PATCH 1/2] contrib: check os x gcc v4.2 before overriding

Rafaël Carré funman at videolan.org
Wed Dec 14 22:04:10 CET 2011


Le Wed, 14 Dec 2011 21:35:25 +0100,
"Faustino E. Osuna" <enrique.osuna at gmail.com> a écrit :

> 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.

Like jb says on irc, the contribs were only tested with gcc-4.2.

I think the wiki explains how to install gcc-4.2 on recent OSX.

In any case that patch would need to be tested on some specific version,
and perhaps we should whitelist compilers know to work correctly

> ---
>  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



-- 
Rafaël Carré



More information about the vlc-devel mailing list