|
|
|
@ -55,6 +55,7 @@ LINUX_TUPLE ?= $(call make_tuple,$(XLEN),linux-gnu) |
|
|
|
NEWLIB_TUPLE ?= $(call make_tuple,$(XLEN),elf) |
|
|
|
|
|
|
|
CFLAGS_FOR_TARGET := $(CFLAGS_FOR_TARGET_EXTRA) @cmodel@ |
|
|
|
CXXFLAGS_FOR_TARGET := $(CXXFLAGS_FOR_TARGET_EXTRA) @cmodel@ |
|
|
|
ASFLAGS_FOR_TARGET := $(ASFLAGS_FOR_TARGET_EXTRA) @cmodel@ |
|
|
|
# --with-expat is required to enable XML support used by OpenOCD.
|
|
|
|
BINUTILS_TARGET_FLAGS := --with-expat=yes $(BINUTILS_TARGET_FLAGS_EXTRA) |
|
|
|
@ -237,6 +238,7 @@ endif |
|
|
|
cd $(notdir $@) && \
|
|
|
|
CC="$(GLIBC_CC_FOR_TARGET) $($@_CFLAGS)" \
|
|
|
|
CFLAGS="$(CFLAGS_FOR_TARGET) -g -O2 $($@_CFLAGS)" \
|
|
|
|
CXXFLAGS="$(CXXFLAGS_FOR_TARGET) -g -O2 $($@_CFLAGS)" \
|
|
|
|
ASFLAGS="$(ASFLAGS_FOR_TARGET) $($@_CFLAGS)" \
|
|
|
|
$</configure \
|
|
|
|
--host=$(call make_tuple,$($@_XLEN),linux-gnu) \
|
|
|
|
@ -430,7 +432,8 @@ stamps/build-gcc-newlib-stage1: $(srcdir)/riscv-gcc stamps/build-binutils-newlib |
|
|
|
$(MULTILIB_FLAGS) \
|
|
|
|
$(WITH_ABI) \
|
|
|
|
$(WITH_ARCH) \
|
|
|
|
CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" |
|
|
|
CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" \
|
|
|
|
CXXFLAGS_FOR_TARGET="-Os $(CXXFLAGS_FOR_TARGET)" |
|
|
|
$(MAKE) -C $(notdir $@) all-gcc |
|
|
|
$(MAKE) -C $(notdir $@) install-gcc |
|
|
|
mkdir -p $(dir $@) && touch $@ |
|
|
|
@ -445,7 +448,8 @@ stamps/build-newlib: $(srcdir)/riscv-newlib stamps/build-gcc-newlib-stage1 |
|
|
|
--enable-newlib-io-long-double \
|
|
|
|
--enable-newlib-io-long-long \
|
|
|
|
--enable-newlib-io-c99-formats \
|
|
|
|
CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" |
|
|
|
CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" \
|
|
|
|
CXXFLAGS_FOR_TARGET="-Os $(CXXFLAGS_FOR_TARGET)" |
|
|
|
$(MAKE) -C $(notdir $@) |
|
|
|
$(MAKE) -C $(notdir $@) install |
|
|
|
mkdir -p $(dir $@) && touch $@ |
|
|
|
@ -469,7 +473,8 @@ stamps/build-newlib-nano: $(srcdir)/riscv-newlib stamps/build-gcc-newlib-stage1 |
|
|
|
--disable-newlib-supplied-syscalls \
|
|
|
|
--disable-nls \
|
|
|
|
--enable-newlib-register-fini \
|
|
|
|
CFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" |
|
|
|
CFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" \
|
|
|
|
CXXFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CXXFLAGS_FOR_TARGET)" |
|
|
|
$(MAKE) -C $(notdir $@) |
|
|
|
$(MAKE) -C $(notdir $@) install |
|
|
|
mkdir -p $(dir $@) && touch $@ |
|
|
|
@ -519,7 +524,8 @@ stamps/build-gcc-newlib-stage2: $(srcdir)/riscv-gcc stamps/build-newlib \ |
|
|
|
$(MULTILIB_FLAGS) \
|
|
|
|
$(WITH_ABI) \
|
|
|
|
$(WITH_ARCH) \
|
|
|
|
CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" |
|
|
|
CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" \
|
|
|
|
CXXFLAGS_FOR_TARGET="-Os $(CXXFLAGS_FOR_TARGET)" |
|
|
|
$(MAKE) -C $(notdir $@) |
|
|
|
$(MAKE) -C $(notdir $@) install |
|
|
|
mkdir -p $(dir $@) && touch $@ |
|
|
|
|