Skip to contentSkip to conversation

package/rhash: fix build failure due to gcc -v

PATCH New Fabrice Fontaine 5 participants 9 messages Dec 3, 2020 – Dec 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rhash: fix build failure due to gcc -v

Fixes:
- http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

---
 ...01-configure-allow-cross-compilation.patch | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/rhash/0001-configure-allow-cross-compilation.patch
package/rhash/0001-configure-allow-cross-compilation.patch new file +45 -0
new file mode 100644
index 0000000000..e33353f8b3
@@ -0,0 +1,45 @@
+From 0605ddf795330c03ff52e993726de99a984cf2f4 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 10 Oct 2020 11:07:39 +0200
+Subject: [PATCH] configure: allow cross-compilation
+
+Update configure to allow the user to pass a cross-compiler such as
+--cc=/home/fabrice/buildroot/output/host/bin/riscv64-buildroot-linux-uclibc-gcc
+
+First, use --version instead of -v to avoid a build failure and set
+cc_vendor to gnu if CC compiler contains gcc
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ configure | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure b/configure
+index 2783b85..c8e1ea7 100755
+--- a/configure
++++ b/configure
+@@ -512,9 +512,9 @@ else
+   CC_TMP="$CC"
+   test -n "$OPT_CC" && OTHER_CC= || OTHER_CC="gcc cc"
+   for CC in "$CC_TMP" $OTHER_CC; do
+-    if run_cmd "$CC -v"; then
+-      cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
+-      if test "$cc_name_tmp" = "gcc"; then
++    if run_cmd "$CC --version"; then
++      cc_name_tmp=$($CC --version 2>&1 | head -n 1 | cut -d ' ' -f 1)
++      if echo "$cc_name_tmp" | grep -q "gcc"; then
+         cc_name=$cc_name_tmp
+         start_check "$CC version"
+         cc_vendor=gnu
+@@ -538,7 +538,7 @@ else
+         finish_check "$cc_name $cc_version"
+         break
+       fi
+-      if $CC -v 2>&1 | grep -q "clang"; then
++      if $CC --version 2>&1 | grep -q "clang"; then
+         start_check "$CC version"
+         cc_vendor=clang
+         cc_version=$($CC -dumpversion 2>&1)
+-- 
+2.29.2
+
Signature · 1 line
2.29.2
#2 lore raw

PATCH 1/1 package/rhash: fix build failure due to gcc -v

Hi,

Le sam. 5 d?c. 2020 ? 21:31, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 10 lines
Quoted 4 lines · On Thu, 3 Dec 2020 21:28:53 +0100 Fabrice Fontaine…

Fixes:
- http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Why isn't gcc -v working ?

I don't know, you can see the full trace here:
http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20/rhash-1.4.0/config.log

Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice

#3 lore raw

PATCH 1/1 package/rhash: fix build failure due to gcc -v

Hello Fabrice, Thomas,

Quoted 8 lines · Fabrice Fontaine

Hi,

Le sam. 5 d?c. 2020 ? 21:31, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 4 lines

On Thu, 3 Dec 2020 21:28:53 +0100
Fabrice Fontaine <[email protected]> wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Why isn't gcc -v working ?

I don't know, you can see the full trace here:
http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20/rhash-1.4.0/config.log

May be a problem with the toolchain-wrapper?

	$ ls -l .../host/bin/arm-linux-gcc
.../host/bin/arm-linux-gcc -> toolchain-wrapper
	$ .../host/bin/arm-linux-gcc -v 
Using built-in specs.
COLLECT_GCC=.../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real
COLLECT_LTO_WRAPPER=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/lto-wrapper
Target: arm-buildroot-linux-uclibcgnueabihf
Configured with: ./configure --prefix=/opt/br-arm11-full-nothread-2020.02 --sysconfdir=/opt/br-arm11-full-nothread-2020.02/etc --enable-static --target=arm-buildroot-linux-uclibcgnueabihf --with-sysroot=/opt/br-arm11-full-nothread-2020.02/arm-buildroot-linux-uclibcgnueabihf/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --with-gmp=/opt/br-arm11-full-nothread-2020.02 --with-mpc=/opt/br-arm11-full-nothread-2020.02 --with-mpfr=/opt/br-arm11-full-nothread-2020.02 --with-pkgversion='Buildroot 2020.02' --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath --disable-libsanitizer --disable-tls --disable-threads --disable-libitm --disable-libatomic --without-isl --without-cloog --with-abi=aapcs-linux --with-cpu=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-mode=arm --enable-languages=c,c++ --with-build-time-tools=/opt/br-arm11-full-nothread-2020.02/arm-buildroot-linux-uclibcgnueabihf/bin --enable-shared --disable-libgomp
Thread model: single
gcc version 8.3.0 (Buildroot 2020.02) 
COMPILER_PATH=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/:.../host/opt/ext-toolchain/bin/../libexec/gcc/:.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/
LIBRARY_PATH=.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/:.../host/opt/ext-toolchain/bin/../lib/gcc/:.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/lib/:.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/lib/:.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/
COLLECT_GCC_OPTIONS='-mabi=aapcs-linux' '-mfpu=vfp' '-marm' '-mfloat-abi=hard' '-mcpu=arm1176jzf-s' '-v' '-mtls-dialect=gnu' '-march=armv6kz+fp'
 .../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/collect2 -plugin .../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/liblto_plugin.so -plugin-opt=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccb9JJ1m.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot --eh-frame-hdr -dynamic-linker /lib/ld-uClibc.so.0 -X -m armelf_linux_eabi .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crt1.o .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crti.o .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/crtbegin.o -L.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0 -L.../host/opt/ext-toolchain/bin/../lib/gcc -L.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/lib -L.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/lib -L.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib -z relro -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/crtend.o .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crtn.o
.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
collect2: error: ld returned 1 exit status

The toolchain-wrapper seems to do/try some compile after the '-v' handling (all output after the 'gcc version 8.3.0 (Buildroot 2020.02)' line)

The gcc -v output from the host for compare:

	$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d --enable-offload-targets=nvptx-none,amdgcn-amdhsa, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/10 --enable-ssp --disable-libssp --disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-10 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --with-build-config=bootstrap-lto-lean --enable-link-mutex --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20201202 [revision e563687cf9d3d1278f45aaebd03e0f66531076c9] (SUSE Linux) 

Regards,
Peter

Quoted 13 lines
Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH 1/1 package/rhash: fix build failure due to gcc -v

Hello Fabrice, Thomas,

Quoted 43 lines · Peter Seiderer

Hello Fabrice, Thomas,

Quoted 8 lines · Fabrice Fontaine

Hi,

Le sam. 5 d?c. 2020 ? 21:31, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 4 lines

On Thu, 3 Dec 2020 21:28:53 +0100
Fabrice Fontaine <[email protected]> wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Why isn't gcc -v working ?

I don't know, you can see the full trace here:
http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20/rhash-1.4.0/config.log

May be a problem with the toolchain-wrapper?

	$ ls -l .../host/bin/arm-linux-gcc
.../host/bin/arm-linux-gcc -> toolchain-wrapper
	$ .../host/bin/arm-linux-gcc -v 
Using built-in specs.
COLLECT_GCC=.../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real
COLLECT_LTO_WRAPPER=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/lto-wrapper
Target: arm-buildroot-linux-uclibcgnueabihf
Configured with: ./configure --prefix=/opt/br-arm11-full-nothread-2020.02 --sysconfdir=/opt/br-arm11-full-nothread-2020.02/etc --enable-static --target=arm-buildroot-linux-uclibcgnueabihf --with-sysroot=/opt/br-arm11-full-nothread-2020.02/arm-buildroot-linux-uclibcgnueabihf/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --with-gmp=/opt/br-arm11-full-nothread-2020.02 --with-mpc=/opt/br-arm11-full-nothread-2020.02 --with-mpfr=/opt/br-arm11-full-nothread-2020.02 --with-pkgversion='Buildroot 2020.02' --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath --disable-libsanitizer --disable-tls --disable-threads --disable-libitm --disable-libatomic --without-isl --without-cloog --with-abi=aapcs-linux --with-cpu=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-mode=arm --enable-languages=c,c++ --with-build-time-tools=/opt/br-arm11-full-nothread-2020.02/arm-buildroot-linux-uclibcgnueabihf/bin --enable-shared --disable-libgomp
Thread model: single
gcc version 8.3.0 (Buildroot 2020.02) 
COMPILER_PATH=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/:.../host/opt/ext-toolchain/bin/../libexec/gcc/:.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/
LIBRARY_PATH=.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/:.../host/opt/ext-toolchain/bin/../lib/gcc/:.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/lib/:.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/lib/:.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/
COLLECT_GCC_OPTIONS='-mabi=aapcs-linux' '-mfpu=vfp' '-marm' '-mfloat-abi=hard' '-mcpu=arm1176jzf-s' '-v' '-mtls-dialect=gnu' '-march=armv6kz+fp'
 .../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/collect2 -plugin .../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/liblto_plugin.so -plugin-opt=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccb9JJ1m.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot --eh-frame-hdr -dynamic-linker /lib/ld-uClibc.so.0 -X -m armelf_linux_eabi .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crt1.o .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crti.o .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/crtbegin.o -L.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0 -L.../host/opt/ext-toolchain/bin/../lib/gcc -L.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/lib -L.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/lib -L.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib -z relro -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/crtend.o .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crtn.o
.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
collect2: error: ld returned 1 exit status
Quoted 3 lines

The toolchain-wrapper seems to do/try some compile after the '-v' handling (all output after the 'gcc version 8.3.0 (Buildroot 2020.02)' line)

A strace of

	$ .../host/bin/arm-linux-gcc -v

shows

	24399 execve(".../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real", ["/home/seiderer/Work/Buildroot/bu"..., "--sysroot", "/.../bu"..., "-mabi=aapcs-linux", "-mfpu=vfp", "-marm", "-mfloat-abi=hard", "-mcpu=arm1176jzf-s", "-Wl,-z,relro", "-v"], 0x7ffca405b940 /* 93 vars */) = 0

This one works:

	$ .../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real --sysroot bla -mabi=aapcs-linux -mfpu=vfp -marm -mfloat-abi=hard -mcpu=arm1176jzf-s  -v

This one fails:

	$ .../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real --sysroot bla -mabi=aapcs-linux -mfpu=vfp -marm -mfloat-abi=hard -mcpu=arm1176jzf-s -Wl,-z,relro -v

Regards,
Peter

Quoted 38 lines

The gcc -v output from the host for compare:

	$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d --enable-offload-targets=nvptx-none,amdgcn-amdhsa, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/10 --enable-ssp --disable-libssp --disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-10 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --with-build-config=bootstrap-lto-lean --enable-link-mutex --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20201202 [revision e563687cf9d3d1278f45aaebd03e0f66531076c9] (SUSE Linux) 

Regards,
Peter

Quoted 6 lines
Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Quoted 7 lines

Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#5 lore raw

PATCH 1/1 package/rhash: fix build failure due to gcc -v

Hi Peter,

Le dim. 13 d?c. 2020 ? 17:20, Peter Seiderer <[email protected]> a ?crit :

Quoted 61 lines

Hello Fabrice, Thomas,

Quoted 43 lines · Peter Seiderer

Hello Fabrice, Thomas,

Quoted 8 lines · Fabrice Fontaine

Hi,

Le sam. 5 d?c. 2020 ? 21:31, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 4 lines

On Thu, 3 Dec 2020 21:28:53 +0100
Fabrice Fontaine <[email protected]> wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Why isn't gcc -v working ?

I don't know, you can see the full trace here:
http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20/rhash-1.4.0/config.log

May be a problem with the toolchain-wrapper?

      $ ls -l .../host/bin/arm-linux-gcc
.../host/bin/arm-linux-gcc -> toolchain-wrapper
      $ .../host/bin/arm-linux-gcc -v
Using built-in specs.
COLLECT_GCC=.../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real
COLLECT_LTO_WRAPPER=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/lto-wrapper
Target: arm-buildroot-linux-uclibcgnueabihf
Configured with: ./configure --prefix=/opt/br-arm11-full-nothread-2020.02 --sysconfdir=/opt/br-arm11-full-nothread-2020.02/etc --enable-static --target=arm-buildroot-linux-uclibcgnueabihf --with-sysroot=/opt/br-arm11-full-nothread-2020.02/arm-buildroot-linux-uclibcgnueabihf/sysroot --enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --with-gmp=/opt/br-arm11-full-nothread-2020.02 --with-mpc=/opt/br-arm11-full-nothread-2020.02 --with-mpfr=/opt/br-arm11-full-nothread-2020.02 --with-pkgversion='Buildroot 2020.02' --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath --disable-libsanitizer --disable-tls --disable-threads --disable-libitm --disable-libatomic --without-isl --without-cloog --with-abi=aapcs-linux --with-cpu=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-mode=arm --enable-languages=c,c++ --with-build-time-tools=/opt/br-arm11-full-nothread-2020.02/arm-buildroot-linux-uclibcgnueabihf/bin --enable-shared --disable-libgomp
Thread model: single
gcc version 8.3.0 (Buildroot 2020.02)
COMPILER_PATH=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/:.../host/opt/ext-toolchain/bin/../libexec/gcc/:.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/
LIBRARY_PATH=.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/:.../host/opt/ext-toolchain/bin/../lib/gcc/:.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/lib/:.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/lib/:.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/
COLLECT_GCC_OPTIONS='-mabi=aapcs-linux' '-mfpu=vfp' '-marm' '-mfloat-abi=hard' '-mcpu=arm1176jzf-s' '-v' '-mtls-dialect=gnu' '-march=armv6kz+fp'
 .../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/collect2 -plugin .../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/liblto_plugin.so -plugin-opt=.../host/opt/ext-toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccb9JJ1m.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot --eh-frame-hdr -dynamic-linker /lib/ld-uClibc.so.0 -X -m armelf_linux_eabi .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crt1.o .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crti.o .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/crtbegin.o -L.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0 -L.../host/opt/ext-toolchain/bin/../lib/gcc -L.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/lib -L.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/lib -L.../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib -z relro -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed .../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/crtend.o .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crtn.o
.../host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: .../host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/crt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
collect2: error: ld returned 1 exit status
Quoted 3 lines

The toolchain-wrapper seems to do/try some compile after the '-v' handling (all output after the 'gcc version 8.3.0 (Buildroot 2020.02)' line)

A strace of

        $ .../host/bin/arm-linux-gcc -v

shows

        24399 execve(".../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real", ["/home/seiderer/Work/Buildroot/bu"..., "--sysroot", "/.../bu"..., "-mabi=aapcs-linux", "-mfpu=vfp", "-marm", "-mfloat-abi=hard", "-mcpu=arm1176jzf-s", "-Wl,-z,relro", "-v"], 0x7ffca405b940 /* 93 vars */) = 0
Quoted 7 lines

This one works:

        $ .../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real --sysroot bla -mabi=aapcs-linux -mfpu=vfp -marm -mfloat-abi=hard -mcpu=arm1176jzf-s  -v

This one fails:

        $ .../host/opt/ext-toolchain/bin/arm-linux-gcc.br_real --sysroot bla -mabi=aapcs-linux -mfpu=vfp -marm -mfloat-abi=hard -mcpu=arm1176jzf-s -Wl,-z,relro -v

Indeed, it seems that -Wl,-z,relro and -v doesn't work, I'll send a patch to update toolchain-wrapper.c.

Quoted 44 lines

Regards,
Peter

Quoted 38 lines

The gcc -v output from the host for compare:

      $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d --enable-offload-targets=nvptx-none,amdgcn-amdhsa, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/10 --enable-ssp --disable-libssp --disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-10 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --with-build-config=bootstrap-lto-lean --enable-link-mutex --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20201202 [revision e563687cf9d3d1278f45aaebd03e0f66531076c9] (SUSE Linux)

Regards,
Peter

Quoted 6 lines
Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Quoted 7 lines

Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Best Regards,

Fabrice

#6 lore raw

PATCH 1/1 package/rhash: fix build failure due to gcc -v

In reply to Fabrice Fontaine

Fabrice, All,

On 2020-12-03 21:28 +0100, Fabrice Fontaine spake thusly:

Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Applied to master with the following changes:

- retain "$CC -v" as default, fallback to "$CC --version", in the hope that it stands better chance with upstream
- write a commit log to explain the actual root-cause of the build failure

Thanks!

Regards,
Yann E. MORIN.

Quoted 63 lines
---
 ...01-configure-allow-cross-compilation.patch | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/rhash/0001-configure-allow-cross-compilation.patch
package/rhash/0001-configure-allow-cross-compilation.patch new file +45 -0
new file mode 100644
index 0000000000..e33353f8b3
@@ -0,0 +1,45 @@
+From 0605ddf795330c03ff52e993726de99a984cf2f4 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 10 Oct 2020 11:07:39 +0200
+Subject: [PATCH] configure: allow cross-compilation
+
+Update configure to allow the user to pass a cross-compiler such as
+--cc=/home/fabrice/buildroot/output/host/bin/riscv64-buildroot-linux-uclibc-gcc
+
+First, use --version instead of -v to avoid a build failure and set
+cc_vendor to gnu if CC compiler contains gcc
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ configure | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure b/configure
+index 2783b85..c8e1ea7 100755
+--- a/configure
++++ b/configure
+@@ -512,9 +512,9 @@ else
+   CC_TMP="$CC"
+   test -n "$OPT_CC" && OTHER_CC= || OTHER_CC="gcc cc"
+   for CC in "$CC_TMP" $OTHER_CC; do
+-    if run_cmd "$CC -v"; then
+-      cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
+-      if test "$cc_name_tmp" = "gcc"; then
++    if run_cmd "$CC --version"; then
++      cc_name_tmp=$($CC --version 2>&1 | head -n 1 | cut -d ' ' -f 1)
++      if echo "$cc_name_tmp" | grep -q "gcc"; then
+         cc_name=$cc_name_tmp
+         start_check "$CC version"
+         cc_vendor=gnu
+@@ -538,7 +538,7 @@ else
+         finish_check "$cc_name $cc_version"
+         break
+       fi
+-      if $CC -v 2>&1 | grep -q "clang"; then
++      if $CC --version 2>&1 | grep -q "clang"; then
+         start_check "$CC version"
+         cc_vendor=clang
+         cc_version=$($CC -dumpversion 2>&1)
+-- 
+2.29.2
+
Signature · 6 lines
2.29.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 1/1 package/rhash: fix build failure due to gcc -v

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Fabrice, All,
On 2020-12-03 21:28 +0100, Fabrice Fontaine spake thusly:

Quoted 3 lines

Fixes:
- http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Quoted 8 lines
Quoted 1 line

Applied to master with the following changes:

- retain "$CC -v" as default, fallback to "$CC --version", in the hope that it stands better chance with upstream
- write a commit log to explain the actual root-cause of the build failure

This is only an issue with rhash 1.4.0, and not the older versions we have on the stable branches, right?

Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw

PATCH 1/1 package/rhash: fix build failure due to gcc -v

Hi Peter,

Le dim. 27 d?c. 2020 ? 08:55, Peter Korsgaard <[email protected]> a ?crit :

Quoted 12 lines
Quoted 11 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Yann" == Yann E MORIN <[email protected]> writes:

Fabrice, All,
On 2020-12-03 21:28 +0100, Fabrice Fontaine spake thusly:

Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Applied to master with the following changes:

Quoted 7 lines
Quoted 4 lines

- retain "$CC -v" as default, fallback to "$CC --version", in the hope that it stands better chance with upstream
- write a commit log to explain the actual root-cause of the build failure

This is only an issue with rhash 1.4.0, and not the older versions we have on the stable branches, right?

Right, this issue is raised by the configure script which is available since version 1.3.6.
We're using it since our bump to version 1.4.0 with commit cdaf43862229fb0f10d2b6b7448bcded2ef8edde.

Quoted 3 lines

--
Bye, Peter Korsgaard

Best Regards,

Fabrice