[mapguide-commits] r8343 - trunk/MgDev

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Aug 20 23:32:29 PDT 2014


Author: jng
Date: 2014-08-20 23:32:29 -0700 (Wed, 20 Aug 2014)
New Revision: 8343

Modified:
   trunk/MgDev/configure.in
Log:
Ensure 64-bit compiler flags are specified in debug mode. Also use one set of compiler flags regardless of gcc version

Modified: trunk/MgDev/configure.in
===================================================================
--- trunk/MgDev/configure.in	2014-08-21 04:19:29 UTC (rev 8342)
+++ trunk/MgDev/configure.in	2014-08-21 06:32:29 UTC (rev 8343)
@@ -160,45 +160,31 @@
 
 if test $enable_optimized = no; then
     AC_MSG_NOTICE([Using debug configuration])
-    if test -s gcc32.txt; then
-        AC_MSG_NOTICE([gcc 3.2.x requires less strict compiler flags. Please pay attention to warnings!])
-        CXXFLAGS="-g -D_DEBUG"
-        AC_SUBST(CXXFLAGS, ["-g -D_DEBUG"])
+    if test $enable_64bit = no; then
+        AC_MSG_NOTICE([Using 32-bit CXXFLAGS])
+        CXXFLAGS="-g -D_DEBUG -m32"
+        AC_SUBST(CXXFLAGS, ["-g -D_DEBUG -m32"])
     else
-        AC_MSG_NOTICE([this version of gcc is not actively supported])
-        CXXFLAGS="-g -D_DEBUG"
-        AC_SUBST(CXXFLAGS, ["-g -D_DEBUG"])
+        #TODO: Review. i686 is not a valid march/mtune value for 64-bit compilation
+        #TODO: Sticking -fPIC globally is probably a bit of a thermonuclear solution, but we
+        # *absolutely* must be sure this flag is used when compiling static libraries
+        AC_MSG_NOTICE([Using 64-bit CXXFLAGS])
+        CXXFLAGS="-g -D_DEBUG -m64 -fPIC"
+        AC_SUBST(CXXFLAGS, ["-g -D_DEBUG -m64 -fPIC"])
     fi
 else
     AC_MSG_NOTICE([Using optimized configuration])
-    if test -s "gcc32.txt"; then
-        AC_MSG_NOTICE([gcc 3.2.x . Please pay attention to warnings!])
-        if test $enable_64bit = no; then
-            AC_MSG_NOTICE([Using 32-bit CXXFLAGS])
-            CXXFLAGS="-O2 -g -pipe -march=i686 -mtune=i686 -fno-use-cxa-atexit -fexceptions"
-            AC_SUBST(CXXFLAGS, ["-O2 -g -pipe -march=i686 -mtune=i686 -fno-use-cxa-atexit -fexceptions -Wno-write-strings"])            
-        else
-            #TODO: Review. i686 is not a valid march/mtune value for 64-bit compilation
-            #TODO: Sticking -fPIC globally is probably a bit of a thermonuclear solution, but we
-            # *absolutely* must be sure this flag is used when compiling static libraries
-            AC_MSG_NOTICE([Using 64-bit CXXFLAGS])
-            CXXFLAGS="-O2 -g -pipe -m64 -fPIC -fno-use-cxa-atexit -fexceptions"
-            AC_SUBST(CXXFLAGS, ["-O2 -g -pipe -m64 -fPIC -fno-use-cxa-atexit -fexceptions -Wno-write-strings"])
-        fi
+    if test $enable_64bit = no; then
+        AC_MSG_NOTICE([Using 32-bit CXXFLAGS])
+        CXXFLAGS="-O2 -g -pipe -m32 -march=i686 -mtune=i686 -fno-use-cxa-atexit -fexceptions"
+        AC_SUBST(CXXFLAGS, ["-O2 -g -pipe -m32 -march=i686 -mtune=i686 -fno-use-cxa-atexit -fexceptions -Wno-write-strings"])
     else
-        AC_MSG_NOTICE([this gcc version is not actively supported.])
-        if test $enable_64bit = no; then
-            AC_MSG_NOTICE([Using 32-bit CXXFLAGS])
-            CXXFLAGS="-O2 -g -pipe -march=i686 -mtune=i686 -fno-use-cxa-atexit -fexceptions"
-            AC_SUBST(CXXFLAGS, ["-O2 -g -pipe -march=i686 -mtune=i686 -fno-use-cxa-atexit -fexceptions -Wno-write-strings"])
-        else
-            #TODO: Review. i686 is not a valid march/mtune value for 64-bit compilation
-            #TODO: Sticking -fPIC globally is probably a bit of a thermonuclear solution, but we
-            # *absolutely* must be sure this flag is used when compiling static libraries
-            AC_MSG_NOTICE([Using 64-bit CXXFLAGS])
-            CXXFLAGS="-O2 -g -pipe -m64 -fPIC -fno-use-cxa-atexit -fexceptions"
-            AC_SUBST(CXXFLAGS, ["-O2 -g -pipe -m64 -fPIC -fno-use-cxa-atexit -fexceptions -Wno-write-strings"])
-        fi
+        #TODO: Review. i686 is not a valid march/mtune value for 64-bit compilation
+        #TODO: Sticking -fPIC globally is probably a bit of a thermonuclear solution, but we
+        # *absolutely* must be sure this flag is used when compiling static libraries
+        AC_MSG_NOTICE([Using 64-bit CXXFLAGS])
+        CXXFLAGS="-O2 -g -pipe -m64 -fPIC -fno-use-cxa-atexit -fexceptions"
+        AC_SUBST(CXXFLAGS, ["-O2 -g -pipe -m64 -fPIC -fno-use-cxa-atexit -fexceptions -Wno-write-strings"])
     fi
 fi
 



More information about the mapguide-commits mailing list