[mapguide-commits] r7319 - in branches/2.5/MgDev: . BuildTools/WebTools/IMake
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sat Jan 19 02:58:40 PST 2013
Author: jng
Date: 2013-01-19 02:58:40 -0800 (Sat, 19 Jan 2013)
New Revision: 7319
Modified:
branches/2.5/MgDev/BuildTools/WebTools/IMake/Makefile
branches/2.5/MgDev/configure.in
Log:
#1657: 64-bit linux build fixes
Modified: branches/2.5/MgDev/BuildTools/WebTools/IMake/Makefile
===================================================================
--- branches/2.5/MgDev/BuildTools/WebTools/IMake/Makefile 2013-01-18 14:06:35 UTC (rev 7318)
+++ branches/2.5/MgDev/BuildTools/WebTools/IMake/Makefile 2013-01-19 10:58:40 UTC (rev 7319)
@@ -12,8 +12,8 @@
CXX = g++
LEX = flex
YACC = yacc
-CFLAGS = -pipe -UZTS -Wall -W -O2 -g -pipe -march=i686 -mtune=i686 -fno-use-cxa-atexit -fexceptions -DNDEBUG
-CXXFLAGS = -pipe -UZTS -Wall -W -O2 -g -pipe -march=i686 -mtune=i686 -fno-use-cxa-atexit -fexceptions -DNDEBUG
+CFLAGS = -pipe -UZTS -Wall -W -O2 -g -pipe -fno-use-cxa-atexit -fexceptions -DNDEBUG
+CXXFLAGS = -pipe -UZTS -Wall -W -O2 -g -pipe -fno-use-cxa-atexit -fexceptions -DNDEBUG
LEXFLAGS =
YACCFLAGS= -d
INCPATH = -I$(QTDIR)/mkspecs/default -I.
Modified: branches/2.5/MgDev/configure.in
===================================================================
--- branches/2.5/MgDev/configure.in 2013-01-18 14:06:35 UTC (rev 7318)
+++ branches/2.5/MgDev/configure.in 2013-01-19 10:58:40 UTC (rev 7319)
@@ -121,6 +121,12 @@
[enable_optimized=$enableval],
[enable_optimized=no])
+AC_ARG_ENABLE([64bit],
+ MAP_HELP_STRING([--enable-64bit],
+ [enable 64-bit build [[default=no]]]),
+ [enable_64bit=$enableval],
+ [enable_64bit=no])
+
if test $enable_optimized = no; then
AC_MSG_NOTICE([Using debug configuration])
if test -s gcc32.txt; then
@@ -136,12 +142,32 @@
AC_MSG_NOTICE([Using optimized configuration])
if test -s "gcc32.txt"; then
AC_MSG_NOTICE([gcc 3.2.x . Please pay attention to warnings!])
- 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"])
+ 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"])
+ 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"])
+ fi
else
AC_MSG_NOTICE([this gcc version is not actively supported.])
- 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"])
+ 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"])
+ 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"])
+ fi
fi
fi
More information about the mapguide-commits
mailing list