public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/112534] [14 regression] build failure after r14-5424-gdb50aea6259545 using gcc 4.8.5
Date: Fri, 01 Dec 2023 13:46:48 +0000	[thread overview]
Message-ID: <bug-112534-4-5yWHBve0yj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112534-4@http.gcc.gnu.org/bugzilla/>

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem is that the toplevel configure (which is autoconf 2.69 as pretty
much everything in gcc) uses the older AC_PROG_CC, which only checks for
-std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99, not for
-std=gnu11.
And sets
CC = @CC@
in toplevel Makefile.in to
CC = gcc -std=gnu99
in toplevel objdir Makefile.  That gets then passed to in-tree gettext (if
present, I really don't think you need it on powerpc64-linux-gnu, perhaps
download_prerequisities should be smarter and check if gettext is really
needed) configure (where it just means
CC is set there to gcc -std=gnu99 -std=gnu11 in gettext/Makefile), but worse is
passed as CC="gcc -std=gnu99" in environment down when doing make all in the
gettext subdir.
I think that is something very similar to how CXX="g++ -std=c++11" is being
passed down
to in-tree isl build and breaks with recent isl which wants to use C++17 or
what.
Strangely, in my x86_64-linux toplevel Makefile I only have
CC = gcc
CXX = g++ -std=c++11
Dunno why it hasn't added -std=gnu99 there, maybe because that gcc already
defaults to gnu17?  Anyway, even when CC = gcc, I think that is passed down to
make of the in-tree compilations.
So, I guess if we don't want to switch to autoconf 2.70 or later (which I think
is a lot of work), one possibility if we know gettext relies on C11 and newest
ISL relies on C++17 (does it really?) would be to add explicit probing in
configure for -std=gnu11 or -std=c11 and if that works, pass it down in the
gettext build case; and similarly for isl.  Maybe better not in CC/CXX but in
CFLAGS/CXXFLAGS?
The propagation of flags is done in $(HOST_EXPORTS) and for stage2+
$(POSTSTAGE1_HOST_EXPORTS).

Looking around in Makefile.def, I see e.g. for gmp/mpfr we use
                extra_make_flags='AM_CFLAGS="-DNO_ASM"';
and for isl
                extra_make_flags='V=1';
Dunno if it would work to add for the gettext case
                extra_make_flags='CFLAGS="$(CFLAGS) @C11_CFLAGS@"';
with configure check for C11_FLAGS or something similar.

  parent reply	other threads:[~2023-12-01 13:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 23:14 [Bug bootstrap/112534] New: " seurer at gcc dot gnu.org
2023-11-14 23:23 ` [Bug bootstrap/112534] " pinskia at gcc dot gnu.org
2023-11-15  0:57 ` bruno at clisp dot org
2023-11-15  1:03 ` bruno at clisp dot org
2023-11-15 11:58 ` rguenth at gcc dot gnu.org
2023-11-15 14:27 ` arsen at gcc dot gnu.org
2023-12-01 13:46 ` jakub at gcc dot gnu.org [this message]
2023-12-05 22:21 ` arsen at gcc dot gnu.org
2023-12-05 22:26 ` jakub at gcc dot gnu.org
2023-12-05 22:53 ` arsen at gcc dot gnu.org
2023-12-13 17:24 ` arsen at gcc dot gnu.org
2023-12-21  9:05 ` arsen at gcc dot gnu.org
2024-01-03  2:26 ` seurer at gcc dot gnu.org
2024-01-03 11:27 ` arsen at gcc dot gnu.org
2024-03-27 13:38 ` rguenth at gcc dot gnu.org
2024-03-27 18:47 ` arsen at gcc dot gnu.org
2024-05-07  7:42 ` [Bug bootstrap/112534] [14/15 " rguenth at gcc dot gnu.org

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-112534-4-5yWHBve0yj@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).