-
-
Save mentha/155733c3fd5ca81053b9165a44a9f011 to your computer and use it in GitHub Desktop.
patches on https://github.com/z4yx/ucore-thumips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index ee674ce..2f57a83 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -6,8 +6,8 @@ ON_FPGA :=y | |
V := @ | |
-GCCPREFIX:=mips-sde-elf- | |
-GCCPREFIX ?= /home/guest/cpu/build-gcc/mips_gcc/bin/mips-sde-elf- | |
+GCCPREFIX:=mipsel-linux-gnu- | |
+GCCPREFIX ?= /home/guest/cpu/build-gcc/mips_gcc/bin/mipsel-linux-gnu- | |
# eliminate default suffix rules | |
.SUFFIXES: .c .S .h | |
@@ -22,7 +22,7 @@ GDB := $(GCCPREFIX)gdb | |
THUMIPSCC := ./thumips-cc | |
CLANG := clang | |
CC :=$(GCCPREFIX)gcc | |
-CFLAGS := -fno-builtin -nostdlib -nostdinc -g -EL -G0 -fno-delayed-branch -Wa,-O0 | |
+CFLAGS := -fno-builtin-fprintf -fno-builtin -nostdlib -nostdinc -g -EL -G0 -fno-delayed-branch -Wa,-O0 -fno-pic -mno-abicalls -mno-shared | |
CTYPE := c S | |
LD := $(GCCPREFIX)ld | |
@@ -125,7 +125,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c | |
$(CC) -c -mips1 $(INCLUDES) $(CFLAGS) $(MACH_DEF) $< -o $@ | |
$(OBJDIR)/%.o: $(SRCDIR)/%.S | |
- $(CC) -mips32 -c -D__ASSEMBLY__ $(MACH_DEF) $(INCLUDES) -g -EL -G0 $< -o $@ | |
+ $(CC) -mips32 -c -fno-pic -mno-abicalls -mno-shared -D__ASSEMBLY__ $(MACH_DEF) $(INCLUDES) -g -EL -G0 $< -o $@ | |
checkdirs: $(BUILD_DIR) $(DEP_DIR) | |
@@ -166,7 +166,7 @@ $(USER_OBJDIR)/%.o: $(USER_SRCDIR)/%.c | |
$(CC) -c -mips1 $(USER_INCLUDE) -I$(SRCDIR)/include $(CFLAGS) $< -o $@ | |
$(USER_OBJDIR)/%.o: $(USER_SRCDIR)/%.S | |
- $(CC) -mips32 -c -D__ASSEMBLY__ $(USER_INCLUDE) -I$(SRCDIR)/include -g -EL -G0 $< -o $@ | |
+ $(CC) -mips32 -c -fno-pic -mno-abicalls -mno-shared -D__ASSEMBLY__ $(USER_INCLUDE) -I$(SRCDIR)/include -g -EL -G0 $< -o $@ | |
# filesystem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment