public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/112300] New: Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46
@ 2023-10-30 15:41 jamborm at gcc dot gnu.org
2023-10-31 8:44 ` [Bug target/112300] [14 Regression] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jamborm at gcc dot gnu.org @ 2023-10-30 15:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112300
Bug ID: 112300
Summary: Cross compiling to mipsisa64r2-sde-elf fails because
"HEAP_TRAMPOLINES_INIT was not declared in this scope"
since r14-4821-g28d8c680aaea46
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: jamborm at gcc dot gnu.org
CC: aburgess at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux-gnu
Target: mipsisa64r2-sde-elf
Starting with r14-4821-g28d8c680aaea46, when I try to test that cross
compilation to target mipsisa64r2-sde-elf works by configuring gcc with:
$ ../src/configure --target=mipsisa64r2-sde-elf --disable-bootstrap
--enable-languages=c,c++ --disable-multilib --enable-obsolete
and then building just the compiler with:
$ make -j64 all-host CXXFLAGS="-O0 -g" CFLAGS="-O0 -g"
The compilation fails with:
g++ -fno-PIE -c -O0 -g -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H
-fno-PIE -I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include
-I../../src/gcc/../libcpp/include -I../../src/gcc/../libcody
-I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../src/gcc/../libbacktrace -o options.o -MT options.o
-MMD -MP -MF ./.deps/options.TPo options.cc
options.cc:3246:3: error: ‘HEAP_TRAMPOLINES_INIT’ was not declared in this
scope
3246 | HEAP_TRAMPOLINES_INIT ? TRAMPOLINE_IMPL_HEAP : TRAMPOLINE_IMPL_STACK,
/* flag_trampoline_impl */
| ^~~~~~~~~~~~~~~~~~~~~
options.cc:3247:3: error: ‘HEAP_TRAMPOLINES_INIT’ was not declared in this
scope
3247 | HEAP_TRAMPOLINES_INIT, /* flag_trampolines */
| ^~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:1188: options.o] Error 1
make[1]: Leaving directory '/home/mjambor/gcc/mine/obj/gcc'
make: *** [Makefile:4660: all-gcc] Error 2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/112300] [14 Regression] Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46
2023-10-30 15:41 [Bug target/112300] New: Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46 jamborm at gcc dot gnu.org
@ 2023-10-31 8:44 ` rguenth at gcc dot gnu.org
2023-11-24 15:47 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-31 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112300
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Cross compiling to |[14 Regression] Cross
|mipsisa64r2-sde-elf fails |compiling to
|because |mipsisa64r2-sde-elf fails
|"HEAP_TRAMPOLINES_INIT was |because
|not declared in this scope" |"HEAP_TRAMPOLINES_INIT was
|since |not declared in this scope"
|r14-4821-g28d8c680aaea46 |since
| |r14-4821-g28d8c680aaea46
Target Milestone|--- |14.0
Priority|P3 |P1
Keywords| |build
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/112300] [14 Regression] Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46
2023-10-30 15:41 [Bug target/112300] New: Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46 jamborm at gcc dot gnu.org
2023-10-31 8:44 ` [Bug target/112300] [14 Regression] " rguenth at gcc dot gnu.org
@ 2023-11-24 15:47 ` jakub at gcc dot gnu.org
2023-11-27 8:23 ` cvs-commit at gcc dot gnu.org
2023-11-27 8:25 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-24 15:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112300
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-11-24
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That seems like config.gcc bug for the particular target, which is the only one
which doesn't append its tm_defines to the earlier ones, but overwrites them:
grep 'tm_defines="[^$]' config.gcc
tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6
MIPS_ABI_DEFAULT=ABI_32"
tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2
MIPS_ABI_DEFAULT=ABI_32"
tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32
MIPS_ABI_DEFAULT=ABI_32"
tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6
MIPS_ABI_DEFAULT=ABI_N32"
tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2
MIPS_ABI_DEFAULT=ABI_N32"
tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64
MIPS_ABI_DEFAULT=ABI_N32"
tm_defines="TARGET_ENDIAN_DEFAULT=0
$tm_defines"
So, I guess
2023-11-24 Jakub Jelinek <jakub@redhat.com>
PR target/112300
* config.gcc (mips*-sde-elf*): Append to tm_defines rather than
overwriting them.
--- gcc/config.gcc.jj 2023-11-18 09:35:20.625089143 +0100
+++ gcc/config.gcc 2023-11-24 16:41:39.194495079 +0100
@@ -2682,22 +2682,22 @@ mips*-sde-elf*)
esac
case ${target} in
mipsisa32r6*)
- tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6
MIPS_ABI_DEFAULT=ABI_32"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6
MIPS_ABI_DEFAULT=ABI_32"
;;
mipsisa32r2*)
- tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2
MIPS_ABI_DEFAULT=ABI_32"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2
MIPS_ABI_DEFAULT=ABI_32"
;;
mipsisa32*)
- tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32
MIPS_ABI_DEFAULT=ABI_32"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32
MIPS_ABI_DEFAULT=ABI_32"
;;
mipsisa64r6*)
- tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6
MIPS_ABI_DEFAULT=ABI_N32"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6
MIPS_ABI_DEFAULT=ABI_N32"
;;
mipsisa64r2*)
- tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2
MIPS_ABI_DEFAULT=ABI_N32"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2
MIPS_ABI_DEFAULT=ABI_N32"
;;
mipsisa64*)
- tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64
MIPS_ABI_DEFAULT=ABI_N32"
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64
MIPS_ABI_DEFAULT=ABI_N32"
;;
esac
;;
should be the right fix, but I've never heard of mips*-sde*-elf before... ;)
From looking at config.gcc, I think the change will add
" LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4 HEAP_TRAMPOLINES_INIT=0
"
to the start of tm_defines.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/112300] [14 Regression] Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46
2023-10-30 15:41 [Bug target/112300] New: Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46 jamborm at gcc dot gnu.org
2023-10-31 8:44 ` [Bug target/112300] [14 Regression] " rguenth at gcc dot gnu.org
2023-11-24 15:47 ` jakub at gcc dot gnu.org
@ 2023-11-27 8:23 ` cvs-commit at gcc dot gnu.org
2023-11-27 8:25 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-27 8:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112300
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:221166ad15eb37b047c77118f2eb1c8442eaa27b
commit r14-5868-g221166ad15eb37b047c77118f2eb1c8442eaa27b
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Nov 27 09:22:20 2023 +0100
mips: Fix up mips*-sde-elf* build [PR112300]
As reported in the PR, mipsisa64r2-sde-elf doesn't build because
HEAP_TRAMPOLINES_INIT
macro isn't defined anywhere.
It is normally defined by
# Figure out if we need to enable heap trampolines by default
case ${target} in
*-*-darwin2*)
# Currently, we do this for macOS 11 and above.
tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1"
;;
*)
tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0"
;;
esac
in config.gcc, but mips*-sde-elf* is the only target which overwrites
tm_defines shell variable rather than just appending to it (or in one case
prepending), all other targets append something to it, including other
mips* triplets.
I believe (just from looking at config.gcc) that the difference is that
LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4
HEAP_TRAMPOLINES_INIT=0
isn't defined without the patch and is with the patch.
I think defining those first 4 shouldn't cause any harm and defining the
last one is required for it to actually build at all.
2023-11-27 Jakub Jelinek <jakub@redhat.com>
PR target/112300
* config.gcc (mips*-sde-elf*): Append to tm_defines rather than
overwriting them.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/112300] [14 Regression] Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46
2023-10-30 15:41 [Bug target/112300] New: Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46 jamborm at gcc dot gnu.org
` (2 preceding siblings ...)
2023-11-27 8:23 ` cvs-commit at gcc dot gnu.org
@ 2023-11-27 8:25 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-27 8:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112300
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Should be hopefully fixed now. Please reopen if not.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-27 8:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-30 15:41 [Bug target/112300] New: Cross compiling to mipsisa64r2-sde-elf fails because "HEAP_TRAMPOLINES_INIT was not declared in this scope" since r14-4821-g28d8c680aaea46 jamborm at gcc dot gnu.org
2023-10-31 8:44 ` [Bug target/112300] [14 Regression] " rguenth at gcc dot gnu.org
2023-11-24 15:47 ` jakub at gcc dot gnu.org
2023-11-27 8:23 ` cvs-commit at gcc dot gnu.org
2023-11-27 8:25 ` jakub at gcc dot gnu.org
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).