Split the glibc and newlib multilib names in the Makefile
parent
829f362368
commit
23e0cd0ad0
20
Makefile.in
20
Makefile.in
|
@ -32,7 +32,8 @@ endif
|
|||
export PATH AWK SED
|
||||
|
||||
MULTILIB_FLAGS := @multilib_flags@
|
||||
MULTILIB_NAMES := @multilib_names@
|
||||
NEWLIB_MULTILIB_NAMES := @newlib_multilib_names@
|
||||
GLIBC_MULTILIB_NAMES := @glibc_multilib_names@
|
||||
GCC_CHECKING_FLAGS := @gcc_checking@
|
||||
|
||||
XLEN := $(shell echo $(WITH_ARCH) | tr A-Z a-z | sed 's/.*rv\([0-9]*\).*/\1/')
|
||||
|
@ -49,9 +50,10 @@ ASFLAGS_FOR_TARGET := $(ASFLAGS_FOR_TARGET_EXTRA) @cmodel@
|
|||
GLIBC_TARGET_FLAGS := $(GLIBC_TARGET_FLAGS_EXTRA)
|
||||
GLIBC_CC_FOR_TARGET ?= $(LINUX_TUPLE)-gcc
|
||||
GLIBC_CXX_FOR_TARGET ?= $(LINUX_TUPLE)-g++
|
||||
GLIBC_TARGET_BOARDS ?= $(shell echo "$(GLIBC_MULTILIB_NAMES)" | sed 's@\([a-z0-9]*\)-\([a-z0-9]*\)@riscv-sim/-march=\1/-mabi=\2@g')
|
||||
NEWLIB_CC_FOR_TARGET ?= $(NEWLIB_TUPLE)-gcc
|
||||
NEWLIB_CXX_FOR_TARGET ?= $(NEWLIB_TUPLE)-g++
|
||||
GCC_TARGET_BOARDS ?= $(shell echo "$(MULTILIB_NAMES)" | sed 's@\([a-z0-9]*\)-\([a-z0-9]*\)@riscv-sim/-march=\1/-mabi=\2@g')
|
||||
NEWLIB_TARGET_BOARDS ?= $(shell echo "$(NEWLIB_MULTILIB_NAMES)" | sed 's@\([a-z0-9]*\)-\([a-z0-9]*\)@riscv-sim/-march=\1/-mabi=\2@g')
|
||||
|
||||
CONFIGURE_HOST = @configure_host@
|
||||
|
||||
|
@ -200,7 +202,7 @@ stamps/build-gcc-linux-stage1: $(srcdir)/riscv-gcc stamps/build-binutils-linux \
|
|||
$(MAKE) -C $(notdir $@) inhibit-libc=true install-target-libgcc
|
||||
mkdir -p $(dir $@) && touch $@
|
||||
|
||||
stamps/build-gcc-linux-stage2: $(srcdir)/riscv-gcc $(addprefix stamps/build-glibc-linux-,$(MULTILIB_NAMES)) \
|
||||
stamps/build-gcc-linux-stage2: $(srcdir)/riscv-gcc $(addprefix stamps/build-glibc-linux-,$(GLIBC_MULTILIB_NAMES)) \
|
||||
stamps/build-glibc-linux-headers
|
||||
rm -rf $@ $(notdir $@)
|
||||
mkdir $(notdir $@)
|
||||
|
@ -333,7 +335,7 @@ stamps/check-gcc-newlib: stamps/build-gcc-newlib-stage2 stamps/build-qemu
|
|||
export DEJAGNULIBS=$(srcdir)/riscv-dejagnu && \
|
||||
export RISC_V_SYSROOT=$(SYSROOT) && \
|
||||
cd build-gcc-newlib-stage2 && \
|
||||
$(MAKE) check-gcc "RUNTESTFLAGS=--target_board='$(GCC_TARGET_BOARDS)'"
|
||||
$(MAKE) check-gcc "RUNTESTFLAGS=--target_board='$(NEWLIB_TARGET_BOARDS)'"
|
||||
date > $@
|
||||
|
||||
stamps/check-gcc-linux: stamps/build-gcc-linux-stage2 stamps/build-qemu
|
||||
|
@ -341,19 +343,19 @@ stamps/check-gcc-linux: stamps/build-gcc-linux-stage2 stamps/build-qemu
|
|||
export DEJAGNULIBS=$(srcdir)/riscv-dejagnu && \
|
||||
export RISC_V_SYSROOT=$(SYSROOT) && \
|
||||
cd build-gcc-linux-stage2 && \
|
||||
$(MAKE) check-gcc "RUNTESTFLAGS=--target_board='$(GCC_TARGET_BOARDS)'"
|
||||
$(MAKE) check-gcc "RUNTESTFLAGS=--target_board='$(GLIBC_TARGET_BOARDS)'"
|
||||
date > $@
|
||||
|
||||
.PHONY: report-gcc-newlib
|
||||
|
||||
report-gcc-newlib: stamps/check-gcc-newlib
|
||||
stat $(patsubst %,$(srcdir)/test/gcc-newlib/%.log,$(MULTILIB_NAMES)) || exit 1
|
||||
if find build-gcc-newlib-stage2/gcc/testsuite/ -iname '*.sum' | xargs grep ^FAIL | sort | grep -F -v $(patsubst %,--file=$(srcdir)/test/gcc-newlib/%.log,$(MULTILIB_NAMES)); then false; else true; fi
|
||||
stat $(patsubst %,$(srcdir)/test/gcc-newlib/%.log,$(NEWLIB_MULTILIB_NAMES)) || exit 1
|
||||
if find build-gcc-newlib-stage2/gcc/testsuite/ -iname '*.sum' | xargs grep ^FAIL | sort | grep -F -v $(patsubst %,--file=$(srcdir)/test/gcc-newlib/%.log,$(NEWLIB_MULTILIB_NAMES)); then false; else true; fi
|
||||
|
||||
.PHONY: report-gcc-linux
|
||||
report-gcc-linux: stamps/check-gcc-linux
|
||||
stat $(patsubst %,$(srcdir)/test/gcc-linux/%.log,$(MULTILIB_NAMES)) || exit 1
|
||||
if find build-gcc-linux-stage2/gcc/testsuite/ -iname '*.sum' | xargs grep ^FAIL | sort | grep -F -v $(patsubst %,--file=$(srcdir)/test/gcc-linux/%.log,$(MULTILIB_NAMES)); then false; else true; fi
|
||||
stat $(patsubst %,$(srcdir)/test/gcc-linux/%.log,$(GLIBC_MULTILIB_NAMES)) || exit 1
|
||||
if find build-gcc-linux-stage2/gcc/testsuite/ -iname '*.sum' | xargs grep ^FAIL | sort | grep -F -v $(patsubst %,--file=$(srcdir)/test/gcc-linux/%.log,$(GLIBC_MULTILIB_NAMES)); then false; else true; fi
|
||||
|
||||
clean:
|
||||
rm -rf build-* $(addprefix src/,$(PACKAGES)) stamps
|
||||
|
|
|
@ -590,7 +590,8 @@ with_system_zlib
|
|||
configure_host
|
||||
cmodel
|
||||
gcc_checking
|
||||
multilib_names
|
||||
newlib_multilib_names
|
||||
glibc_multilib_names
|
||||
multilib_flags
|
||||
WITH_ABI
|
||||
WITH_ARCH
|
||||
|
@ -3302,10 +3303,18 @@ else
|
|||
fi
|
||||
|
||||
if test "x$enable_multilib" != xno; then :
|
||||
multilib_names="rv32imac-ilp32 rv32imafdc-ilp32d rv64imac-lp64 rv64imafdc-lp64d"
|
||||
glibc_multilib_names="rv32imac-ilp32 rv32imafdc-ilp32d rv64imac-lp64 rv64imafdc-lp64d"
|
||||
|
||||
else
|
||||
multilib_names="$with_arch-$with_abi"
|
||||
glibc_multilib_names="$with_arch-$with_abi"
|
||||
|
||||
fi
|
||||
|
||||
if test "x$enable_multilib" != xno; then :
|
||||
newlib_multilib_names="rv32i-ilp32 rv32iac-ilp32 rv32im-ilp32 rv32imac-ilp32 rv32imafc-ilp32f rv64imac-lp64 rv64imafdc-lp64d"
|
||||
|
||||
else
|
||||
newlib_multilib_names="$with_arch-$with_abi"
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -97,8 +97,12 @@ AS_IF([test "x$enable_multilib" != xno],
|
|||
[AC_SUBST(multilib_flags,--disable-multilib)])
|
||||
|
||||
AS_IF([test "x$enable_multilib" != xno],
|
||||
[AC_SUBST(multilib_names,"rv32imac-ilp32 rv32imafdc-ilp32d rv64imac-lp64 rv64imafdc-lp64d")],
|
||||
[AC_SUBST(multilib_names,"$with_arch-$with_abi")])
|
||||
[AC_SUBST(glibc_multilib_names,"rv32imac-ilp32 rv32imafdc-ilp32d rv64imac-lp64 rv64imafdc-lp64d")],
|
||||
[AC_SUBST(glibc_multilib_names,"$with_arch-$with_abi")])
|
||||
|
||||
AS_IF([test "x$enable_multilib" != xno],
|
||||
[AC_SUBST(newlib_multilib_names,"rv32i-ilp32 rv32iac-ilp32 rv32im-ilp32 rv32imac-ilp32 rv32imafc-ilp32f rv64imac-lp64 rv64imafdc-lp64d")],
|
||||
[AC_SUBST(newlib_multilib_names,"$with_arch-$with_abi")])
|
||||
|
||||
AC_ARG_ENABLE(gcc-checking,
|
||||
[AS_HELP_STRING([--enable-gcc-checking],
|
||||
|
|
Loading…
Reference in New Issue