stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r523520 - in /incubator/stdcxx/trunk: GNUmakefile etc/config/acc.config etc/config/gcc.config etc/config/mipspro.config etc/config/vacpp.config
Date Thu, 29 Mar 2007 00:51:29 GMT
Author: sebor
Date: Wed Mar 28 17:51:28 2007
New Revision: 523520

URL: http://svn.apache.org/viewvc?view=rev&rev=523520
Log:
2007-03-28  Martin Sebor  <sebor@roguewave.com>

	* GNUmakefile (CXXFLAGS.narrow, LDFLAGS.narrow, LDSOFLAGS.narrow,
	ARFLAGS.narrow): Added options to BUILDMODE whenever a "narrow"
	BUILDTYPE (i.e., one of { 8s, 11s, 12s, and 15s } is specified.
	* acc.config (CXXFLAGS.narrow, LDFLAGS.narrow, LDSOFLAGS.narrow,
	ARFLAGS.narrow): Commented out options implicit in the default
	invocation of the compiler.
	* mipspro.config: Ditto.
	* vacpp.config: Ditto.
	* gcc.config (CXXFLAGS.narrow, LDFLAGS.narrow, LDSOFLAGS.narrow,
	ARFLAGS.narrow, CXXFLAGS.wide, LDFLAGS.wide, LDSOFLAGS.wide,
	ARFLAGS.wide): Autodetected whether the default invocation of
	the compiler produces narrow (32-bit) or wide (64-bit) code and
	set options accordingly, avoiding specifying redundant options.

Modified:
    incubator/stdcxx/trunk/GNUmakefile
    incubator/stdcxx/trunk/etc/config/acc.config
    incubator/stdcxx/trunk/etc/config/gcc.config
    incubator/stdcxx/trunk/etc/config/mipspro.config
    incubator/stdcxx/trunk/etc/config/vacpp.config

Modified: incubator/stdcxx/trunk/GNUmakefile
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/GNUmakefile?view=diff&rev=523520&r1=523519&r2=523520
==============================================================================
--- incubator/stdcxx/trunk/GNUmakefile (original)
+++ incubator/stdcxx/trunk/GNUmakefile Wed Mar 28 17:51:28 2007
@@ -297,7 +297,7 @@
 
   # decode the BUILDTYPE value and set BUILDMODE correspondingly
   ifeq ($(BUILDTYPE),8s)
-    bmode = optimized
+    bmode = optimized,narrow
   endif   # ifeq ($(BUILDTYPE),8s)
 
   ifeq ($(BUILDTYPE),8S)
@@ -305,7 +305,7 @@
   endif   # ifeq ($(BUILDTYPE),8s)
 
   ifeq ($(BUILDTYPE),8d)
-    bmode = shared,optimized
+    bmode = shared,optimized,narrow
   endif   # ifeq ($(BUILDTYPE),8d)
 
   ifeq ($(BUILDTYPE),8D)
@@ -313,7 +313,7 @@
   endif   # ifeq ($(BUILDTYPE),8d)
 
   ifeq ($(BUILDTYPE),11s)
-    bmode = debug
+    bmode = debug,narrow
   endif   # ifeq ($(BUILDTYPE),11s)
 
   ifeq ($(BUILDTYPE),11S)
@@ -322,7 +322,7 @@
 
   # 11d - single-thread, debug, shared
   ifeq ($(BUILDTYPE),11d)
-    bmode = debug,shared
+    bmode = debug,shared,narrow
   endif   # ifeq ($(BUILDTYPE),11d)
 
   ifeq ($(BUILDTYPE),11D)
@@ -331,7 +331,7 @@
 
   # 12s - multi-thread, optimized, static
   ifeq ($(BUILDTYPE),12s)
-    bmode = pthreads,optimized
+    bmode = pthreads,optimized,narrow
   endif   # ifeq ($(BUILDTYPE),12s)
 
   ifeq ($(BUILDTYPE),12S)
@@ -340,7 +340,7 @@
 
   # 12d - multi-thread, optimized, shared
   ifeq ($(BUILDTYPE),12d)
-    bmode = pthreads,shared,optimized
+    bmode = pthreads,shared,optimized,narrow
   endif   # ifeq ($(BUILDTYPE),12d)
 
   ifeq ($(BUILDTYPE),12D)
@@ -349,7 +349,7 @@
 
   # 15s - multi-thread, debug, static
   ifeq ($(BUILDTYPE),15s)
-    bmode = debug,pthreads
+    bmode = debug,pthreads,narrow
   endif   # ifeq ($(BUILDTYPE),15s)
 
   ifeq ($(BUILDTYPE),15S)
@@ -364,6 +364,12 @@
   ifeq ($(BUILDTYPE),15D)
     bmode = debug,pthreads,shared,wide
   endif   # ifeq ($(BUILDTYPE),15d)
+
+  ifneq ($(BUILDTYPE),)
+    ifeq ($(bmode),)
+      $(error "unknown BUILDTYPE value: '$(BUILDTYPE)'")
+    endif
+  endif
 
   ifeq ($(TOPDIR),)
     # during the first (non-recursive) invocation only,

Modified: incubator/stdcxx/trunk/etc/config/acc.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/acc.config?view=diff&rev=523520&r1=523519&r2=523520
==============================================================================
--- incubator/stdcxx/trunk/etc/config/acc.config (original)
+++ incubator/stdcxx/trunk/etc/config/acc.config Wed Mar 28 17:51:28 2007
@@ -1,3 +1,4 @@
+# -*- Makefile -*-
 #
 # $Id$
 #
@@ -110,10 +111,10 @@
 CXXFLAGS.wide    = +DD64
 LDFLAGS.wide     = +DD64
 LDSOFLAGS.wide   = +DD64
-ARFLAGS.wide   =
+ARFLAGS.wide     =
 
 # narrow (32-bit, ILP32) flags -- implicit in the default invocation
-CXXFLAGS.narrow  = +DD32
-LDFLAGS.narrow   = +DD32
-LDSOFLAGS.narrow = +DD32
-ARFLAGS.narrow   =
+# CXXFLAGS.narrow  = +DD32
+# LDFLAGS.narrow   = +DD32
+# LDSOFLAGS.narrow = +DD32
+# ARFLAGS.narrow   =

Modified: incubator/stdcxx/trunk/etc/config/gcc.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/gcc.config?view=diff&rev=523520&r1=523519&r2=523520
==============================================================================
--- incubator/stdcxx/trunk/etc/config/gcc.config (original)
+++ incubator/stdcxx/trunk/etc/config/gcc.config Wed Mar 28 17:51:28 2007
@@ -253,9 +253,30 @@
     ARFLAGS.narrow   =
   endif
 else
-  # wide (64-bit flags)
-  CXXFLAGS.wide  = -m64
-  LDFLAGS.wide   = -m64
-  LDSOFLAGS.wide = -m64
-  ARFLAGS.wide   =
+  # 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

Modified: incubator/stdcxx/trunk/etc/config/mipspro.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/mipspro.config?view=diff&rev=523520&r1=523519&r2=523520
==============================================================================
--- incubator/stdcxx/trunk/etc/config/mipspro.config (original)
+++ incubator/stdcxx/trunk/etc/config/mipspro.config Wed Mar 28 17:51:28 2007
@@ -1,3 +1,4 @@
+# -*- Makefile -*-
 #
 # $Id$
 #
@@ -79,7 +80,7 @@
 ARFLAGS.wide   =
 
 # narrow (32-bit) flags -- implicit in the default invocation
-CXXFLAGS.narrow  = -32
-LDFLAGS.narrow   = -32
-LDSOFLAGS.narrow = -32
-ARFLAGS.narrow   =
+# CXXFLAGS.narrow  = -32
+# LDFLAGS.narrow   = -32
+# LDSOFLAGS.narrow = -32
+# ARFLAGS.narrow   =

Modified: incubator/stdcxx/trunk/etc/config/vacpp.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/vacpp.config?view=diff&rev=523520&r1=523519&r2=523520
==============================================================================
--- incubator/stdcxx/trunk/etc/config/vacpp.config (original)
+++ incubator/stdcxx/trunk/etc/config/vacpp.config Wed Mar 28 17:51:28 2007
@@ -196,10 +196,10 @@
 endif
 
 # narrow (32-bit) flags -- implicit in the default invocation
-CXXFLAGS.narrow  = -q32
-LDFLAGS.narrow   = -q32
-LDSOFLAGS.narrow = -q32
-ARFLAGS.narrow   =
+# CXXFLAGS.narrow  = -q32
+# LDFLAGS.narrow   = -q32
+# LDSOFLAGS.narrow = -q32
+# ARFLAGS.narrow   =
 
 
 # override default (rv, no leading dash) to make ar -rv -X64 well-formed



Mime
View raw message