Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 37963 invoked from network); 29 Mar 2007 00:51:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Mar 2007 00:51:50 -0000 Received: (qmail 74775 invoked by uid 500); 29 Mar 2007 00:51:58 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 74765 invoked by uid 500); 29 Mar 2007 00:51:58 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 74754 invoked by uid 99); 29 Mar 2007 00:51:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 17:51:58 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 17:51:50 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id F39F31A9838; Wed, 28 Mar 2007 17:51:29 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: stdcxx-commits@incubator.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070329005129.F39F31A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 * 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