public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mr Dini <mrdini@protonmail.com>
To: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Gcc build fails with test_real_width is negative
Date: Sun, 28 Nov 2021 19:16:56 +0000	[thread overview]
Message-ID: <Ri70FhKzDtUzUN3e0ll9Mq5yKrYRfoCyczXPkszsSfA60lFyzsRH31eA5HuktYVZ1A-JDGBh01lK5DDLah03yUYZKU9SrXeBbUzgzWFYxiI=@protonmail.com> (raw)

Hi,

I am trying to build a native gcc binary for a pre-existing rootfs of my smart 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 warranty; 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) <= 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="arm-webos-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi" CXX="arm-webos-linux-gnueabi-g++ -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi" ./configure --prefix=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --with-mpfr=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --host=armv7a-linux-gnueabi --target=armv7a-linux-gnueabi --build=x86_64-linux-gnu

Any ideas what can I do?

Thank you so much!

             reply	other threads:[~2021-11-28 19:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28 19:16 Mr Dini [this message]
2021-11-29 10:10 ` Stefan Ring
2021-11-29 14:01   ` Jonathan Wakely
2021-11-29 11:05 Mr Dini
2021-11-29 12:00 ` Stefan Ring
2021-11-29 12:12   ` Mr Dini
2021-11-29 12:18   ` AW: " Stefan Franke
2021-11-29 19:40     ` Mr Dini
2021-12-02  9:20       ` Stefan Ring
2021-12-02 21:22         ` Stefan Ring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='Ri70FhKzDtUzUN3e0ll9Mq5yKrYRfoCyczXPkszsSfA60lFyzsRH31eA5HuktYVZ1A-JDGBh01lK5DDLah03yUYZKU9SrXeBbUzgzWFYxiI=@protonmail.com' \
    --to=mrdini@protonmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).