stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r654664 - /stdcxx/branches/4.2.x/etc/config/gcc.config
Date Fri, 09 May 2008 01:58:32 GMT
Author: sebor
Date: Thu May  8 18:58:32 2008
New Revision: 654664

URL: http://svn.apache.org/viewvc?rev=654664&view=rev
Log:
2008-05-08  Martin Sebor  <sebor@roguewave.com>

	STDCXX-929
	* etc/config/gcc.config: Unconditionally checked code generated
	by the compiler to see if it's ILP32 or LP64.
	[HP-UX] (CXXFLAGS.wide, LDFLAGS.wide, LDSOFLAGS.wide): Removed
	assumption that -milp64 is the default on IPF.

Modified:
    stdcxx/branches/4.2.x/etc/config/gcc.config

Modified: stdcxx/branches/4.2.x/etc/config/gcc.config
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/gcc.config?rev=654664&r1=654663&r2=654664&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/etc/config/gcc.config (original)
+++ stdcxx/branches/4.2.x/etc/config/gcc.config Thu May  8 18:58:32 2008
@@ -277,45 +277,47 @@
 SINGL_CPPFLAGS =
 SINGL_LDFLAGS  =
 
-# (try to) determine the architecture via the (non-standard) -p option
-# the option is recognized on at least HP-UX, IRIX, and Linux (are there
-# any other systems running on IA64?)
-arch=$(shell uname -p 2>/dev/null)
+# gcc can generate 32-bit or 64-bit code by default, depending
+# on how it's configured
+# determine whether the default compiler invocation produces
+# wide (64-bit) or narrow (32-bit) code and set compiler,
+# linker, and other options accordingly
+wide = $(shell    cd /tmp; tmpfile=stdcxx-longsize-$$; export tmpfile;  \
+                  echo "int main() { return 8 == sizeof (long); }"      \
+                       > $$tmpfile.c                                    \
+               && $(CXX) $$tmpfile.c >/dev/null 2>&1 -o $$tmpfile;    
 \
+               ./$$tmpfile; echo $$?; rm -f $$tmpfile.c $$tmpfile)
+
+ifeq ($(wide),0)
+    # narrow (32-bit) mode is implicit
+    # use wide (64-bit) flags to explicitly enable LP64 mode
+
+    ifeq ($(OSNAME),HP-UX)
+        # -milp32 and -mlp64 are options specific to HP-UX
+        CXXFLAGS.wide    = -mlp64
+        LDFLAGS.wide     = -mlp64
+        LDSOFLAGS.wide   = -mlp64
+        ARFLAGS.wide     =
+    else
+        CXXFLAGS.wide    = -m64
+        LDFLAGS.wide     = -m64
+        LDSOFLAGS.wide   = -m64
+        ARFLAGS.wide     =
+    endif
+
+else
+    # wide (64-bit) mode is implicit
+    # use narrow (32-bit) flags to explicitly enable ILP32 mode
 
-ifeq ($(arch),ia64)
-    # LP64 is the default (implicit) setting on IA64
     ifeq ($(OSNAME),HP-UX)
-        # -milp32, -mlp64, etc. are options specific to HP-UX
         CXXFLAGS.narrow  = -milp32
         LDFLAGS.narrow   = -milp32
         LDSOFLAGS.narrow = -milp32
         ARFLAGS.narrow   =
-    endif
-else
-    # determine whether the default compiler invocation produces
-    # wide (64-bit) or narrow (32-bit) code and set compiler,
-    # linker, and other flags accordingly
-    wide = $(shell tmpfile=/tmp/longsize-$$; export tmpfile;           \
-                   echo "int main() { return 8 == sizeof (long); }"    \
-                        > $$tmpfile.c                                  \
-                   && $(CXX) $$tmpfile.c >/dev/null 2>&1 -o $$tmpfile;
\
-                   $$tmpfile; echo $$?; rm -f $$tmpfile.c $$tmpfile)
-
-    ifeq ($(wide),0)
-        # wide (64-bit) flags
-        CXXFLAGS.wide  = -m64
-        LDFLAGS.wide   = -m64
-        LDSOFLAGS.wide = -m64
-        ARFLAGS.wide   =
-
-        # narrow (32-bit) mode is implicit
     else
-        # narrow (32-bit) flags
         CXXFLAGS.narrow  = -m32
         LDFLAGS.narrow   = -m32
         LDSOFLAGS.narrow = -m32
         ARFLAGS.narrow   =
-
-        # wide (64-bit) mode is implicit
     endif
 endif



Mime
View raw message