You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/05/31 00:32:59 UTC
svn commit: r542961 - /incubator/stdcxx/trunk/etc/config/gcc.config
Author: sebor
Date: Wed May 30 15:32:58 2007
New Revision: 542961
URL: http://svn.apache.org/viewvc?view=rev&rev=542961
Log:
2007-05-30 Martin Sebor <se...@roguewave.com>
* gcc.config: Made formatting consistent (4 space indents
everywhere, at most 78 characters per line).
Modified:
incubator/stdcxx/trunk/etc/config/gcc.config
Modified: incubator/stdcxx/trunk/etc/config/gcc.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/gcc.config?view=diff&rev=542961&r1=542960&r2=542961
==============================================================================
--- incubator/stdcxx/trunk/etc/config/gcc.config (original)
+++ incubator/stdcxx/trunk/etc/config/gcc.config Wed May 30 15:32:58 2007
@@ -6,12 +6,12 @@
#
##############################################################################
-CXX = gcc
-CCVER := $(shell $(CXX) -dumpversion | sed "s/[^0-9]*\([0-9.]*\).*/\1/g")
+CXX = gcc
+CCVER := $(shell $(CXX) -dumpversion | sed "s/[^0-9]*\([0-9.]*\).*/\1/g")
# determine the major version of gcc
-CXX_MAJOR := $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
-CXX_MINOR := $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
+CXX_MAJOR := $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
+CXX_MINOR := $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
# determine the major and minor version of the OS on AIX
ifeq ($(OSNAME),AIX)
@@ -20,25 +20,25 @@
endif
# -W and -Wextra are the same
-WARNFLAGS = -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings
+WARNFLAGS = -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings
# -Wno-long-long not available prior to 2.90
-ifeq ($(shell [ $(CXX_MAJOR) -gt 2 -o $(CXX_MAJOR) -eq 2 -a $(CXX_MINOR) -ge 90 ] && echo 1), 1)
-WARNFLAGS += -Wno-long-long
+ifeq ($(shell [ $(CXX_MAJOR) -gt 2 -o $(CXX_MAJOR) -eq 2 \
+ -a $(CXX_MINOR) -ge 90 ] && echo 1), 1)
+ WARNFLAGS += -Wno-long-long
endif # gcc >= 2.90
# prevent (bogus?) warnings on SunOS
ifneq ($(OSNAME),SunOS)
-WARNFLAGS += -Wcast-align
+ WARNFLAGS += -Wcast-align
else
-# prevent gcc 3.x warnings about #pragma ident on SunOS
-ifeq ($(CXX_MAJOR),3)
-ifeq ($(shell expr $(CXX_MINOR) \< 4),1)
-WARNFLAGS += -Wno-unknown-pragmas
-endif # gcc < 3.4
-endif # gcc == 3.x
-
+ # prevent gcc 3.x warnings about #pragma ident on SunOS
+ ifeq ($(CXX_MAJOR),3)
+ ifeq ($(shell expr $(CXX_MINOR) \< 4),1)
+ WARNFLAGS += -Wno-unknown-pragmas
+ endif # gcc < 3.4
+ endif # gcc == 3.x
endif # !SunOS
# do not enable -Wunreachable-code: it's useless the way implemented
@@ -47,7 +47,7 @@
# endif # gcc > 3.3
-DEPENDFLAGS = -M
+DEPENDFLAGS = -M
# avoid adding -FPIC on IBM AIX and Cygwin where
# gcc generated code is always position independent
@@ -64,53 +64,53 @@
endif
ifneq ($(MAPFLAGS),)
- # path to mapfile (relative to $(TOPDIR)) for symbol versioning
- ifneq ($(CXX_MAJOR),2)
- MAPFILE = src/mapfile.$(CXX)
- else
- # gcc 2.x implements a different ABI than gcc 3
- MAPFILE = src/mapfile.$(CXX)-$(CXX_MAJOR)
- endif
+ # path to mapfile (relative to $(TOPDIR)) for symbol versioning
+ ifneq ($(CXX_MAJOR),2)
+ MAPFILE = src/mapfile.$(CXX)
+ else
+ # gcc 2.x implements a different ABI than gcc 3
+ MAPFILE = src/mapfile.$(CXX)-$(CXX_MAJOR)
+ endif
endif
ifneq ($(OSNAME),Darwin)
- # no -shared option for GCC on Mac OS X (Darwin)
- LDSOFLAGS = -shared
+ # no -shared option for GCC on Mac OS X (Darwin)
+ LDSOFLAGS = -shared
else
- # -dynamiclib is needed when linking the library
- LDSOFLAGS = -dynamiclib
+ # -dynamiclib is needed when linking the library
+ LDSOFLAGS = -dynamiclib
endif
# -fPIC needed both to compile and link shared libs on HP-UX 11
ifeq ($(OSNAME),HP-UX)
-LDSOFLAGS += -fPIC
+ LDSOFLAGS += -fPIC
endif
ifeq ($(CXX_MAJOR),3)
- ifeq ($(shell [ $(CXX_MINOR) -lt 4 ] && echo 1),1)
- # for gcc 3 prior to gcc 3.4 force linking with libgcc_s.so
- # and avoid linking with libgcc_s.a to get stack unwinding
- # due to exceptions right (see STDCXX-369)
- LDSOFLAGS += -shared-libgcc
- endif
+ ifeq ($(shell [ $(CXX_MINOR) -lt 4 ] && echo 1),1)
+ # for gcc 3 prior to gcc 3.4 force linking with libgcc_s.so
+ # and avoid linking with libgcc_s.a to get stack unwinding
+ # due to exceptions right (see STDCXX-369)
+ LDSOFLAGS += -shared-libgcc
+ endif
endif
-CXXFLAGS = -pedantic -nostdinc++
+CXXFLAGS = -pedantic -nostdinc++
ifeq ($(CXX_MAJOR),2)
-ifeq ($(shell expr $(CXX_MINOR) / 10),9)
-CXXFLAGS += -fhonor-std -ftemplate-depth-32
-else
-CXXFLAGS += -ftemplate-depth-32
-endif
+ ifeq ($(shell expr $(CXX_MINOR) / 10),9)
+ CXXFLAGS += -fhonor-std -ftemplate-depth-32
+ else
+ CXXFLAGS += -ftemplate-depth-32
+ endif
endif
ifeq ($(OSNAME),IRIX64)
ifeq ($(CXX_MAJOR),2)
- # prevent (some) assembler errors caused by overly long symbol names
- # (the option is not supported in gcc 3 and beyond)
- CXXFLAGS += -fsquangle
+ # prevent (some) assembler errors caused by overly long symbol
+ # names (the option is not supported in gcc 3 and beyond)
+ CXXFLAGS += -fsquangle
endif
# disable ld warnings about libs not used to resolve any symbols
@@ -119,59 +119,59 @@
# prevent (some) assemler errors caused by overly long symbol names
ifeq ($(OSNAME),OSF1)
-CXXFLAGS += -fsquangle
+ CXXFLAGS += -fsquangle
endif
-CXXPRELINK =
+CXXPRELINK =
# enable C++ C library headers (the <cname> kind)
-CPPFLAGS = -I$(TOPDIR)/include/ansi
+CPPFLAGS = -I$(TOPDIR)/include/ansi
# decrease warning level to prevent annoying linker warnings
# about duplicate symbols (the linker has no concept of weak symbols)
ifeq ($(OSNAME),AIX)
- LDFLAGS = -Wl,-bh:5
+ LDFLAGS = -Wl,-bh:5
endif
ifneq ($(CXX_MAJOR),2)
- # gcc 3.x needs to explicitly link with libsupc++ for language support
- # g++ 3.x links with it as well as libstdc++ automatically
- LDLIBS = -lsupc++
-
- ifeq ($(OSNAME),Darwin)
- # link with gcc_eh to resolve the _Unwind_xxx functions
- # (shouldn't we link with it on all platforms?)
- LDLIBS += -lgcc_eh
- endif
+ # gcc 3.x needs to explicitly link with libsupc++ for language support
+ # g++ 3.x links with it as well as libstdc++ automatically
+ LDLIBS = -lsupc++
+
+ ifeq ($(OSNAME),Darwin)
+ # link with gcc_eh to resolve the _Unwind_xxx functions
+ # (shouldn't we link with it on all platforms?)
+ LDLIBS += -lgcc_eh
+ endif
endif # gcc > 2
# The flag(s) to use to embed a library search path into generated executables.
ifeq ($(OSNAME),Linux)
- RPATH = -Wl,-R
-else
- ifeq ($(OSNAME),SunOS)
RPATH = -Wl,-R
- else
- ifeq ($(OSNAME),AIX)
- ifeq ($(shell [ $(OS_MAJOR) -gt 5 -o $(OS_MAJOR) -eq 5 -a $(OS_MINOR) \
--ge 3 ] && echo 1), 1)
- # -bsrv4, -R only available on AIX 5.3 and newer
- RPATH = -Wl,-bsvr4,-R
- endif
+else
+ ifeq ($(OSNAME),SunOS)
+ RPATH = -Wl,-R
else
- ifeq ($(OSNAME),HP-UX)
- RPATH = -Wl,+b
- else
- ifeq ($(OSNAME),IRIX64)
- RPATH = -Wl,-rpath,
+ ifeq ($(OSNAME),AIX)
+ ifeq ($(shell [ $(OS_MAJOR) -gt 5 -o $(OS_MAJOR) -eq 5 \
+ -a $(OS_MINOR) -ge 3 ] && echo 1), 1)
+ # -bsrv4, -R only available on AIX 5.3 and newer
+ RPATH = -Wl,-bsvr4,-R
+ endif
else
- ifeq ($(OSNAME),OSF1)
- RPATH = -Wl,-rpath,
- endif
+ ifeq ($(OSNAME),HP-UX)
+ RPATH = -Wl,+b
+ else
+ ifeq ($(OSNAME),IRIX64)
+ RPATH = -Wl,-rpath,
+ else
+ ifeq ($(OSNAME),OSF1)
+ RPATH = -Wl,-rpath,
+ endif
+ endif
+ endif
endif
- endif
endif
- endif
endif
# debug/optimization options
@@ -187,19 +187,19 @@
SHARED_LDFLAGS =
ifeq ($(OSNAME),AIX)
- SHARED_SUFFIX = .a
+ SHARED_SUFFIX = .a
endif
ifeq ($(OSNAME),HP-UX)
- SHARED_SUFFIX = .sl
+ SHARED_SUFFIX = .sl
endif
ifeq ($(OSNAME),Darwin)
- SHARED_SUFFIX = .dylib
+ SHARED_SUFFIX = .dylib
endif
ifneq ($(findstring CYGWIN,$(OSNAME)),)
- SHARED_SUFFIX = .dll
+ SHARED_SUFFIX = .dll
endif
STATIC_CXXFLAGS =
@@ -212,32 +212,32 @@
# the same option is named -pthreads on Solaris
ifeq ($(findstring CYGWIN,$(OSNAME)),)
- ifeq ($(OSNAME),SunOS)
- MULTI_CPPFLAGS_POSIX = -pthreads
- MULTI_LDFLAGS_POSIX = -pthreads
- else
- ifeq ($(OSNAME),IRIX64)
- # no -pthreads option (or similar) on IRIX?
- MULTI_CPPFLAGS_POSIX = -D_REENTRANT
- MULTI_LDFLAGS_POSIX = -lpthread
+ ifeq ($(OSNAME),SunOS)
+ MULTI_CPPFLAGS_POSIX = -pthreads
+ MULTI_LDFLAGS_POSIX = -pthreads
else
- # option doesn't exist in Darwin gcc
- ifneq ($(OSNAME),Darwin)
- MULTI_CPPFLAGS_POSIX = -pthread
- MULTI_LDFLAGS_POSIX = -pthread
- endif
+ ifeq ($(OSNAME),IRIX64)
+ # no -pthreads option (or similar) on IRIX?
+ MULTI_CPPFLAGS_POSIX = -D_REENTRANT
+ MULTI_LDFLAGS_POSIX = -lpthread
+ else
+ # option doesn't exist in Darwin gcc
+ ifneq ($(OSNAME),Darwin)
+ MULTI_CPPFLAGS_POSIX = -pthread
+ MULTI_LDFLAGS_POSIX = -pthread
+ endif
+ endif
endif
- endif
else
- # on Cygwin use MingW-threads by default
- MULTI_CPPFLAGS_POSIX = -mthreads
- MULTI_LDFLAGS_POSIX = -mthreads
+ # on Cygwin use MingW-threads by default
+ MULTI_CPPFLAGS_POSIX = -mthreads
+ MULTI_LDFLAGS_POSIX = -mthreads
- # link with libcatgets and libiconv
- LDLIBS += -lcatgets -liconv
+ # link with libcatgets and libiconv
+ LDLIBS += -lcatgets -liconv
- # set the assembler file suffix to .s
- AS_EXT = .s
+ # set the assembler file suffix to .s
+ AS_EXT = .s
endif
MULTI_CPPFLAGS_SOLARIS = -threads
@@ -259,39 +259,39 @@
arch=$(shell uname -p 2>/dev/null)
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
+ # 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 =
+ # 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 =
- # wide (64-bit) mode is implicit
- endif
+ # 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