Files
vxWorks/h/tool/gnu/defs.mips
2025-08-20 18:25:46 +08:00

84 lines
2.0 KiB
Plaintext

# defs.mips - MIPS specific definitions for the GNU toolchain
#
# modification history
# --------------------
# 01h,04mar05,pes Remove options for r3k
# 01g,05may04,pes Fixing compile flag used for gnu for MIPS64.
# 01f,07nov03,c_c Removed GNULIBROOT define.
# 01e,26mar02,pes Revert to MIPS ISA III. Clean up -mno-branch-likely
# selection.
# 01d,19mar02,dat Adding PIC flags for bootInit.o (72825)
# 01c,12feb02,sn removed obsolete refs to GCC_EXEC_PREFIX
# removed -fno-for-scope
# 01b,21jan02,sn removed unused C++_TEMPLATE_INST
# 01a,09jan02,pes written
#
# DESCRIPTION
# This file contains MIPS specific definitions and flags for the
# GNU tools (compiler, assembler, linker etc.)
#
# NOTE
# The file name comes from defs.$(VX_CPU_FAMILY)
#
include $(TGT_DIR)/h/tool/gnu/defs.gnu
include $(TGT_DIR)/h/tool/common/defs.mips
CC_OPTIM_DRIVER = -O -fvolatile
CC_OPTIM_NORMAL = -O2
CC_OPTIM_TARGET = -O2
# Compiler flags for PIC code
# For T2.2, used only for MIPS gnu compiler.
CC_PIC = $(OPTION_PIC)
CC_COMPILER = -ansi -fno-builtin
C++_COMPILER += -fno-builtin
LONGCALL = -mlong-calls
# override/modify standard command definitions
AS += -G 0
RANLIB = ranlibmips
# Build up architecture specification
# Set initial value
CC_ARCH_SPEC = -G 0 -mno-branch-likely
#
# Modify CC_ARCH_SPEC for processor ISA level and endianness
#
# select processor ISA
# 32-bit is ISA II
# 64-bit is ISA III
#
ifeq ($(findstring MIPS32,$(CPU)),MIPS32)
CC_ARCH_SPEC += -mips2
AS += -mips2
else
CC_ARCH_SPEC += -mips3 -mabi=o64 -mgp64
AS += -mips3 -mabi=o64 -mgp64
endif
# select endianness
ifeq ($(findstring le,$(TOOL)),le)
CC_ARCH_SPEC += -EL
AS += -EL
LDFLAGS = -EL -X -N
LD_PARTIAL_FLAGS= -EL -X -r
LD_ENDIAN_FLAG = -Wl,-EL
else
CC_ARCH_SPEC += -EB
AS += -EB
LDFLAGS = -EB -X -N
LD_PARTIAL_FLAGS= -EB -X -r
endif
# check for software floating point request
ifeq ($(findstring sf,$(TOOL)),sf)
CC_SOFT_FLOAT = -msoft-float
endif
# end of defs.mips