From 46e7388eccc2125f5ca214e67f699f31248444e4 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Fri, 7 Aug 2009 13:29:02 +0000 Subject: [PATCH] We perform C++, not plain C compilation - therefore ese CXXFLAGS instead of CFLAGS --- builds/posix/Makefile.in.boot.gpre | 2 +- builds/posix/Makefile.in.client.fbudf | 2 +- builds/posix/Makefile.in.embed.fbudf | 2 +- builds/posix/Makefile.in.fbserver | 2 +- builds/posix/Makefile.in.fbtrace | 2 +- builds/posix/Makefile.in.intl | 2 +- builds/posix/Makefile.in.libfbclient | 2 +- builds/posix/Makefile.in.libfbstatic | 2 +- builds/posix/Makefile.in.smp_server | 2 +- builds/posix/Makefile.in.static.gbak | 2 +- builds/posix/Makefile.in.static.gpre | 2 +- builds/posix/Makefile.in.static.isql | 2 +- builds/posix/make.rules | 11 ++++++----- builds/posix/prefix.solaris | 6 +++--- configure.in | 10 ++++++++-- 15 files changed, 29 insertions(+), 22 deletions(-) diff --git a/builds/posix/Makefile.in.boot.gpre b/builds/posix/Makefile.in.boot.gpre index 9916ac2add..1381aa9726 100644 --- a/builds/posix/Makefile.in.boot.gpre +++ b/builds/posix/Makefile.in.boot.gpre @@ -30,7 +30,7 @@ # ROOT=.. ObjModuleType=boot -CFLAGS += -DBOOT_BUILD +CXXFLAGS+= -DBOOT_BUILD include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.client.fbudf b/builds/posix/Makefile.in.client.fbudf index 82761df25f..d2455f3bfb 100644 --- a/builds/posix/Makefile.in.client.fbudf +++ b/builds/posix/Makefile.in.client.fbudf @@ -30,7 +30,7 @@ # ROOT=.. ObjModuleType=superclient -CFLAGS+=-DSUPERCLIENT +CXXFLAGS+= -DSUPERCLIENT include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.embed.fbudf b/builds/posix/Makefile.in.embed.fbudf index 5b6e7e1946..51af961741 100644 --- a/builds/posix/Makefile.in.embed.fbudf +++ b/builds/posix/Makefile.in.embed.fbudf @@ -30,7 +30,7 @@ # ROOT=.. ObjModuleType=superclient -CFLAGS+=-DSUPERCLIENT +CXXFLAGS+= -DSUPERCLIENT include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.fbserver b/builds/posix/Makefile.in.fbserver index 23a245971a..43697786b5 100644 --- a/builds/posix/Makefile.in.fbserver +++ b/builds/posix/Makefile.in.fbserver @@ -29,7 +29,7 @@ # ROOT=.. ObjModuleType=superserver -CFLAGS+=-DSUPERSERVER +CXXFLAGS+= -DSUPERSERVER ArchType=super include $(ROOT)/gen/make.defaults diff --git a/builds/posix/Makefile.in.fbtrace b/builds/posix/Makefile.in.fbtrace index 6aa960a220..04cc500ec3 100644 --- a/builds/posix/Makefile.in.fbtrace +++ b/builds/posix/Makefile.in.fbtrace @@ -30,7 +30,7 @@ # ROOT=.. ObjModuleType=superclient -CFLAGS+=-DSUPERCLIENT +CXXFLAGS+= -DSUPERCLIENT include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.intl b/builds/posix/Makefile.in.intl index 22d4615218..ea6ff65910 100644 --- a/builds/posix/Makefile.in.intl +++ b/builds/posix/Makefile.in.intl @@ -30,7 +30,7 @@ # ROOT=.. ObjModuleType=superclient -CFLAGS+=-DSUPERCLIENT +CXXFLAGS+= -DSUPERCLIENT include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.libfbclient b/builds/posix/Makefile.in.libfbclient index d364432167..643ab7bead 100644 --- a/builds/posix/Makefile.in.libfbclient +++ b/builds/posix/Makefile.in.libfbclient @@ -30,7 +30,7 @@ # ROOT=.. ObjModuleType=superclient -CFLAGS+=-DSUPERCLIENT +CXXFLAGS+= -DSUPERCLIENT include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.libfbstatic b/builds/posix/Makefile.in.libfbstatic index 3f081a4839..43bb7b2074 100644 --- a/builds/posix/Makefile.in.libfbstatic +++ b/builds/posix/Makefile.in.libfbstatic @@ -30,7 +30,7 @@ # ROOT=.. ObjModuleType=boot -CFLAGS+=-DBOOT_BUILD +CXXFLAGS+= -DBOOT_BUILD include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.smp_server b/builds/posix/Makefile.in.smp_server index 3cc3b7d200..d313459710 100644 --- a/builds/posix/Makefile.in.smp_server +++ b/builds/posix/Makefile.in.smp_server @@ -29,7 +29,7 @@ # ROOT=.. ObjModuleType=superserver -CFLAGS+=-DSUPERSERVER +CXXFLAGS+= -DSUPERSERVER ArchType=super include $(ROOT)/gen/make.defaults diff --git a/builds/posix/Makefile.in.static.gbak b/builds/posix/Makefile.in.static.gbak index 97b46b7b65..629445dafb 100644 --- a/builds/posix/Makefile.in.static.gbak +++ b/builds/posix/Makefile.in.static.gbak @@ -29,7 +29,7 @@ # ROOT=.. ObjModuleType=boot -CFLAGS += -DBOOT_BUILD +CXXFLAGS+= -DBOOT_BUILD include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.static.gpre b/builds/posix/Makefile.in.static.gpre index a070ecf01a..2c552a943f 100644 --- a/builds/posix/Makefile.in.static.gpre +++ b/builds/posix/Makefile.in.static.gpre @@ -29,7 +29,7 @@ # ROOT=.. ObjModuleType=boot -CFLAGS += -DBOOT_BUILD +CXXFLAGS+= -DBOOT_BUILD include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/Makefile.in.static.isql b/builds/posix/Makefile.in.static.isql index 2f1aa15624..c8ab3e9988 100644 --- a/builds/posix/Makefile.in.static.isql +++ b/builds/posix/Makefile.in.static.isql @@ -30,7 +30,7 @@ # ROOT=.. ObjModuleType=boot -CFLAGS+= -DBOOT_BUILD +CXXFLAGS+= -DBOOT_BUILD include $(ROOT)/gen/make.defaults include $(ROOT)/gen/make.platform diff --git a/builds/posix/make.rules b/builds/posix/make.rules index 557314b12b..180deb39af 100644 --- a/builds/posix/make.rules +++ b/builds/posix/make.rules @@ -32,20 +32,21 @@ # Please don't use compiler/platform specific flags here - nmcc 02-Nov-2002 -WCFLAGS:= $(CFLAGS) -I$(SRC_ROOT)/include/gen -I$(SRC_ROOT)/include -I$(SRC_ROOT)/vulcan \ +WFLAGS:=-I$(SRC_ROOT)/include/gen -I$(SRC_ROOT)/include -I$(SRC_ROOT)/vulcan \ -DNAMESPACE=Vulcan ifeq ($(STD_ICU),false) - WCFLAGS:= $(WCFLAGS) -I$(ROOT)/extern/icu/source/common -I$(ROOT)/extern/icu/source/i18n + WFLAGS:= $(WFLAGS) -I$(ROOT)/extern/icu/source/common -I$(ROOT)/extern/icu/source/i18n endif ifeq ($(IsProdTypeBuild),Y) - WCFLAGS:= $(WCFLAGS) $(PROD_FLAGS) + WFLAGS:= $(WFLAGS) $(PROD_FLAGS) else - WCFLAGS:= $(WCFLAGS) $(DEV_FLAGS) -DDEV_BUILD + WFLAGS:= $(WFLAGS) $(DEV_FLAGS) -DDEV_BUILD endif -WCXXFLAGS:= $(CXXFLAGS) $(WCFLAGS) +WCFLAGS:= $(WFLAGS) $(THR_FLAGS) $(CFLAGS) +WCXXFLAGS:= $(WFLAGS) $(THR_FLAGS) $(CXXFLAGS) # Here we have definitions for using the preprocessor. diff --git a/builds/posix/prefix.solaris b/builds/posix/prefix.solaris index cfff790a4f..128f46b152 100644 --- a/builds/posix/prefix.solaris +++ b/builds/posix/prefix.solaris @@ -54,7 +54,7 @@ # libC and libCrun need libthread for a multithreaded application COMMON_FLAGS= -DSOLARIS -DBSD_COMP -D__EXTENSIONS__ \ -D_POSIX_THREAD_SEMANTICS -D_POSIX_THREAD_PRIO_INHERIT -D_POSIX_C_SOURCE=199506L \ - -mt -KPIC \ + -KPIC \ -erroff=wvarhidemem $(ATOMIC_OPTIONS) # if we keep sfio this needs to be set by configure (or move in to extern directory) @@ -93,8 +93,8 @@ LIB_LINK_SONAME= -h $(1) LIB_LINK_MAPFILE= -M # link options for Solaris linker, /usr/ccs/bin/ld -LINK_OPTS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) -mt -library=no%Cstd,Crun -LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -mt -G -library=no%Cstd,Crun +LINK_OPTS+= -library=no%Cstd,Crun +LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -G -library=no%Cstd,Crun # static link of client library uses c++ compiler and -staticlib=Crun CLIENTLIB_LINK= $(CXX) $(GLOB_OPTIONS) diff --git a/configure.in b/configure.in index 95024a45f8..11a24ae994 100644 --- a/configure.in +++ b/configure.in @@ -273,8 +273,11 @@ dnl CPU_TYPE=ppc64 dnl detect native compiler, Sun Studio Pro comp=`echo "$CXX" | cut -c1-2` case $comp in - CC) MAKEFILE_PREFIX=solaris ; - ICU_PLATFORM=SOLARISX86 ;; + CC) MAKEFILE_PREFIX=solaris + ICU_PLATFORM=SOLARISX86 + PTHREAD_CFLAGS=-mt + PTHREAD_LIBS=-lpthread + ;; *) MAKEFILE_PREFIX=solx86gcc ; ICU_PLATFORM=SOLARISX86GCC ; PTHREAD_CFLAGS=-pthreads ;; @@ -298,6 +301,8 @@ dnl CPU_TYPE=ppc64 CC) MAKEFILE_PREFIX=solaris ; ICU_PLATFORM=SOLARISCC dnl inline assembly for atomic operations on Solaris 9 w SSPRO + PTHREAD_CFLAGS=-mt + PTHREAD_LIBS=-lpthread if test "${target#*solaris}" = "2.9"; then ATOMIC_OPTIONS="../src/common/classes/fb_atomic.il"; fi @@ -389,6 +394,7 @@ AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) dnl Later we always build threaded binaries CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" LIBS="$LIBS $PTHREAD_LIBS" AC_ARG_ENABLE(raw-devices,