Let sun compiler does not get gcc specific flags that will break the build

This commit is contained in:
Sanel Zukan 2009-04-16 16:56:14 +00:00
parent 4f0a1e1ef1
commit 70964d806c
2 changed files with 21 additions and 5 deletions

View File

@ -55,12 +55,22 @@ EDE_TIPS_DIR ?= "$(datadir)/tips" ;
OPTIMFLAGS ?= @EDE_OPTIM_FLAGS@ ;
DEBUGFLAGS ?= @EDE_DEBUG_FLAGS@ ;
# some C libraries have issues with C++ when given '-pedantic' flag, so
# setting 'jam -sPEDANTIC=""' will allow compilation
PEDANTIC = "-pedantic" ;
# FIXME: a quick hack to work everything on SunStudio
if $(SUN_COMPILER) {
WALL ?= "+w2" ;
PEDANTIC ?= ;
WNO_LONG_LONG ?= ;
} else {
# gcc assumed
WALL ?= "-Wall" ;
# some C libraries have issues with C++ when given '-pedantic' flag, so
# setting 'jam -sPEDANTIC=""' will allow compilation
PEDANTIC ?= "-pedantic" ;
WNO_LONG_LONG ?= "-Wno-long-long" ;
}
# global flags used to be passed to every target
GLOBALFLAGS ?= -Wall $(PEDANTIC) -DHAVE_CONFIG_H -I$(TOP) $(OPTIMFLAGS) $(DEBUGFLAGS) ;
GLOBALFLAGS ?= $(WALL) $(PEDANTIC) -DHAVE_CONFIG_H -I$(TOP) $(OPTIMFLAGS) $(DEBUGFLAGS) ;
STDLIB ?= -lstdc++ ;
# Note that REMOVE_UNUSED_DEPENDENCIES_TRICK _does not_ works when

View File

@ -51,6 +51,12 @@ actions quietly Help
echo ""
}
# a hack for Sun compiler
# FIXME: let configure figure these things
if $(SUN_COMPILER) {
GLOBALFLAGS = [ RemoveFlag "-g3" : $(GLOBALFLAGS) ] ;
}
Help help ;
NotFile help ;
Always help ;