Commit e223c0b1 authored by Gaurav Kukreja's avatar Gaurav Kukreja

Modified Makefiles of benchmarks to use linker scripts and generate objdump from IR

Signed-off-by: Gaurav Kukreja's avatarGaurav Kukreja <gaurav@gauravk.in>
parent e7b914aa
......@@ -18,9 +18,9 @@ ifdef PHASE
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -static ${OPT} ${TREEDUMP}
COPTS = -static ${OPT} ${TREEDUMP} -T generic-hosted.ld
else
COPTS = -static ${OPT}
COPTS = -static ${OPT} -T generic-hosted.ld
endif
ifdef PRINT
......
......@@ -23,9 +23,9 @@ ifdef PHASE
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -static ${OPT} ${TREEDUMP}
COPTS = -static ${OPT} ${TREEDUMP} -T generic-hosted.ld
else
COPTS = -static ${OPT}
COPTS = -static ${OPT} -T generic-hosted.ld
endif
ifdef PRINT
......
......@@ -18,9 +18,9 @@ ifdef PHASE
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_BIG_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static -msoft-float ${OPT} ${TREEDUMP}
COPTS = -D_IEEE_LIBM -D__IEEE_BIG_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static -msoft-float ${OPT} ${TREEDUMP} -T generic-hosted.ld
else
COPTS = -static -msoft-float ${OPT} ${TREEDUMP}
COPTS = -static -msoft-float ${OPT} ${TREEDUMP} -T generic-hosted.ld
endif
else
CC = $(GCC)
......
......@@ -18,9 +18,9 @@ ifdef PHASE
OBJDUMP = $(CROSS_OBJDUMP)
OEXT = elf
ifeq (${MATH}, libsource)
COPTS = -D_IEEE_LIBM -D__IEEE_BIG_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static -msim -msoft-float ${OPT} ${TREEDUMP} -I.
COPTS = -D_IEEE_LIBM -D__IEEE_BIG_ENDIAN -I${MY_MPATH2} -I${MY_MPATH3} -static -msoft-float ${OPT} ${TREEDUMP} -I. -T generic-hosted.ld
else
COPTS = -static -msim -msoft-float ${OPT} ${TREEDUMP} -I.
COPTS = -static -msoft-float ${OPT} ${TREEDUMP} -I. -T generic-hosted.ld
endif
else
CC = $(GCC)
......
......@@ -16,9 +16,9 @@ ifdef PHASE
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -static ${OPT} ${TREEDUMP}
COPTS = -static ${OPT} ${TREEDUMP} -T generic-hosted.ld
else
COPTS = -static ${OPT}
COPTS = -static ${OPT} -T generic-hosted.ld
endif
ifdef PRINT
......
......@@ -15,9 +15,9 @@ ifdef PHASE
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -static ${OPT} ${TREEDUMP} -I.
COPTS = -static ${OPT} ${TREEDUMP} -I. -T generic-hosted.ld
else
COPTS = -static ${OPT} -I.
COPTS = -static ${OPT} -I. -T generic-hosted.ld
endif
else
CC = $(GCC)
......
......@@ -32,9 +32,9 @@ ifdef PHASE
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -Wall ${OPT} ${TREEDUMP}
COPTS = -Wall ${OPT} ${TREEDUMP} -T generic-hosted.ld
else
COPTS = -Wall ${OPT}
COPTS = -Wall ${OPT} -T generic-hosted.ld
endif
ifdef PRINT
......
......@@ -33,9 +33,9 @@ ifdef PHASE
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -Wall ${OPT} ${TREEDUMP} -I.
COPTS = -Wall ${OPT} ${TREEDUMP} -I. -T generic-hosted.ld
else
COPTS = -Wall ${OPT} -I.
COPTS = -Wall ${OPT} -I. -T generic-hosted.ld
endif
ifdef PRINT
......
......@@ -13,9 +13,9 @@ ifdef PHASE
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) $(TREEDUMP)
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) $(TREEDUMP) -T generic-hosted.ld
else
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT)
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) -T generic-hosted.ld
endif
ifdef PRINT
......@@ -39,11 +39,11 @@ test:
./erat_sieve_print.$(OEXT)
erat_sieve_no_print:: erat_sieve_no_print.c
$(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(CC) $(COPTS) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
erat_sieve_print:: erat_sieve_print.c
$(CC) $(CFLAGS) -o $@.$(OEXT) $^
$(CC) $(COPTS) $(CFLAGS) -o $@.$(OEXT) $^
$(OBJDUMP) -D $@.$(OEXT) >& $@.$(DUMPEXT)
#adding - to rm so that errors are ignored
......
......@@ -12,9 +12,9 @@ ifdef PHASE
OEXT = elf
#ifeq (${IRDUMP},1)
ifdef IRDUMP
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) $(TREEDUMP) -I.
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) $(TREEDUMP) -I. -T generic-hosted.ld
else
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) -I.
COPTS = -pedantic -Wcomment -fno-asm -fsigned-char -W -Wparentheses -Wreturn-type -Wswitch -Wunused -Wsign-compare -Wimplicit -Wreturn-type -Wshadow -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -msoft-float $(OPT) -I. -T generic-hosted.ld
endif
ifdef PRINT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment