public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "frans at fransdb dot nl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/101966] New: The specified --host is not always passed correctly
Date: Wed, 18 Aug 2021 19:29:08 +0000	[thread overview]
Message-ID: <bug-101966-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101966

            Bug ID: 101966
           Summary: The specified --host is not always passed correctly
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: frans at fransdb dot nl
  Target Milestone: ---
              Host: aarch64 (cortex-a53)
            Target: same
             Build: x86-64

Issue while trying to compile the second stage of gcc-11.2, to be used on an
aarch64 architecture.

Used configure command:
  --prefix=/usr               \
  --host=aarch64-cross-linux-gnueabi \
  --build=x86_64-suse-linux   \
  CC_FOR_TARGET=aarch64-cross-linux-gnueabi-gcc  \
  --enable-languages=c,c++    \
  --disable-multilib          \
  --disable-nls               \
  --disable-decimal-float     \
  --disable-libatomic         \
  --disable-libgomp           \
  --disable-libquadmath       \
  --disable-libssp            \
  --disable-libvtv            \
  --disable-libstdcxx

First some listing:
....
gcc -c  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings
-pedantic -Wno-long-long   -DHAVE_CONFIG_H -I.
-I/mnt/lfs/sources-base/gcc-11.2.0/fixincludes -I../include
-I/mnt/lfs/sources-base/gcc-11.2.0/fixincludes/../include
/mnt/lfs/sources-base/gcc-11.2.0/fixincludes/fixopts.c
gcc   -o fixincl fixincl.o fixtests.o fixfixes.o server.o procopen.o fixlib.o
fixopts.o ../libiberty/libiberty.a
echo timestamp > full-stamp
srcdir="/mnt/lfs/sources-base/gcc-11.2.0/fixincludes" /bin/sh
/mnt/lfs/sources-base/gcc-11.2.0/fixincludes/mkfixinc.sh
aarch64-cross-linux-gnueabi
sed -e 's/@gcc_version@/11.2.0/' < mkheaders.almost > mkheadersT
mv -f mkheadersT mkheaders
make[2]: Leaving directory
'/mnt/lfs/sources-base/gcc-11.2.0/gcc-build/build-x86_64-suse-linux/fixincludes'
mkdir -p -- build-x86_64-suse-linux/libcpp
Configuring in build-x86_64-suse-linux/libcpp
configure: creating cache ./config.cache
checking build system type... x86_64-suse-linux-gnu
checking host system type... x86_64-suse-linux-gnu
checking target system type... aarch64-cross-linux-gnueabi
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
.....
config.status: executing depdir commands
mkdir -p -- .deps
make[2]: Entering directory
'/mnt/lfs/sources-base/gcc-11.2.0/gcc-build/build-x86_64-suse-linux/libcpp'
g++  -I/mnt/lfs/sources-base/gcc-11.2.0/libcpp -I.
-I/mnt/lfs/sources-base/gcc-11.2.0/libcpp/../include
-I/mnt/lfs/sources-base/gcc-11.2.0/libcpp/include  -mtune=cortex-a53 -W -Wall
-Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic
-Wno-long-long  -fno-exceptions -fno-rtti
-I/mnt/lfs/sources-base/gcc-11.2.0/libcpp -I.
-I/mnt/lfs/sources-base/gcc-11.2.0/libcpp/../include
-I/mnt/lfs/sources-base/gcc-11.2.0/libcpp/include    -c -o charset.o -MT
charset.o -MMD -MP -MF .deps/charset.Tpo
/mnt/lfs/sources-base/gcc-11.2.0/libcpp/charset.c
cc1plus: error: bad value ('cortex-a53') for '-mtune=' switch
cc1plus: note: valid arguments to '-mtune=' switch are: nocona core2 nehalem
corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2
broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake
icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake
bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64
eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3
opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1
bdver2 bdver3 bdver4 znver1 znver2 znver3 btver1 btver2 generic native
make[2]: *** [Makefile:226: charset.o] Error 1
make[2]: Leaving directory
'/mnt/lfs/sources-base/gcc-11.2.0/gcc-build/build-x86_64-suse-linux/libcpp'
make[1]: *** [Makefile:2898: all-build-libcpp] Error 2
make[1]: Leaving directory '/mnt/lfs/sources-base/gcc-11.2.0/gcc-build'
make: *** [Makefile:947: all] Error 2

The above is right, the only thing is that the wrong host has been forwarded.
On most others it is:
----
Configuring in ./gcc
configure: creating cache ./config.cache
checking build system type... x86_64-suse-linux-gnu
checking host system type... aarch64-cross-linux-gnueabi
checking target system type... aarch64-cross-linux-gnueabi
....

It goes wrong at this point:
....
mkdir -p -- build-x86_64-suse-linux/libiberty
Configuring in build-x86_64-suse-linux/libiberty
configure: creating cache ./config.cache
checking whether to enable maintainer-specific portions of Makefiles... no
checking for makeinfo... makeinfo --split-size=5000000
checking for perl... perl
checking build system type... x86_64-suse-linux-gnu
checking host system type... x86_64-suse-linux-gnu
checking for x86_64-suse-linux-ar... ar
....
The wrong host system is mentioned, which is passed on to fixinclude with the
resulting error.

Also, earlier on it went wrong with gmp.
....
Configuring in ./gmp
configure: creating cache ./config.cache
checking build system type... x86_64-suse-linux-gnu
checking host system type... none-cross-linux-gnueabi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for none-cross-linux-gnueabi-strip... no

Somehow, the configure did not get the right host passed on.

It looks like bugs, but correct me if I am wrong.

             reply	other threads:[~2021-08-18 19:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 19:29 frans at fransdb dot nl [this message]
2021-08-18 19:42 ` [Bug c/101966] " frans at fransdb dot nl
2021-08-18 20:09 ` schwab@linux-m68k.org
2021-08-18 20:21 ` [Bug bootstrap/101966] " pinskia at gcc dot gnu.org
2021-08-18 20:24 ` pinskia at gcc dot gnu.org
2021-08-19  7:51 ` frans at fransdb dot nl
2021-08-19  8:13 ` frans at fransdb dot nl

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=bug-101966-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).