Update xcompile to search for x86_64 toolchain.
This adds detection of x86_64 gcc toolchain (which buildgcc can build if provided the option). Change-Id: I8b12f3e705157741279c7347f4847fb50ccc2b0e Signed-off-by: Marc Jones <marc.jones@se-eng.com> Reviewed-on: http://review.coreboot.org/673 Reviewed-by: Rudolf Marek <r.marek@assembler.cz> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
b9fa1ed5e8
commit
087b24db2d
@ -40,10 +40,15 @@ echo '#XGCCPATH='${XGCCPATH}
|
|||||||
TMPFILE=`mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz`
|
TMPFILE=`mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz`
|
||||||
touch $TMPFILE
|
touch $TMPFILE
|
||||||
|
|
||||||
# This should be a loop over all supported architectures
|
# This loops over all supported architectures in TARCH
|
||||||
TARCH=i386
|
TARCH=('i386' 'x86_64')
|
||||||
TWIDTH=32
|
TWIDTH=32
|
||||||
for gccprefixes in ${XGCCPATH}${TARCH}-elf- ${TARCH}-elf- ""; do
|
for search_for in "${TARCH[@]}"; do
|
||||||
|
TARCH_SEARCH=("${TARCH_SEARCH[@]}" ${XGCCPATH}${search_for}-elf- ${search_for}-elf-)
|
||||||
|
done
|
||||||
|
echo '# TARCH_SEARCH='${TARCH_SEARCH[@]}
|
||||||
|
|
||||||
|
for gccprefixes in "${TARCH_SEARCH[@]}" ""; do
|
||||||
if ! which ${gccprefixes}as 2>/dev/null >/dev/null; then
|
if ! which ${gccprefixes}as 2>/dev/null >/dev/null; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
@ -63,8 +68,8 @@ for gccprefixes in ${XGCCPATH}${TARCH}-elf- ${TARCH}-elf- ""; do
|
|||||||
if [ ${TYPE##* } == "elf${TWIDTH}-${TARCH}" ]; then
|
if [ ${TYPE##* } == "elf${TWIDTH}-${TARCH}" ]; then
|
||||||
GCCPREFIX=$gccprefixes
|
GCCPREFIX=$gccprefixes
|
||||||
ASFLAGS=--32
|
ASFLAGS=--32
|
||||||
CFLAGS="-m32 "
|
CFLAGS="-m32 -Wl,-b,elf32-i386 -Wl,-melf_i386 "
|
||||||
LDFLAGS="-b elf32-i386"
|
LDFLAGS="-b elf32-i386 -melf_i386"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user