Ozkan Sezer
2014-May-25 08:15 UTC
[flac-dev] extend visibility attributes usage to osx builds
The attached small configury patch extends visibility attributes usage to darwin (osx) builds. Tested by cross-compiling on a linux host using gcc-.4.0.2 and gcc-4.2.1 against 10.4 and 10.6 SDKs. Regards. -- O.S. -------------- next part -------------- diff --git a/configure.ac b/configure.ac index 6d0fa00..d3c302a 100644 --- a/configure.ac +++ b/configure.ac @@ -395,7 +395,6 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations - XIPH_ADD_CFLAGS([-Wdeclaration-after-statement]) XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) @@ -409,6 +408,12 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then CXXFLAGS="$CXXFLAGS -fvisibility=hidden" fi + if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = macho; then + CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR" + CFLAGS="$CFLAGS -fvisibility=hidden" + CXXFLAGS="$CXXFLAGS -fvisibility=hidden" + fi + if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then XIPH_ADD_CFLAGS([-fgnu89-inline]) fi
Erik de Castro Lopo
2014-May-25 09:34 UTC
[flac-dev] extend visibility attributes usage to osx builds
Ozkan Sezer wrote:> The attached small configury patch extends visibility attributes usage > to darwin (osx) builds. Tested by cross-compiling on a linux host using > gcc-.4.0.2 and gcc-4.2.1 against 10.4 and 10.6 SDKs.Thanks Ozkan, Does this patch depend on the dllimport/dllexport patch? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Ozkan Sezer
2014-May-25 09:37 UTC
[flac-dev] extend visibility attributes usage to osx builds
On 5/25/14, Erik de Castro Lopo <mle+la at mega-nerd.com> wrote:> Ozkan Sezer wrote: > >> The attached small configury patch extends visibility attributes usage >> to darwin (osx) builds. Tested by cross-compiling on a linux host using >> gcc-.4.0.2 and gcc-4.2.1 against 10.4 and 10.6 SDKs. > > Thanks Ozkan, > > Does this patch depend on the dllimport/dllexport patch?No, it is independent of it.> > Erik > -- > ---------------------------------------------------------------------- > Erik de Castro Lopo > http://www.mega-nerd.com/-- O.S.