mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
[tools toolchains build_gnuarm]
* customize CFLAGS to adapt to host's GCC version
This commit is contained in:
parent
2af5835d21
commit
979e911bb8
@ -29,12 +29,20 @@ DOWNLOADER_OPTS="-nv -c"
|
||||
#
|
||||
FILES=.
|
||||
|
||||
HOST_GCC_VER=`gcc --version | awk '{ if (NR == 1) { print $4 } }'`
|
||||
|
||||
build_binutils() {
|
||||
echo "Building binutils..."
|
||||
if [ ! -e .binutils_extracted ] ; then
|
||||
tar -xjf ${FILES}/binutils-${BINUTILS_VER}.tar.bz2
|
||||
touch .binutils_extracted
|
||||
fi
|
||||
if [[ $HOST_GCC_VER == 4.6* ]]
|
||||
then
|
||||
CFLAGS="-Wno-error=unused-but-set-variable"
|
||||
else
|
||||
CFLAGS="-Wnoerror=unused"
|
||||
fi
|
||||
rm -rf binutils-build && mkdir -p binutils-build && cd binutils-build &&
|
||||
../binutils-${BINUTILS_VER}/configure --target=arm-elf --prefix=${PREFIX} --enable-interwork --enable-multilibi &&
|
||||
make ${MAKE_THREADS} all CFLAGS=-Wno-error=unused-but-set-variable &&
|
||||
|
Loading…
Reference in New Issue
Block a user