configure & build: Rework legacy GCC detection to parse versions outside of Jam.
Jam comparison logic is string-based, and so was detecting GCC >= 10 as being < 2. This rectifies that by removing the GCC version parsing from Jam logic entirely, and setting various BuildConfig variables instead. Change-Id: I0c0ae3b9002fb5e77f9ca7a78600c91871657f03 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3293 Reviewed-by: Adrien Destugues <[email protected]> Reviewed-by: Jérôme Duval <[email protected]> Reviewed-by: Alex von Gluck IV <[email protected]>
This commit is contained in:
committed by
Alex von Gluck IV
parent
a3f0a36a79
commit
47320dd0ab
+1
-29
@@ -208,40 +208,12 @@ rule SetPlatformCompatibilityFlagVariables
|
||||
?= $($(varPrefix)_PLATFORM_HAIKU_COMPATIBLE) ;
|
||||
}
|
||||
|
||||
rule FAnalyzeGCCVersion
|
||||
{
|
||||
# FAnalyzeGCCVersion <rawVersionVariable> ;
|
||||
#
|
||||
local varName = $(1) ;
|
||||
local rawVersion = $($(varName)) ;
|
||||
|
||||
if ! $(rawVersion) {
|
||||
ECHO "Variable $(varName) not set. Please run ./configure or" ;
|
||||
EXIT "specify it manually." ;
|
||||
}
|
||||
|
||||
local version = ;
|
||||
# split the raw version string at `.' and `-' characters
|
||||
while $(rawVersion) {
|
||||
local split = [ Match "([^.-]*)[.-](.*)" : $(rawVersion) ] ;
|
||||
if $(split) {
|
||||
version += $(split[1]) ;
|
||||
rawVersion = $(split[2]) ;
|
||||
} else {
|
||||
version += $(rawVersion) ;
|
||||
rawVersion = ;
|
||||
}
|
||||
}
|
||||
|
||||
return $(version) ;
|
||||
}
|
||||
|
||||
rule SetIncludePropertiesVariables prefix : suffix
|
||||
{
|
||||
# SetIncludePropertiesVariables <prefix> : <suffix> ;
|
||||
#
|
||||
suffix = $(suffix:E=) ;
|
||||
if $($(prefix)_GCC_VERSION$(suffix)[1]) < 4 {
|
||||
if $($(prefix)_CC_IS_LEGACY_GCC$(suffix)) {
|
||||
$(prefix)_INCLUDES_SEPARATOR$(suffix) = -I- ;
|
||||
$(prefix)_LOCAL_INCLUDES_OPTION$(suffix) = -I ;
|
||||
$(prefix)_SYSTEM_INCLUDES_OPTION$(suffix) = -I ;
|
||||
|
||||
Reference in New Issue
Block a user