Skip to content

Commit 70964d8

Browse files
committed
Let sun compiler does not get gcc specific flags that will break the build
1 parent 4f0a1e1 commit 70964d8

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

Jamconfig.in

+15-5
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,23 @@ EDE_TIPS_DIR ?= "$(datadir)/tips" ;
5555
OPTIMFLAGS ?= @EDE_OPTIM_FLAGS@ ;
5656
DEBUGFLAGS ?= @EDE_DEBUG_FLAGS@ ;
5757

58-
# some C libraries have issues with C++ when given '-pedantic' flag, so
59-
# setting 'jam -sPEDANTIC=""' will allow compilation
60-
PEDANTIC = "-pedantic" ;
58+
# FIXME: a quick hack to work everything on SunStudio
59+
if $(SUN_COMPILER) {
60+
WALL ?= "+w2" ;
61+
PEDANTIC ?= ;
62+
WNO_LONG_LONG ?= ;
63+
} else {
64+
# gcc assumed
65+
WALL ?= "-Wall" ;
66+
# some C libraries have issues with C++ when given '-pedantic' flag, so
67+
# setting 'jam -sPEDANTIC=""' will allow compilation
68+
PEDANTIC ?= "-pedantic" ;
69+
WNO_LONG_LONG ?= "-Wno-long-long" ;
70+
}
6171

6272
# global flags used to be passed to every target
63-
GLOBALFLAGS ?= -Wall $(PEDANTIC) -DHAVE_CONFIG_H -I$(TOP) $(OPTIMFLAGS) $(DEBUGFLAGS) ;
64-
STDLIB ?= -lstdc++ ;
73+
GLOBALFLAGS ?= $(WALL) $(PEDANTIC) -DHAVE_CONFIG_H -I$(TOP) $(OPTIMFLAGS) $(DEBUGFLAGS) ;
74+
STDLIB ?= -lstdc++ ;
6575

6676
# Note that REMOVE_UNUSED_DEPENDENCIES_TRICK _does not_ works when
6777
# edelib is compiled as shared library (or when is linked with some shared library)

Jamrules

+6
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ actions quietly Help
5151
echo ""
5252
}
5353

54+
# a hack for Sun compiler
55+
# FIXME: let configure figure these things
56+
if $(SUN_COMPILER) {
57+
GLOBALFLAGS = [ RemoveFlag "-g3" : $(GLOBALFLAGS) ] ;
58+
}
59+
5460
Help help ;
5561
NotFile help ;
5662
Always help ;

0 commit comments

Comments
 (0)