configure does now check the yasm version for target architecture x86, and
sets the HAIKU_YASM build variable, which will be checked in BuildSetup. Re-running configure or adding the variable manually to generated/build/BuildConfig is required. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30145 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4e5a71dd76
commit
77e84f219a
@ -180,6 +180,11 @@ switch $(HAIKU_CPU) {
|
||||
HAIKU_BOOT_PLATFORM = bios_ia32 ;
|
||||
# offset in floppy image (>= sizeof(haiku_loader))
|
||||
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 300 ; # in kB
|
||||
|
||||
# yasm is required for target arch x86
|
||||
if ! $(HAIKU_YASM) {
|
||||
Exit "HAIKU_YASM not set. Please re-run configure." ;
|
||||
}
|
||||
}
|
||||
case m68k :
|
||||
{
|
||||
|
@ -175,9 +175,9 @@ rule AssembleNasm
|
||||
actions AssembleNasm
|
||||
{
|
||||
if test $(ASFLAGS) ; then
|
||||
yasm -d $(ASFLAGS) -f elf32 -o $(1) $(2);
|
||||
$(HAIKU_YASM) -d $(ASFLAGS) -f elf32 -o $(1) $(2);
|
||||
else
|
||||
yasm -f elf32 -o $(1) $(2);
|
||||
$(HAIKU_YASM) -f elf32 -o $(1) $(2);
|
||||
fi
|
||||
}
|
||||
|
||||
|
36
configure
vendored
36
configure
vendored
@ -75,6 +75,7 @@ environment variables:
|
||||
HAIKU_LD The linker. Defaults to "ld".
|
||||
HAIKU_OBJCOPY The objcopy to be used. Defaults to "objcopy".
|
||||
HAIKU_RANLIB The static library indexer. Defaults to "ranlib".
|
||||
HAIKU_YASM The yasm assembler (x86 only).
|
||||
HAIKU_CPPFLAGS The preprocessor flags. Defaults to "".
|
||||
HAIKU_CCFLAGS The C flags. Defaults to "".
|
||||
HAIKU_CXXFLAGS The C++ flags. Defaults to "".
|
||||
@ -260,6 +261,7 @@ include3rdParty=0
|
||||
enableMultiuser=0
|
||||
distroCompatibility=default
|
||||
target=haiku
|
||||
targetArch=x86
|
||||
useGCCPipe=0
|
||||
use32bit=0
|
||||
useXattr=0
|
||||
@ -279,6 +281,7 @@ set_default_value HAIKU_CC gcc
|
||||
set_default_value HAIKU_LD ld
|
||||
set_default_value HAIKU_OBJCOPY objcopy
|
||||
set_default_value HAIKU_RANLIB ranlib
|
||||
set_default_value HAIKU_YASM yasm
|
||||
set_default_value HAIKU_CPPFLAGS ""
|
||||
set_default_value HAIKU_CCFLAGS ""
|
||||
set_default_value HAIKU_CXXFLAGS ""
|
||||
@ -298,10 +301,10 @@ while [ $# -gt 0 ] ; do
|
||||
buildCrossToolsScript="${buildCrossToolsScript}_gcc4"
|
||||
case "$2" in
|
||||
x86) haikuGCCMachine=i586-pc-haiku;;
|
||||
ppc) haikuGCCMachine=powerpc-apple-haiku;;
|
||||
m68k) haikuGCCMachine=m68k-unknown-haiku;;
|
||||
arm) haikuGCCMachine=arm-unknown-haiku;;
|
||||
mipsel) haikuGCCMachine=mipsel-unknown-haiku;;
|
||||
ppc) haikuGCCMachine=powerpc-apple-haiku; targetArch=ppc;;
|
||||
m68k) haikuGCCMachine=m68k-unknown-haiku; targetArch=m86k;;
|
||||
arm) haikuGCCMachine=arm-unknown-haiku; targetArch=arm;;
|
||||
mipsel) haikuGCCMachine=mipsel-unknown-haiku; targetArch=mips;;
|
||||
*) echo "Unsupported target architecture: $2"
|
||||
exit 1;;
|
||||
esac
|
||||
@ -380,6 +383,30 @@ case "${platform}" in
|
||||
exit 1 ;;
|
||||
esac
|
||||
|
||||
# check yasm version
|
||||
if [ $targetArch = "x86" ]; then
|
||||
$HAIKU_YASM --version > /dev/null || {
|
||||
echo "The yasm assembler version 0.7.2 or later must be installed."
|
||||
echo "Download from: http://www.tortall.net/projects/yasm/wiki/Download"
|
||||
exit 1
|
||||
}
|
||||
|
||||
set -- $($HAIKU_YASM --version | head -n 1)
|
||||
versionOK=0
|
||||
case $2 in
|
||||
0.[0-6].*) echo match1;;
|
||||
0.7.[0-1].*) echo match2;;
|
||||
*) versionOK=1 ;;
|
||||
esac
|
||||
|
||||
if [ $versionOK = 0 ]; then
|
||||
echo "The yasm assembler version 0.7.2 or later must be installed."
|
||||
echo "The installed version is $2."
|
||||
echo "Download from: http://www.tortall.net/projects/yasm/wiki/Download"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# create output directory
|
||||
if [ "$currentDir" = "$sourceDir" ]; then
|
||||
outputDir=$currentDir/generated
|
||||
@ -458,6 +485,7 @@ HAIKU_CC ?= ${HAIKU_CC} ;
|
||||
HAIKU_LD ?= ${HAIKU_LD} ;
|
||||
HAIKU_OBJCOPY ?= ${HAIKU_OBJCOPY} ;
|
||||
HAIKU_RANLIB ?= ${HAIKU_RANLIB} ;
|
||||
HAIKU_YASM ?= ${HAIKU_YASM} ;
|
||||
HAIKU_CPPFLAGS ?= ${HAIKU_CPPFLAGS} ;
|
||||
HAIKU_CCFLAGS ?= ${HAIKU_CCFLAGS} ;
|
||||
HAIKU_CXXFLAGS ?= ${HAIKU_CXXFLAGS} ;
|
||||
|
Loading…
Reference in New Issue
Block a user