diff options
author | imp <imp@FreeBSD.org> | 2008-03-19 12:20:44 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2008-03-19 12:20:44 +0000 |
commit | c734f7062f4c01442642135abe2e989ef77c7fed (patch) | |
tree | d6c1eec195acac6dc91bd8c1e3f09b7dcc287784 /share/mk/bsd.cpu.mk | |
parent | c487d691418f13519c68dd630811336af3de22e1 (diff) | |
download | FreeBSD-src-c734f7062f4c01442642135abe2e989ef77c7fed.zip FreeBSD-src-c734f7062f4c01442642135abe2e989ef77c7fed.tar.gz |
Add support for MACHINE_ARCH == mips, plus a few generic CPU types that
will be supported in the forth coming FreeBSD/mips port.
Diffstat (limited to 'share/mk/bsd.cpu.mk')
-rw-r--r-- | share/mk/bsd.cpu.mk | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index e309cd7..f84bf7c 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -17,6 +17,8 @@ MACHINE_CPU = aim . elif ${MACHINE_ARCH} == "sparc64" . elif ${MACHINE_ARCH} == "arm" MACHINE_CPU = arm +. elif ${MACHINE_ARCH} == "mips" +MACHINE_CPU = mips . endif .else @@ -65,6 +67,7 @@ CPUTYPE = nocona # http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html # http://gcc.gnu.org/onlinedocs/gcc/IA-64-Options.html # http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html +# http://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html # http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html # http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html @@ -116,6 +119,20 @@ _CPUCFLAGS = -mcpu=${CPUTYPE} MACHINE_CPU = booke _CPUCFLAGS = -Wa,-me500 -msoft-float . endif +. elif ${MACHINE_ARCH} == "mips" +. if ${CPUTYPE} == "mips32" +_CPUCFLAGS = -march=mips32 +. elif ${CPUTYPE} == "mips32r2" +_CPUCFLAGS = -march=mips32r2 +. elif ${CPUTYPE} == "mips64" +_CPUCFLAGS = -march=mips64 +. elif ${CPUTYPE} == "mips64r2" +_CPUCFLAGS = -march=mips64r2 +. elif ${CPUTYPE} == "mips4kc" +_CPUCFLAGS = -march=4kc +. elif ${CPUTYPE} == "mips24kc" +_CPUCFLAGS = -march=24kc +. endif . endif # Set up the list of CPU features based on the CPU type. This is an @@ -181,6 +198,19 @@ LDFLAGS += -mbig-endian LD += -EB .endif +.if ${MACHINE_ARCH} == "mips" +. if defined(TARGET_BIG_ENDIAN) +CFLAGS += -EB +LDFLAGS += -Wl,-EB +LD += -EB +. else +CFLAGS += -EL +LDFLAGS += -Wl,-EL +LD += -EL +. endif +CFLAGS += -msoft-float -G0 -mno-dsp -mabicalls +.endif + # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk .if !defined(NO_CPU_CFLAGS) |