From 2f9ad037ac7a28031cfff935a97627796b939d02 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Wed, 19 Dec 2018 10:16:49 -0800 Subject: Link with libgcc Signed-off-by: Nathaniel Graff --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ff6207d..4ac8176 100644 --- a/Makefile +++ b/Makefile @@ -237,7 +237,7 @@ $(PROGRAM_ELF): \ CFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g" \ CXXFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g" \ LDFLAGS="-nostartfiles -nostdlib -L$(sort $(dir $(abspath $(filter %.a,$^)))) -T$(abspath $(filter %.lds,$^))" \ - LDLIBS="-Wl,--start-group -lc -lmee -lmee-gloss -Wl,--end-group" + LDLIBS="-Wl,--start-group -lc -lgcc -lmee -lmee-gloss -Wl,--end-group" touch -c $@ $(PROGRAM_HEX): \ -- cgit v1.2.3 From 22a95bfe0b1431d78a82eb609a8c4297b7dc1a6d Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Mon, 17 Dec 2018 10:30:28 -0800 Subject: Add MEE BSP include path to Makefile Signed-off-by: Nathaniel Graff --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4ac8176..db4598c 100644 --- a/Makefile +++ b/Makefile @@ -234,8 +234,8 @@ $(PROGRAM_ELF): \ AR=$(RISCV_AR) \ CC=$(RISCV_GCC) \ CXX=$(RISCV_GXX) \ - CFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g" \ - CXXFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g" \ + CFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g -I$(abspath $(MEE_BSP_PATH)/install/include/)" \ + CXXFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g -I$(abspath $(MEE_BSP_PATH)/install/include/)" \ LDFLAGS="-nostartfiles -nostdlib -L$(sort $(dir $(abspath $(filter %.a,$^)))) -T$(abspath $(filter %.lds,$^))" \ LDLIBS="-Wl,--start-group -lc -lgcc -lmee -lmee-gloss -Wl,--end-group" touch -c $@ -- cgit v1.2.3 From 9d9aaf6e13a52af606cc795b7f8d6ac5f37d4c3d Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Wed, 2 Jan 2019 16:20:20 -0800 Subject: Fix relocation error on 64-bit targets Set the code model to medium-any to fix build errors on 64-bit targets. Signed-off-by: Nathaniel Graff --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index db4598c..a25ecc7 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ $(MEE_BSP_PATH)/build/Makefile: @rm -rf $(dir $@) @mkdir -p $(dir $@) cd $(dir $@) && \ - CFLAGS="-march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g" \ + CFLAGS="-march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g -mcmodel=medany" \ $(abspath $(MEE_SOURCE_PATH)/configure) \ --host=$(CROSS_COMPILE) \ --prefix=$(abspath $(MEE_BSP_PATH)/install) \ @@ -234,8 +234,8 @@ $(PROGRAM_ELF): \ AR=$(RISCV_AR) \ CC=$(RISCV_GCC) \ CXX=$(RISCV_GXX) \ - CFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g -I$(abspath $(MEE_BSP_PATH)/install/include/)" \ - CXXFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g -I$(abspath $(MEE_BSP_PATH)/install/include/)" \ + CFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=medany -g -I$(abspath $(MEE_BSP_PATH)/install/include/)" \ + CXXFLAGS="-Os -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g -mcmodel=medany -I$(abspath $(MEE_BSP_PATH)/install/include/)" \ LDFLAGS="-nostartfiles -nostdlib -L$(sort $(dir $(abspath $(filter %.a,$^)))) -T$(abspath $(filter %.lds,$^))" \ LDLIBS="-Wl,--start-group -lc -lgcc -lmee -lmee-gloss -Wl,--end-group" touch -c $@ -- cgit v1.2.3