dansnyderECE 0 Junior Poster

I'm using a cross-compiler that generates MIPS binaries from c++ (mipseb-linux-g++). What I want to do is tell the compiler to use a specific ISA (namely MIPS I). From what I can tell this is a machine option that should be easily configurable. I've tried changing the option in my Makefile but the compiler is still generating instructions from the MIPS II ISA which apparently is default. None of my compiler flags are working. Am I doing something wrong? Here's my Makefile just for reference:

##############################################################################
#  \author acc@cs.rochester.edu
#  \version 0.01
#  \brief
##############################################################################

# Environment variables which should already be set in your path
# ACC_PATH ?= $(shell `pwd | awk 'BEGIN{FS="benchmarks/acc"} {print $1}'`)
# BENCHDIR ?= $(ACC_PATH)/benchmarks
# SESCSOURCEDIR ?= $(ACC_PATH)/sesc
# SESCBUILDDIR ?= $(ACC_PATH)/build
XTOOLSPREFIX ?= /home/seas/grad/dasnyder/cmplrs

##############################################################################

# Compiler and linker
CC     = $(XTOOLSPREFIX)/bin/mipseb-linux-gcc
CXX    = $(XTOOLSPREFIX)/bin/mipseb-linux-g++
LD     = $(XTOOLSPREFIX)/bin/mipseb-linux-gcc
AR     = $(XTOOLSPREFIX)/bin/mipseb-linux-ar
RANLIB = $(XTOOLSPREFIX)/bin/mipseb-linux-ranlib

# Common compiler flags
CFLAGS = -O3 -funroll-loops -fsched-interblock \
         -finline-functions -fomit-frame-pointer -funroll-loops \
         -mips1 -mabi=32 -mtune=r2000 -static -Wa,-non_shared \
         -mno-abicalls -fno-PIC -freduce-all-givs \
         -I. -I$(XTOOLSPREFIX)/mipseb-linux/include

[B]# C++ flags
CXXFLAGS = ${CFLAGS} -I$(XTOOLSPREFIX)/mipseb-linux/include/c++/3.2 \
                     -I$(XTOOLSPREFIX)/mipseb-linux/include/c++/3.2/mips-linux-gnu \
                     -mips1 -mabi=32 -mtune=r2000 -msoft-float -funroll-loops \
                     -fdelayed-branch[/B]

# Common linker flags
# LDFLAGS = -Wl,--script=$(SESCSOURCEDIR)/src/libapp/mint.x \
#         -L$(SESCBUILDDIR)/obj/mipseb_obj -L$(XTOOLSPREFIX)/mipseb-linux/lib

LDFLAGS = -L$(XTOOLSPREFIX)/mipseb-linux/lib -lstdc++ -lm


# Common libs
LIBS    =

# Common definitions
DEFS    =

# Emacs tags
EMACSTAGS = TAGS
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.