[flac-dev] XIPH_C_COMPILER_IS_CLANG preventing many flags

Ozkan Sezer sezeroz at gmail.com
Sun May 25 14:08:54 PDT 2014


On 5/25/14, Erik de Castro Lopo <mle+la at mega-nerd.com> wrote:
> Ozkan Sezer wrote:
>
>> XIPH_C_COMPILER_IS_CLANG in configury (commit a6a4b6f) is blocking
>> many flags including the visibility attributes: I guess this needs
>> relaxing, possibly a lot. What incompatibility led to this commit?
>
> The differences between GCC and Clang actually arose in the libsndfile
> project. Full discussion here:
>
>     https://github.com/erikd/libsndfile/issues/49
>
> Erik
> --

If the only offender is gcc-4.2 + -fgnu89-inline, something like the
following, then??

diff --git a/configure.ac b/configure.ac
index d3c302a..1c9557f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,6 @@ LT_INIT([win32-dll disable-static pic-only])
 AM_PROG_AS
 AC_PROG_CXX
 XIPH_C_COMPILER_IS_CLANG
-XIPH_GCC_REALLY_IS_GCC
 AC_PROG_MAKE_SET
 AC_PROG_MKDIR_P

@@ -414,7 +413,7 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
                CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
                fi

-       if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
+       if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" &&
test x$xiph_cv_c_compiler_clang = xno ; then
                XIPH_ADD_CFLAGS([-fgnu89-inline])
                fi


--
O.S.


More information about the flac-dev mailing list