[Libreoffice-commits] .: configure.in set_soenv.in solenv/gbuild solenv/inc

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Tue Jul 26 19:58:16 PDT 2011


 configure.in                     |   12 ++++++++++++
 set_soenv.in                     |    1 +
 solenv/gbuild/platform/macosx.mk |    5 ++++-
 solenv/inc/unxmacx.mk            |    6 ++++--
 4 files changed, 21 insertions(+), 3 deletions(-)

New commits:
commit 2c4769a87d15acb12dbcdd4705f0bfaf049e0127
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Jul 26 21:58:08 2011 -0500

    make -Wno-long-double usage conditional to gcc supporting it

diff --git a/configure.in b/configure.in
index d69a89d..e5632cd 100755
--- a/configure.in
+++ b/configure.in
@@ -3193,6 +3193,17 @@ if test "$GCC" = "yes"; then
         AC_MSG_RESULT([no])
     fi
 
+    AC_MSG_CHECKING([whether $CC supports -Wno-long-double])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -Wno-long-double"
+    AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_NO_LONG_DOUBLE=TRUE ], [])
+    CFLAGS=$save_CFLAGS
+    if test "$HAVE_GCC_NO_LONG_DOUBLE" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+
     AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 757])
     save_CXXFLAGS=$CFLAGS
     CXXFLAGS="$CXXFLAGS -std=c++0x"
@@ -3234,6 +3245,7 @@ return !(i != 0 && j != 0);
 fi
 
 AC_SUBST(HAVE_CXX0X)
+AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
 
 # ===================================================================
 # use ccache?
diff --git a/set_soenv.in b/set_soenv.in
index 9a764dc..f2c47f3 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1819,6 +1819,7 @@ ToFile( "ALIGNOF_SHORT",        "@ALIGNOF_SHORT@", "e" );
 ToFile( "ALIGNOF_INT",          "@ALIGNOF_INT@", "e" );
 ToFile( "ALIGNOF_LONG",         "@ALIGNOF_LONG@", "e" );
 ToFile( "ALIGNOF_DOUBLE",       "@ALIGNOF_DOUBLE@", "e" );
+ToFile( "HAVE_GCC_NO_LONG_DOUBLE", "@HAVE_GCC_NO_LONG_DOUBLE@", "e" );
 ToFile( "HAVE_GCC_VISIBILITY_FEATURE",
 		"@HAVE_GCC_VISIBILITY_FEATURE@", "e" );
 ToFile( "HAVE_GCC_VISIBILITY_BROKEN",
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 16d97fd..cf9d438 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -92,7 +92,6 @@ gb_CXXFLAGS := \
 	-Wendif-labels \
 	-Wextra \
 	-Wno-ctor-dtor-privacy \
-	-Wno-long-double \
 	-Wno-non-virtual-dtor \
 	-fPIC \
 	-fmessage-length=0 \
@@ -105,6 +104,10 @@ gb_CXXFLAGS := \
 	#-fsigned-char \ might be removed?
 	#-malign-natural \ might be removed?
 
+ifeq($(HAVE_GCC_NO_LONG_DOUBLE),TRUE)
+gb_CXXFLAGS +:= -Wno-long-double
+endif
+
 # these are to get g++ to switch to Objective-C++ mode
 # (see toolkit module for a case where it is necessary to do it this way)
 gb_OBJCXXFLAGS := -x objective-c++ -fobjc-exceptions
diff --git a/solenv/inc/unxmacx.mk b/solenv/inc/unxmacx.mk
index bef9438..4882779 100644
--- a/solenv/inc/unxmacx.mk
+++ b/solenv/inc/unxmacx.mk
@@ -113,8 +113,10 @@ CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
 
 # Normal C++ compilation flags
-CFLAGSCXX=-pipe -malign-natural -fsigned-char -Wno-long-double $(ARCH_FLAGS)
-CFLAGSCXX+= -Wno-ctor-dtor-privacy
+CFLAGSCXX=-pipe -malign-natural -fsigned-char -Wno-long-double $(ARCH_FLAGS) -Wno-ctor-dtor-privacy
+.IF "$(HAVE_GCC_NO_LONG-DOUBLE)" == "TRUE"
+CFLAGSCXX+= -Wno-long-double
+.ENDIF
 
 PICSWITCH:=-fPIC
 # Other flags


More information about the Libreoffice-commits mailing list