From 62495c8b131c67880142b22334456ccbd338fb70 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 12 Aug 2016 09:04:30 +0100 Subject: [PATCH] When cross-compiling GCC into stage3, set gcc_cv_as_leb128=no 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. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9ab8e98..c06a79d 100644 --- a/Makefile +++ b/Makefile @@ -529,6 +529,7 @@ stage3-chroot/usr/bin/gcc: gcc-$(GCC_X_VERSION).tar.gz 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 \ @@ -541,7 +542,7 @@ stage3-chroot/usr/bin/gcc: gcc-$(GCC_X_VERSION).tar.gz --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 -- 1.8.3.1