summaryrefslogtreecommitdiff
path: root/cpu/mips
diff options
context:
space:
mode:
authorShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2007-11-17 20:05:26 +0900
committerShinya Kuribayashi <skuribay@ruby.dti.ne.jp>2007-11-17 20:05:26 +0900
commit7e1d884b7cb602007329c517ec1c453e3a6a5d9c (patch)
treea4132a3648672fdd456abcfc9718e23ba816a403 /cpu/mips
parent16664f72850846e645616da1c0fa5afcd6d15f15 (diff)
[MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker
Current trick to pick up GNU assembler minor version does not work with the latest binutils (2007-03-01 or later) due to ${PKGVERSION} now default to "(GNU Binutils) ". $ sde-as --version |grep "GNU assembler" GNU assembler 2.15.94 mipssde-6.02.02-20050602 $ sde-as --version |grep "GNU assembler" |awk '{print $3}' 2.15.94 $ sde-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}' 15 $ $ mips-linux-as --version |grep "GNU assembler" GNU assembler (GNU Binutils) 2.18 $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' (GNU $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}' (no output) $ As a result of above, you'll see many noises with such binutils: make -C cpu/mips/ /bin/sh: line 0: [: : integer expression expected /bin/sh: line 0: [: : integer expression expected make[1]: Entering directory `/home/skuribay/devel/u-boot.git/cpu/mips' mips-linux-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o incaip_wdt.o incaip_wdt.S /bin/sh: line 0: [: : integer expression expected mips-linux-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o cache.o cache.S /bin/sh: line 0: [: : integer expression expected mips-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -Wall -Wstrict-prototypes -c -o asc_serial.o asc_serial.c /bin/sh: line 0: [: : integer expression expected This patch simplifies the trick and makes it work with both versions of gas. I also replace an expensive `awk (or gawk)' with `cut'. Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Diffstat (limited to 'cpu/mips')
-rw-r--r--cpu/mips/config.mk3
1 files changed, 1 insertions, 2 deletions
diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk
index 487c4eb5d..ad03bd61b 100644
--- a/cpu/mips/config.mk
+++ b/cpu/mips/config.mk
@@ -20,8 +20,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
-v=$(shell \
-$(CROSS_COMPILE)as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
+v=$(shell $(AS) --version |grep "GNU assembler" |cut -d. -f2)
MIPSFLAGS=$(shell \
if [ "$v" -lt "14" ]; then \
echo "-mcpu=4kc"; \