The GCC configure script checks for .sleb128 and .uleb128 assembler
directives. These are disabled on RISC-V binutils. However GCC
checks /usr/bin/as, not the real assembler, so the check fails.
See also the sw-dev thread
".uleb128 directives in GCC 6.1.0 output not understood by binutils 2.27"
This should fix the stage3 RPM build of glibc.
patch -p1 < ../0001-HACKS-TO-GET-GCC-TO-COMPILE.patch
mkdir riscv-gcc-riscv-gcc-$(GCC_X_VERSION)/build
cd riscv-gcc-riscv-gcc-$(GCC_X_VERSION)/build && \
+ gcc_cv_as_leb128=no \
PATH=$(ROOT)/fixed-gcc:$$PATH \
../configure \
--host=riscv64-unknown-linux-gnu \
--disable-libquadmath \
--disable-nls \
--disable-multilib
- cd riscv-gcc-riscv-gcc-$(GCC_X_VERSION)/build && PATH=$(ROOT)/fixed-gcc:$$PATH make
+ cd riscv-gcc-riscv-gcc-$(GCC_X_VERSION)/build && gcc_cv_as_leb128=no PATH=$(ROOT)/fixed-gcc:$$PATH make
cd riscv-gcc-riscv-gcc-$(GCC_X_VERSION)/build && make install DESTDIR=$(ROOT)/stage3-chroot
rm -f stage3-chroot/usr/lib64/*.la