Subject: [PATCH] Pass MACHINE_ARCH on command line for MIPS kernels.
While there, make param.h guess proper MACHINE_ARCH on hardfloat targets correctly as well, so tools like bmake can get their defaults right. This does not help the kernel case, since we compile them with forced -msoft-float and need to override an incorrect guess by param.h. Reviewed by: br Differential Revision: https://reviews.freebsd.org/D8574
This commit is contained in:
parent
9e66c6e8f0
commit
962713601b
@ -74,7 +74,7 @@ CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.
|
||||
CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100
|
||||
CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000
|
||||
.if ${MACHINE_CPUARCH} == "mips"
|
||||
CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000
|
||||
CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${MACHINE_ARCH}"'
|
||||
.endif
|
||||
CFLAGS.gcc+= -fno-common -fms-extensions -finline-limit=${INLINE_LIMIT}
|
||||
CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH}
|
||||
|
@ -53,33 +53,36 @@
|
||||
|
||||
#define __PCI_REROUTE_INTERRUPT
|
||||
|
||||
#if _BYTE_ORDER == _BIG_ENDIAN
|
||||
# define _EL_SUFFIX ""
|
||||
#else
|
||||
# define _EL_SUFFIX "el"
|
||||
#endif
|
||||
|
||||
#ifdef __mips_n64
|
||||
# define _N64_SUFFIX "64"
|
||||
#elif defined(__mips_n32)
|
||||
# define _N64_SUFFIX "n32"
|
||||
#else
|
||||
# define _N64_SUFFIX ""
|
||||
#endif
|
||||
|
||||
#ifdef __mips_hard_float
|
||||
# define _HF_SUFFIX "hf"
|
||||
#else
|
||||
# define _HF_SUFFIX ""
|
||||
#endif
|
||||
|
||||
#ifndef MACHINE
|
||||
#define MACHINE "mips"
|
||||
# define MACHINE "mips"
|
||||
#endif
|
||||
#ifndef MACHINE_ARCH
|
||||
#if _BYTE_ORDER == _BIG_ENDIAN
|
||||
# define MACHINE_ARCH "mips" _N64_SUFFIX _EL_SUFFIX _HF_SUFFIX
|
||||
#endif
|
||||
#ifdef __mips_n64
|
||||
#define MACHINE_ARCH "mips64"
|
||||
#ifndef MACHINE_ARCH32
|
||||
#define MACHINE_ARCH32 "mips"
|
||||
#endif
|
||||
#elif defined(__mips_n32)
|
||||
#define MACHINE_ARCH "mipsn32"
|
||||
#else
|
||||
#define MACHINE_ARCH "mips"
|
||||
#endif
|
||||
#else
|
||||
#ifdef __mips_n64
|
||||
#define MACHINE_ARCH "mips64el"
|
||||
#ifndef MACHINE_ARCH32
|
||||
#define MACHINE_ARCH32 "mipsel"
|
||||
#endif
|
||||
#elif defined(__mips_n32)
|
||||
#define MACHINE_ARCH "mipsn32el"
|
||||
#else
|
||||
#define MACHINE_ARCH "mipsel"
|
||||
#endif
|
||||
#endif
|
||||
# ifndef MACHINE_ARCH32
|
||||
# define MACHINE_ARCH32 "mips" _EL_SUFFIX _HF_SUFFIX
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user