[complement-svn] SF.net SVN: complement: [1815] trunk/complement/explore/Makefiles
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2008-02-26 10:55:20
|
Revision: 1815 http://complement.svn.sourceforge.net/complement/?rev=1815&view=rev Author: complement Date: 2008-02-26 02:55:11 -0800 (Tue, 26 Feb 2008) Log Message: ----------- use more convenient option -dumpversion to detect compiler's revision; check that -fuse-cxa-atexit really required; remove -fident option Modified Paths: -------------- trunk/complement/explore/Makefiles/ChangeLog trunk/complement/explore/Makefiles/gmake/gcc.mak Modified: trunk/complement/explore/Makefiles/ChangeLog =================================================================== --- trunk/complement/explore/Makefiles/ChangeLog 2008-02-20 09:47:34 UTC (rev 1814) +++ trunk/complement/explore/Makefiles/ChangeLog 2008-02-26 10:55:11 UTC (rev 1815) @@ -1,3 +1,9 @@ +2008-02-26 Petr Ovtchenkov <pt...@is...> + + * gmake/gcc.mak: use more convenient option -dumpversion + to detect compiler's revision; check that -fuse-cxa-atexit + really required; remove -fident option. + 2008-01-17 Petr Ovtchenkov <pt...@is...> * gmake/topdoc.mak: rules to generate mps from mp, that was made Modified: trunk/complement/explore/Makefiles/gmake/gcc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/gcc.mak 2008-02-20 09:47:34 UTC (rev 1814) +++ trunk/complement/explore/Makefiles/gmake/gcc.mak 2008-02-26 10:55:11 UTC (rev 1815) @@ -1,4 +1,4 @@ -# Time-stamp: <07/07/12 10:51:42 ptr> +# Time-stamp: <08/02/26 13:46:36 yeti> # # Copyright (c) 1997-1999, 2002, 2003, 2005-2008 # Petr Ovtchenkov @@ -31,30 +31,22 @@ AS := ${TARGET_OS}-${AS} endif -ifeq ($(OSNAME), darwin) CXX_VERSION := $(shell ${CXX} -dumpversion) -# TODO: ensure PANTHER's gcc compatibility... -CXX_VERSION_MAJOR := $(shell ${CXX} -dumpversion | awk 'BEGIN { FS = "."; } { print $1; }') -CXX_VERSION_MINOR := $(shell ${CXX} -dumpversion | awk 'BEGIN { FS = "."; } { print $2; }') -CXX_VERSION_PATCH := $(shell ${CXX} -dumpversion | awk 'BEGIN { FS = "."; } { print $3; }') +CXX_VERSION_MAJOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$1; }') +CXX_VERSION_MINOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$2; }') +CXX_VERSION_PATCH := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$3; }') + +# Check that we need option -fuse-cxa-atexit for compiler +_CXA_ATEXIT := $(shell ${CXX} -v 2>&1 | grep -q -e "--enable-__cxa_atexit" || echo "-fuse-cxa-atexit") + +ifeq ($(OSNAME), darwin) # This is to differentiate Apple-builded compiler from original -# compiler (it's has different behaviour) +# GNU compiler (it's has different behaviour) ifneq ("$(shell ${CXX} -v 2>&1 | grep Apple)", "") GCC_APPLE_CC := 1 endif -else -CXX_VERSION := $(shell ${CXX} --version | grep GCC | awk '{ print $$3; }') - -ifeq ($(CXX_VERSION),) -# 2.95 report only version -CXX_VERSION := $(shell ${CXX} --version) endif -CXX_VERSION_MAJOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$1; }') -CXX_VERSION_MINOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$2; }') -CXX_VERSION_PATCH := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$3; }') -endif - DEFS ?= OPT ?= @@ -78,7 +70,7 @@ dbg-shared : RCFLAGS += -DBUILD=g -DBUILD_INFOS=-g stldbg-shared : RCFLAGS += -DBUILD=stlg -DBUILD_INFOS="-g -D_STLP_DEBUG" RC_OUTPUT_OPTION = -o $@ -CXXFLAGS = -Wall -Wsign-promo -Wcast-qual -fexceptions -fident +CXXFLAGS = -Wall -Wsign-promo -Wcast-qual -fexceptions ifeq ($(OSREALNAME), mingw) CCFLAGS += -mthreads CFLAGS += -mthreads @@ -104,30 +96,30 @@ ifeq ($(OSNAME),sunos) CCFLAGS = -pthreads $(OPT) CFLAGS = -pthreads $(OPT) -# CXXFLAGS = -pthreads -nostdinc++ -fexceptions -fident $(OPT) -CXXFLAGS = -pthreads -fexceptions -fident $(OPT) +# CXXFLAGS = -pthreads -nostdinc++ -fexceptions $(OPT) +CXXFLAGS = -pthreads -fexceptions $(OPT) endif ifeq ($(OSNAME),linux) CCFLAGS = -pthread $(OPT) CFLAGS = -pthread $(OPT) -# CXXFLAGS = -pthread -nostdinc++ -fexceptions -fident $(OPT) -CXXFLAGS = -pthread -fexceptions -fident $(OPT) +# CXXFLAGS = -pthread -nostdinc++ -fexceptions $(OPT) +CXXFLAGS = -pthread -fexceptions $(OPT) endif ifeq ($(OSNAME),openbsd) CCFLAGS = -pthread $(OPT) CFLAGS = -pthread $(OPT) -# CXXFLAGS = -pthread -nostdinc++ -fexceptions -fident $(OPT) -CXXFLAGS = -pthread -fexceptions -fident $(OPT) +# CXXFLAGS = -pthread -nostdinc++ -fexceptions $(OPT) +CXXFLAGS = -pthread -fexceptions $(OPT) endif ifeq ($(OSNAME),freebsd) CCFLAGS = -pthread $(OPT) CFLAGS = -pthread $(OPT) DEFS += -D_REENTRANT -# CXXFLAGS = -pthread -nostdinc++ -fexceptions -fident $(OPT) -CXXFLAGS = -pthread -fexceptions -fident $(OPT) +# CXXFLAGS = -pthread -nostdinc++ -fexceptions $(OPT) +CXXFLAGS = -pthread -fexceptions $(OPT) endif ifeq ($(OSNAME),darwin) @@ -143,8 +135,8 @@ ifeq ($(OSNAME),hp-ux) CCFLAGS = -pthread $(OPT) CFLAGS = -pthread $(OPT) -# CXXFLAGS = -pthread -nostdinc++ -fexceptions -fident $(OPT) -CXXFLAGS = -pthread -fexceptions -fident $(OPT) +# CXXFLAGS = -pthread -nostdinc++ -fexceptions $(OPT) +CXXFLAGS = -pthread -fexceptions $(OPT) endif #ifeq ($(CXX_VERSION_MAJOR),3) @@ -165,7 +157,7 @@ # Required for correct order of static objects dtors calls: ifeq ("$(findstring $(OSNAME),darwin windows)","") ifneq ($(CXX_VERSION_MAJOR),2) -CXXFLAGS += -fuse-cxa-atexit +CXXFLAGS += $(_CXA_ATEXIT) endif endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |