
TARGET = embox

ARCH = mips

PLATFORM = mipssim

CROSS_COMPILE = mips-mti-elf-
// CROSS_COMPILE = mips-elf-
// CROSS_COMPILE = mips-linux-gnu-

CFLAGS += -O0 -g

CFLAGS += -G0 -march=24kf -EB

CFLAGS += -fno-pic -mno-abicalls -mabi=32
CFLAGS += -Wa,-mno-shared -mno-shared
CFLAGS += -Wa,-xgot -mxgot -mplt -mno-mips16

/** 
 * Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64569
 * See also https://patchwork.linux-mips.org//patch/8355/
 */
CFLAGS += -msoft-float -Wa,-msoft-float
// CFLAGS += -mhard-float -Wa,-mhard-float
// CFLAGS += -msingle-float -Wa,-msingle-float

LDFLAGS += -G0 -EB
LDFLAGS += -melf32btsmip
// LDFLAGS += -melf32ebmip /* if elf32btsmip emulation mode is unrecognised */  

CXXFLAGS += -O0 -g
CXXFLAGS += -G0 -march=24kf -EB

CXXFLAGS += -fno-pic -mno-abicalls -mabi=32
CXXFLAGS += -Wa,-mno-shared -mno-shared
CXXFLAGS += -Wa,-xgot -mxgot -mplt -mno-mips16
CXXFLAGS += -fno-threadsafe-statics
