summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-01-03 21:20:55 +0000
committerGitHub <noreply@github.com>2019-01-03 21:20:55 +0000
commitf0e161107c5d8e3c2cfef040f7a6feffad3f9c5d (patch)
treee746b84b0f4885dc26930ffc474f421b7825fef0 /Makefile
parentc76aefe2bce1715e324c6e01c34954e6a8656632 (diff)
parent9d9aaf6e13a52af606cc795b7f8d6ac5f37d4c3d (diff)
Merge pull request #126 from sifive/link-libgcc
Improvements to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ff6207d..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,10 +234,10 @@ $(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) -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 -lmee -lmee-gloss -Wl,--end-group"
+ LDLIBS="-Wl,--start-group -lc -lgcc -lmee -lmee-gloss -Wl,--end-group"
touch -c $@
$(PROGRAM_HEX): \