From f817d5bca4d92ec4fdc67d24e161b958c2218d81 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine@gmail.com" Date: Tue, 6 Mar 2012 06:13:58 +0000 Subject: Fixed gcc version detection in build scripts, added BadaSDK support git-svn-id: http://pugixml.googlecode.com/svn/trunk@840 99668b35-9821-0410-8761-19e4c4f06640 --- Jamrules.jam | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'Jamrules.jam') diff --git a/Jamrules.jam b/Jamrules.jam index 53172a8..39f0daa 100644 --- a/Jamrules.jam +++ b/Jamrules.jam @@ -1,11 +1,19 @@ # Rules for Jamfile.jam -if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) ) +if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) || $(toolset:I=^bada) || $(toolset:I=^android) ) { if ( $(toolset:I=^gcc) ) { GCCPATH = "" ; } + else if ( $(toolset:I=^bada) ) + { + GCCPATH = "%$(toolset)_PATH%\\Tools\\Toolchains\\ARM\\bin\\arm-bada-eabi-" ; + } + else if ( $(toolset:I=^android) ) + { + GCCPATH = "%$(toolset)_PATH%\\bin\\arm-linux-androideabi-" ; + } else { GCCPATH = "%$(toolset)_PATH%\\bin\\" ; @@ -15,7 +23,11 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) ) { ARCH = "" ; - if ( $(OS) = NT || $(OS) = FREEBSD ) + if ( $(toolset:I=^bada) ) + { + LDFLAGS += -lstdc++ -lsupc++-xnew -lc ; + } + else if ( $(OS) = NT || $(OS) = FREEBSD ) { LDFLAGS += -static-libgcc -static ; } @@ -34,19 +46,7 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) ) LDFLAGS += $(ARCH) ; } - rule MatchVersion MAJOR : MINOR - { - local REGEX = "(gcc|mingw)"$(MAJOR)"\\.?"$(MINOR) ; - - if ( $(toolset:I=$(REGEX)) ) - { - return 1 ; - } - else - { - return 0 ; - } - } + local VERSION = [ Shell "$(GCCPATH)gcc -dumpversion" ] ; rule GetCFlags CONFIG : DEFINES { @@ -58,7 +58,7 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) ) RESULT += -Wunused -Wstrict-aliasing=2 -Wundef -Wshadow -Wredundant-decls ; # gcc 4.0 has some warning regressions - if ( [ MatchVersion 4 : 0 ] = 0 ) + if ( $(VERSION:X=4\.0) ) { RESULT += -Wold-style-cast ; # gives warnings for fpclassify() on gcc 4.0.1 RESULT += -Wswitch-default ; # gives false-positives for couple of switches on template argument on gcc 4.0.1 @@ -66,7 +66,7 @@ if ( $(toolset:I=^mingw) || $(toolset:I=^gcc) ) } # these warnings are supported on newer GCC versions only - if ( [ MatchVersion 4 : "[4-9]" ] = 1 ) + if ( $(VERSION) >= "4.4.0" ) { RESULT += -Wstrict-null-sentinel -Wlogical-op -Wmissing-declarations ; } @@ -716,7 +716,7 @@ if ( $(UNIX) ) } else { - if ( $(toolset:I=(^xbox360|^ps3|wince$)) ) + if ( $(toolset:I=(^xbox360|^ps3|wince|^bada$)) ) { actions RunAction { -- cgit v1.2.3