From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) by sourceware.org (Postfix) with ESMTPS id 856FF385AC08 for ; Sun, 28 Nov 2021 19:17:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 856FF385AC08 Date: Sun, 28 Nov 2021 19:16:56 +0000 To: "gcc-help@gcc.gnu.org" From: Mr Dini Reply-To: Mr Dini Subject: Gcc build fails with test_real_width is negative Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_HK_NAME_FM_MR_MRS autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2021 19:17:03 -0000 Hi, I am trying to build a native gcc binary for a pre-existing rootfs of my sm= art TV. The vendor has provided a toolchain for x86_64 hosts: root@hal-9000:~# arm-webos-linux-gnueabi-gcc --version arm-webos-linux-gnueabi-gcc (GCC) 6.2.0 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO w= arranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. As for the building I have tried building on an ubuntu 16.04 host with gcc = version 5.3.1 and Ubuntu 20.04 with gcc version 9.3.0. The issue is always = the same. I have also tried to build the latest gcc release, 9.3.0, 9.2.0, 5.4.0 and = 6.2.0. Here is the error: https://pastebin.com/raw/Cr4amNCJ To quote the specific part: In file included from ../.././gcc/rtl.h:27, from ../.././gcc/genoutput.c:90: ../.././gcc/real.h:74:76: error: narrowing conversion of '-1' from 'int' to= 'long unsigned int' [-Wnarrowing] 74 | [sizeof (REAL_VALUE_TYPE) <=3D REAL_WIDTH * sizeof (HOST_WIDE_INT= ) ? 1 : -1]; | = ^ Also, it looks like when gcc is building this specific component, make does= a cd to host-armv7a-linux-gnueabi/gcc yet it uses the g++ of the host and = completely ignores the CXX variable I have set when I configure gcc: CC=3D"arm-webos-linux-gnueabi-gcc -march=3Darmv7-a -mfpu=3Dneon -mfloat-abi= =3Dsoftfp --sysroot=3D/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webo= s-linux-gnueabi" CXX=3D"arm-webos-linux-gnueabi-g++ -march=3Darmv7-a -mfpu= =3Dneon -mfloat-abi=3Dsoftfp --sysroot=3D/opt/webos-sdk-x86_64/1.0.g/sysroo= ts/armv7a-neon-webos-linux-gnueabi" ./configure --prefix=3D/opt/webos-sdk-x= 86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --with-mpfr=3D/opt/web= os-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --host=3Darmv7= a-linux-gnueabi --target=3Darmv7a-linux-gnueabi --build=3Dx86_64-linux-gnu Any ideas what can I do? Thank you so much!