954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Compiler Option Question

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

<strong># 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</strong>

# 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
dansnyderECE
Junior Poster
104 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: