diff --git a/miscs/patch/ramulator.patch b/miscs/patch/ramulator.patch new file mode 100644 index 00000000..e24b5d23 --- /dev/null +++ b/miscs/patch/ramulator.patch @@ -0,0 +1,46 @@ +diff --git a/Makefile b/Makefile +index ea340c8..d2aac5b 100644 +--- a/Makefile ++++ b/Makefile +@@ -7,16 +7,16 @@ OBJS := $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SRCS)) + + # Ramulator currently supports g++ 5.1+ or clang++ 3.4+. It will NOT work with + # g++ 4.x due to an internal compiler error when processing lambda functions. +-CXX := clang++ ++#CXX := clang++ + # CXX := g++-5 +-CXXFLAGS := -O3 -std=c++11 -g -Wall ++CXXFLAGS := -std=c++11 -O3 -g -Wall -fPIC + + .PHONY: all clean depend + + all: depend ramulator + + clean: +- rm -f ramulator ++ rm -f ramulator libramulator.a + rm -rf $(OBJDIR) + + depend: $(OBJDIR)/.depend +@@ -36,7 +36,7 @@ ramulator: $(MAIN) $(OBJS) $(SRCDIR)/*.h | depend + $(CXX) $(CXXFLAGS) -DRAMULATOR -o $@ $(MAIN) $(OBJS) + + libramulator.a: $(OBJS) $(OBJDIR)/Gem5Wrapper.o +- libtool -static -o $@ $(OBJS) $(OBJDIR)/Gem5Wrapper.o ++ $(AR) rcs $@ $^ + + $(OBJS): | $(OBJDIR) + +diff --git a/src/Request.h b/src/Request.h +index 57abd0d..a5ce061 100644 +--- a/src/Request.h ++++ b/src/Request.h +@@ -36,7 +36,7 @@ public: + + Request(long addr, Type type, int coreid = 0) + : is_first_command(true), addr(addr), coreid(coreid), type(type), +- callback([](Request& req){}) {} ++ callback([](Request&){}) {} + + Request(long addr, Type type, function callback, int coreid = 0) + : is_first_command(true), addr(addr), coreid(coreid), type(type), callback(callback) {} diff --git a/third_party/Makefile b/third_party/Makefile index 26b730ff..88a639c1 100644 --- a/third_party/Makefile +++ b/third_party/Makefile @@ -9,10 +9,12 @@ softfloat: SPECIALIZE_TYPE=RISCV SOFTFLOAT_OPTS="-fPIC -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32" $(MAKE) -C softfloat/build/Linux-x86_64-GCC ramulator: + cd ramulator && git apply -R ../../miscs/patch/ramulator.patch 2> /dev/null $(MAKE) -C ramulator libramulator.a clean: - $(MAKE) clean -C cocogfx + $(MAKE) -C cocogfx clean $(MAKE) -C softfloat/build/Linux-x86_64-GCC clean + $(MAKE) -C ramulator clean .PHONY: all fpnew cocogfx softfloat ramulator \ No newline at end of file