The configure script now sets the variable GCC_RAW_VERSION which is

parsed in Jamrules into a list (`.' and `-' are considered delimiters)
written into GCC_VERSION. E.g. for the GeekGadgets compiler expect
GCC_VERSION to be set to `2 9 beos 000224'. So, GCC_VERSION[1] should
contain the major version, GCC_VERSION[2] the middle one.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4997 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-10-12 17:47:07 +00:00
parent d172714dbd
commit 8c17a26b5c
2 changed files with 24 additions and 0 deletions

View File

@ -46,6 +46,27 @@ LOCATE on $(HCACHEFILE) $(JCACHEFILE) = $(OBOS_BUILD_DIR) ;
include BuildConfig ;
}
# analyze GCC version
if ! $(GCC_RAW_VERSION) {
ECHO "Variable GCC_RAW_VERSION not set. Please run ./configure or" ;
EXIT "specify it manually." ;
}
GCC_VERSION = ;
{
# split the raw version string at `.' and `-' characters
local version = $(GCC_RAW_VERSION) ;
while $(version) {
local split = [ Match "([^.-]*)[.-](.*)" : $(version) ] ;
if $(split) {
GCC_VERSION += $(split[1]) ;
version = $(split[2]) ;
} else {
GCC_VERSION += $(version) ;
version = ;
}
}
}
# Save the platform default headers.
PLATFORM_DEFAULT_HEADERS = $(HDRS) ;

3
configure vendored
View File

@ -42,6 +42,7 @@ standard_gcc_settings()
# PLATFORM_LINKLIBS
gcclib=`gcc -print-libgcc-file-name`
gccdir=`dirname ${gcclib}`
gcc_version=`gcc --version`
if [ "x${PLATFORM_LINKLIBS}" == "x" ] ; then
PLATFORM_LINKLIBS="-L ${gccdir} -lgcc"
fi
@ -53,6 +54,7 @@ standard_gcc_settings()
# default parameter values
#
platform=`uname`
gcc_version=
floppy=
bochs_debug=0
@ -99,6 +101,7 @@ cat << EOF > build/BuildConfig
FLOPPY_PATH ?= "${floppy}" ;
PLATFORM_LINKLIBS ?= ${PLATFORM_LINKLIBS} ;
PLATFORM_HEADERS ?= ${PLATFORM_HEADERS} ;
GCC_RAW_VERSION ?= ${gcc_version}
BOCHS_DEBUG_HACK ?= ${bochs_debug} ;
EOF