diff options
author | gonzo <gonzo@FreeBSD.org> | 2012-03-23 19:37:45 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2012-03-23 19:37:45 +0000 |
commit | f150c5bbfc1a83c3f8e6c17cea1fa16375bccc3b (patch) | |
tree | 675a11174ba8256e5dc460aec8433c2a24b740af /gnu | |
parent | fe30cce04e8766dd56da51435cef313654bb3934 (diff) | |
download | FreeBSD-src-f150c5bbfc1a83c3f8e6c17cea1fa16375bccc3b.zip FreeBSD-src-f150c5bbfc1a83c3f8e6c17cea1fa16375bccc3b.tar.gz |
Make default ABI for as(1) to be the same as target platform.
This change makes object files compiled with default flags by
gcc and as compatible.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/as/Makefile | 7 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils/as/Makefile b/gnu/usr.bin/binutils/as/Makefile index 032248a..bf8df81 100644 --- a/gnu/usr.bin/binutils/as/Makefile +++ b/gnu/usr.bin/binutils/as/Makefile @@ -43,6 +43,13 @@ SRCS+= app.c \ .if ${TARGET_CPUARCH} == "mips" SRCS+= itbl-ops.c itbl-parse.y itbl-lex.l +.if ${TARGET_ARCH:Mmips64*} != "" +CFLAGS+= -DMIPS_DEFAULT_ABI=N64_ABI -DMIPS_DEFAULT_64BIT=1 +.elif ${TARGET_ARCH:Mmipsn32*} != "" +CFLAGS+= -DMIPS_DEFAULT_ABI=N32_ABI +.else +MIPS_ABI_DEFAULT=ABI_32 +.endif .endif .if ${TARGET_ARCH} == "amd64" diff --git a/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h b/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h index 7dbe96e..5e007d1 100644 --- a/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h +++ b/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h @@ -3,14 +3,17 @@ #include "itbl-mips.h" /* Choose a default ABI for MIPS targets. */ -/* XXX: Where should this be ? */ +#ifndef MIPS_DEFAULT_ABI #define MIPS_DEFAULT_ABI NO_ABI +#endif /* Default CPU for MIPS targets. */ #define MIPS_CPU_STRING_DEFAULT "from-abi" /* Generate 64-bit code by default on MIPS targets. */ +#ifndef MIPS_DEFAULT_64BIT #define MIPS_DEFAULT_64BIT 0 +#endif /* Allow use of E_MIPS_ABI_O32 on MIPS targets. */ #define USE_E_MIPS_ABI_O32 1 |