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.
This commit is contained in:
parent
ada977b103
commit
5fc747bf78
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233388
@ -43,6 +43,13 @@ SRCS+= app.c \
|
|||||||
|
|
||||||
.if ${TARGET_CPUARCH} == "mips"
|
.if ${TARGET_CPUARCH} == "mips"
|
||||||
SRCS+= itbl-ops.c itbl-parse.y itbl-lex.l
|
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
|
.endif
|
||||||
|
|
||||||
.if ${TARGET_ARCH} == "amd64"
|
.if ${TARGET_ARCH} == "amd64"
|
||||||
|
@ -3,14 +3,17 @@
|
|||||||
#include "itbl-mips.h"
|
#include "itbl-mips.h"
|
||||||
|
|
||||||
/* Choose a default ABI for MIPS targets. */
|
/* Choose a default ABI for MIPS targets. */
|
||||||
/* XXX: Where should this be ? */
|
#ifndef MIPS_DEFAULT_ABI
|
||||||
#define MIPS_DEFAULT_ABI NO_ABI
|
#define MIPS_DEFAULT_ABI NO_ABI
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Default CPU for MIPS targets. */
|
/* Default CPU for MIPS targets. */
|
||||||
#define MIPS_CPU_STRING_DEFAULT "from-abi"
|
#define MIPS_CPU_STRING_DEFAULT "from-abi"
|
||||||
|
|
||||||
/* Generate 64-bit code by default on MIPS targets. */
|
/* Generate 64-bit code by default on MIPS targets. */
|
||||||
|
#ifndef MIPS_DEFAULT_64BIT
|
||||||
#define MIPS_DEFAULT_64BIT 0
|
#define MIPS_DEFAULT_64BIT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */
|
/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */
|
||||||
#define USE_E_MIPS_ABI_O32 1
|
#define USE_E_MIPS_ABI_O32 1
|
||||||
|
Loading…
Reference in New Issue
Block a user