public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu
@ 2022-03-12 10:43 doko at gcc dot gnu.org
2022-03-12 10:50 ` [Bug target/104890] " doko at gcc dot gnu.org
` (20 more replies)
0 siblings, 21 replies; 22+ messages in thread
From: doko at gcc dot gnu.org @ 2022-03-12 10:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
Bug ID: 104890
Summary: [12 Regression] fails to build the 32bit libgcc on
x86_64-linux-gnu
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: doko at gcc dot gnu.org
Target Milestone: ---
trunk 20220312 fails to build the 32bit libgcc on x86_64-linux-gnu:
/home/packages/gcc/12/gcc-12-12-20220312/build/./gcc/xgcc
-B/home/packages/gcc/12/gcc-12-12-20220312/build/./gcc/ -B/usr/x86_6
4-linux-gnu/bin/ -B/usr/x86_64-linux-gnu/lib/ -isystem
/usr/x86_64-linux-gnu/include -isystem /usr/x86_64-linux-gnu/sys-includ
e -isystem /home/packages/gcc/12/gcc-12-12-20220312/build/sys-include
-fchecking=1 -g -O2 -m32 -O2 -g -O2 -DIN_GCC -W -W
all -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./inc
lude -fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
-fpic -mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -I. -I.
-I../../.././gcc -I../../../../src/libgcc -I../../../.
./src/libgcc/. -I../../../../src/libgcc/../gcc
-I../../../../src/libgcc/../include -I../../../../src/libgcc/config/libbid -DEN
ABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o unwind-dw2.o -MT
unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c
../../../../src/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from
/home/packages/gcc/12/gcc-12-12-20220312/build/gcc/include/x86gprintrin.h:45,
from
../../../../src/libgcc/config/i386/shadow-stack-unwind.h:25,
from ./md-unwind-support.h:27,
from ../../../../src/libgcc/unwind-dw2.c:412:
/home/packages/gcc/12/gcc-12-12-20220312/build/gcc/include/cetintrin.h: In
function '_Unwind_RaiseException':
/home/packages/gcc/12/gcc-12-12-20220312/build/gcc/include/cetintrin.h:47:1:
error: inlining failed in call to 'always_inline' '_get_ssp': target specific
option mismatch
47 | _get_ssp (void)
| ^~~~~~~~
../../../../src/libgcc/config/i386/shadow-stack-unwind.h:32:26: note: called
from here
32 | _Unwind_Word ssp = _get_ssp (); \
| ^~~~~~~~~~~
../../../../src/libgcc/unwind-dw2.c:1654:7: note: in expansion of macro
'_Unwind_Frames_Extra'
1654 | _Unwind_Frames_Extra (FRAMES);
\
| ^~~~~~~~~~~~~~~~~~~~
../../../../src/libgcc/unwind.inc:140:3: note: in expansion of macro
'uw_install_context'
140 | uw_install_context (&this_context, &cur_context, frames);
| ^~~~~~~~~~~~~~~~~~
/home/packages/gcc/12/gcc-12-12-20220312/build/gcc/include/cetintrin.h:55:1:
error: inlining failed in call to 'always_inline' '_inc_ssp': target specific
option mismatch
55 | _inc_ssp (unsigned int __B)
| ^~~~~~~~
../../../../src/libgcc/config/i386/shadow-stack-unwind.h:38:15: note: called
from here
38 | _inc_ssp (255); \
| ^~~~~~~~~~~~~~
../../../../src/libgcc/unwind-dw2.c:1654:7: note: in expansion of macro
'_Unwind_Frames_Extra'
1654 | _Unwind_Frames_Extra (FRAMES);
\
| ^~~~~~~~~~~~~~~~~~~~
../../../../src/libgcc/unwind.inc:140:3: note: in expansion of macro
'uw_install_context'
140 | uw_install_context (&this_context, &cur_context, frames);
| ^~~~~~~~~~~~~~~~~~
/home/packages/gcc/12/gcc-12-12-20220312/build/gcc/include/cetintrin.h:55:1:
error: inlining failed in call to 'always_inline' '_inc_ssp': target specific
option mismatch
55 | _inc_ssp (unsigned int __B)
| ^~~~~~~~
../../../../src/libgcc/config/i386/shadow-stack-unwind.h:41:11: note: called
from here
41 | _inc_ssp (tmp); \
| ^~~~~~~~~~~~~~
../../../../src/libgcc/unwind-dw2.c:1654:7: note: in expansion of macro
'_Unwind_Frames_Extra'
1654 | _Unwind_Frames_Extra (FRAMES);
\
| ^~~~~~~~~~~~~~~~~~~~
../../../../src/libgcc/unwind.inc:140:3: note: in expansion of macro
'uw_install_context'
140 | uw_install_context (&this_context, &cur_context, frames);
| ^~~~~~~~~~~~~~~~~~
make[7]: *** [../../../../src/libgcc/shared-object.mk:14: unwind-dw2.o] Error 1
make[7]: Leaving directory
'/home/packages/gcc/12/gcc-12-12-20220312/build/x86_64-linux-gnu/32/libgcc'
GCC is configured with:
Configured with: -v
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2
--prefix=/usr
--with-gcc-major-version-only
--program-suffix=-12
--program-prefix=x86_64-linux-gnu-
--enable-shared
--enable-linker-build-id
--libexecdir=/usr/lib
--without-included-gettext
--enable-threads=posix
--libdir=/usr/lib
--enable-nls
--enable-clocale=gnu
--enable-libstdcxx-debug
--enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new
--enable-gnu-unique-object
--disable-vtable-verify
--enable-plugin
--enable-default-pie
--with-system-zlib
--enable-libphobos-checking=release
--with-target-system-zlib=auto
--enable-objc-gc=auto
--enable-multiarch
--disable-werror
--enable-cet
--with-arch-32=i686
--with-abi=m64
--with-multilib-list=m32,m64,mx32
--enable-multilib
--with-tune=generic
--enable-offload-targets=nvptx-none=/home/packages/gcc/12/gcc-12-12-20220312/debian/tmp-nvptx/usr,amdgcn-amdhsa=/home/packages/gcc/12/gcc-12-12-20220312/debian/tmp-gcn/usr
--enable-offload-defaulted
--without-cuda-driver
--enable-checking=release
--build=x86_64-linux-gnu
--host=x86_64-linux-gnu
--target=x86_64-linux-gnu
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
@ 2022-03-12 10:50 ` doko at gcc dot gnu.org
2022-03-12 15:37 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-default-pie) hjl.tools at gmail dot com
` (19 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: doko at gcc dot gnu.org @ 2022-03-12 10:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> ---
that is only seen when configuring with --enable-default-pie
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-default-pie)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
2022-03-12 10:50 ` [Bug target/104890] " doko at gcc dot gnu.org
@ 2022-03-12 15:37 ` hjl.tools at gmail dot com
2022-03-13 4:39 ` doko at gcc dot gnu.org
` (18 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-12 15:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-03-12
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
I can't reproduce it with
--disable-bootstrap --enable-cet --with-demangler-in-ld
--prefix=/usr/gcc-12.0.1-x86-64-pie --with-local-prefix=/usr/local
--enable-gnu-indirect-function --enable-clocale=gnu --with-system-zlib
--with-target-system-zlib --disable-libcc1 --disable-libcilkrts
--disable-libsanitizer --enable-default-pie --enable-languages=c,c++
Please provide the prepossessed unwind-dw2.c and show the command-line
passed to cc1 with "gcc -v".
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-default-pie)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
2022-03-12 10:50 ` [Bug target/104890] " doko at gcc dot gnu.org
2022-03-12 15:37 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-default-pie) hjl.tools at gmail dot com
@ 2022-03-13 4:39 ` doko at gcc dot gnu.org
2022-03-13 4:39 ` doko at gcc dot gnu.org
` (17 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: doko at gcc dot gnu.org @ 2022-03-13 4:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #3 from Matthias Klose <doko at gcc dot gnu.org> ---
Created attachment 52616
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52616&action=edit
preprocessed source
/home/packages/gcc/12/gcc-12-12-20220313/build/./gcc/cc1 -E -quiet -v -I . -I .
-I ../../.././gcc -I ../../../../src/libgcc -
I ../../../../src/libgcc/. -I ../../../../src/libgcc/../gcc -I
../../../../src/libgcc/../include -I ../../../../src/libgcc/con
fig/libbid -imultilib 32 -imultiarch i386-linux-gnu -iprefix
/home/packages/gcc/12/gcc-12-12-20220313/build/gcc/../lib/gcc/x86
_64-linux-gnu/12/ -isystem
/home/packages/gcc/12/gcc-12-12-20220313/build/./gcc/include -isystem
/home/packages/gcc/12/gcc-12-
12-20220313/build/./gcc/include-fixed -MD unwind-dw2.d -MF unwind-dw2.dep -MP
-MT unwind-dw2.o -D IN_GCC -D USE_ELF_SYMVER -D
IN_LIBGCC2 -D USE_ELF_SYMVER -D ENABLE_DECIMAL_BID_FORMAT -D HAVE_CC_TLS -D
USE_TLS -D HIDE_EXPORTS -isystem /usr/x86_64-linux
-gnu/include -isystem /usr/x86_64-linux-gnu/sys-include -isystem
/home/packages/gcc/12/gcc-12-12-20220313/build/sys-include -i
system ./include ../../../../src/libgcc/unwind-dw2.c -m32 -mlong-double-80
-mshstk -mtune=generic -march=i686 -Wextra -Wall -W
no-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -fchecking=1 -fcf-pro
tection=full -fbuilding-libgcc -fno-stack-protector -fpic -fcf-protection=full
-fexceptions -fvisibility=hidden -g -g -g -fwor
king-directory -O2 -O2 -O2 -fpch-preprocess -fasynchronous-unwind-tables -o
unwind-dw2.i
In file included from
/home/packages/gcc/12/gcc-12-12-20220313/build/gcc/include/x86gprintrin.h:45,
from
../../../../src/libgcc/config/i386/shadow-stack-unwind.h:25,
from ./md-unwind-support.h:27,
from ../../../../src/libgcc/unwind-dw2.c:412:
/home/packages/gcc/12/gcc-12-12-20220313/build/gcc/include/cetintrin.h: In
function ‘_Unwind_RaiseException’:
/home/packages/gcc/12/gcc-12-12-20220313/build/gcc/include/cetintrin.h:47:1:
error: inlining failed in call to ‘always_inline’ ‘_get_ssp’: target specific
option mismatch
47 | _get_ssp (void)
| ^~~~~~~~
In file included from ../../../../src/libgcc/unwind-dw2.c:1728:
../../../../src/libgcc/unwind.inc:140:217: note: called from here
140 | uw_install_context (&this_context, &cur_context, frames);
|
^
/home/packages/gcc/12/gcc-12-12-20220313/build/gcc/include/cetintrin.h:55:1:
error: inlining failed in call to ‘always_inline’ ‘_inc_ssp’: target specific
option mismatch
55 | _inc_ssp (unsigned int __B)
| ^~~~~~~~
../../../../src/libgcc/unwind.inc:140:295: note: called from here
140 | uw_install_context (&this_context, &cur_context, frames);
|
^
/home/packages/gcc/12/gcc-12-12-20220313/build/gcc/include/cetintrin.h:55:1:
error: inlining failed in call to ‘always_inline’ ‘_inc_ssp’: target specific
option mismatch
55 | _inc_ssp (unsigned int __B)
| ^~~~~~~~
../../../../src/libgcc/unwind.inc:140:325: note: called from here
140 | uw_install_context (&this_context, &cur_context, frames);
|
^
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-default-pie)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (2 preceding siblings ...)
2022-03-13 4:39 ` doko at gcc dot gnu.org
@ 2022-03-13 4:39 ` doko at gcc dot gnu.org
2022-03-13 5:07 ` doko at gcc dot gnu.org
` (16 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: doko at gcc dot gnu.org @ 2022-03-13 4:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
Matthias Klose <doko at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-default-pie)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (3 preceding siblings ...)
2022-03-13 4:39 ` doko at gcc dot gnu.org
@ 2022-03-13 5:07 ` doko at gcc dot gnu.org
2022-03-13 15:53 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet) hjl.tools at gmail dot com
` (15 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: doko at gcc dot gnu.org @ 2022-03-13 5:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #4 from Matthias Klose <doko at gcc dot gnu.org> ---
about the configure options, apparently pie is not the culprit, configuring
with --enable-cet is. note that I didn't use --disable-bootstrap.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (4 preceding siblings ...)
2022-03-13 5:07 ` doko at gcc dot gnu.org
@ 2022-03-13 15:53 ` hjl.tools at gmail dot com
2022-03-13 16:17 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686) hjl.tools at gmail dot com
` (14 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-13 15:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at redhat dot com
Blocks| |104781
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-tgl-2 gcc]$ cat x.c
#include <x86gprintrin.h>
__attribute__((target ("general-regs-only")))
int
foo ()
{
return _get_ssp ();
}
[hjl@gnu-tgl-2 gcc]$ ./xgcc -B./ -S -O2 x.c -mshstk -march=i686 -m32
In file included from ./include/x86gprintrin.h:45,
from x.c:1:
./include/cetintrin.h: In function ‘foo’:
./include/cetintrin.h:47:1: error: inlining failed in call to ‘always_inline’
‘_get_ssp’: target specific option mismatch
47 | _get_ssp (void)
| ^~~~~~~~
x.c:7:10: note: called from here
7 | return _get_ssp ();
| ^~~~~~~~~~~
[hjl@gnu-tgl-2 gcc]$
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104781
[Bug 104781] [12 regression] SEGV in _Unwind_GetGR during i386 Ada bootstrap
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (5 preceding siblings ...)
2022-03-13 15:53 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet) hjl.tools at gmail dot com
@ 2022-03-13 16:17 ` hjl.tools at gmail dot com
2022-03-13 16:17 ` hjl.tools at gmail dot com
` (13 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-13 16:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 52619
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52619&action=edit
A patch
Please try this.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (6 preceding siblings ...)
2022-03-13 16:17 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686) hjl.tools at gmail dot com
@ 2022-03-13 16:17 ` hjl.tools at gmail dot com
2022-03-13 16:20 ` jakub at gcc dot gnu.org
` (12 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-13 16:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (7 preceding siblings ...)
2022-03-13 16:17 ` hjl.tools at gmail dot com
@ 2022-03-13 16:20 ` jakub at gcc dot gnu.org
2022-03-13 16:26 ` hjl.tools at gmail dot com
` (11 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-13 16:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Comment on attachment 52619
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52619
A patch
This looks wrong, it will fail with the same configuration if people build with
-msse2.
The question is why __attribute__((target ("general-regs-only"))) disables
SHSTK.
If that is intentional, we should change to what my first patch proposed, i.e.
"no-sse" instead of "general-regs-only" (or "no-mmx,no-sse").
If it is unintentional, we should fix that.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (8 preceding siblings ...)
2022-03-13 16:20 ` jakub at gcc dot gnu.org
@ 2022-03-13 16:26 ` hjl.tools at gmail dot com
2022-03-13 18:09 ` hjl.tools at gmail dot com
` (10 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-13 16:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jakub Jelinek from comment #7)
> Comment on attachment 52619 [details]
> A patch
>
> This looks wrong, it will fail with the same configuration if people build
> with -msse2.
I have no issues to build 32-bit GCC with SSE2. I got
[hjl@gnu-tgl-2 gcc]$ ./xgcc -B./ -S -O2 -mshstk -march=i686 -m32 /tmp/x.c
In file included from ./include/x86gprintrin.h:45,
from /tmp/x.c:1:
./include/cetintrin.h: In function ‘foo’:
./include/cetintrin.h:47:1: error: inlining failed in call to ‘always_inline’
‘_get_ssp’: target specific option mismatch
47 | _get_ssp (void)
| ^~~~~~~~
/tmp/x.c:7:10: note: called from here
7 | return _get_ssp ();
| ^~~~~~~~~~~
[hjl@gnu-tgl-2 gcc]$ ./xgcc -B./ -S -O2 -mshstk -march=i686 -m32 /tmp/x.c
-msse2
[hjl@gnu-tgl-2 gcc]$
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (9 preceding siblings ...)
2022-03-13 16:26 ` hjl.tools at gmail dot com
@ 2022-03-13 18:09 ` hjl.tools at gmail dot com
2022-03-14 2:08 ` doko at gcc dot gnu.org
` (9 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-13 18:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #52619|0 |1
is obsolete| |
--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 52620
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52620&action=edit
The v2 patch
Please try the v2 patch.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (10 preceding siblings ...)
2022-03-13 18:09 ` hjl.tools at gmail dot com
@ 2022-03-14 2:08 ` doko at gcc dot gnu.org
2022-03-14 8:35 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: doko at gcc dot gnu.org @ 2022-03-14 2:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
Matthias Klose <doko at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #10 from Matthias Klose <doko at gcc dot gnu.org> ---
The v2 patch fixes the issue for me.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (11 preceding siblings ...)
2022-03-14 2:08 ` doko at gcc dot gnu.org
@ 2022-03-14 8:35 ` rguenth at gcc dot gnu.org
2022-03-14 20:45 ` hjl.tools at gmail dot com
` (7 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-14 8:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (12 preceding siblings ...)
2022-03-14 8:35 ` rguenth at gcc dot gnu.org
@ 2022-03-14 20:45 ` hjl.tools at gmail dot com
2022-03-15 9:24 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-14 20:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #52620|0 |1
is obsolete| |
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 52625
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52625&action=edit
The v3 patch
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (13 preceding siblings ...)
2022-03-14 20:45 ` hjl.tools at gmail dot com
@ 2022-03-15 9:24 ` cvs-commit at gcc dot gnu.org
2022-03-16 13:31 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-15 9:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #12 from CVS 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:da24fce323eaf088239e0f900dd23f6b05d552c1
commit r12-7654-gda24fce323eaf088239e0f900dd23f6b05d552c1
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Mar 15 10:24:22 2022 +0100
i386: Use no-mmx,no-sse for LIBGCC2_UNWIND_ATTRIBUTE [PR104890]
Regardless of the outcome of the general-regs-only stuff in x86gprintrin.h,
apparently general-regs-only is much bigger hammer than no-sse, and e.g.
using 387 instructions in the unwinder isn't a big deal, it never needs
to realign the stack because of it.
So, the following patch uses no-sse (and adds no-mmx to it, even when not
strictly needed).
2022-03-15 Jakub Jelinek <jakub@redhat.com>
PR target/104890
* config/i386/i386.h (LIBGCC2_UNWIND_ATTRIBUTE): Use no-mmx,no-sse
instead of general-regs-only.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (14 preceding siblings ...)
2022-03-15 9:24 ` cvs-commit at gcc dot gnu.org
@ 2022-03-16 13:31 ` cvs-commit at gcc dot gnu.org
2022-03-16 13:32 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-16 13:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:3117ffce4c1598a35e724138735b099262353358
commit r12-7673-g3117ffce4c1598a35e724138735b099262353358
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Mar 13 08:57:51 2022 -0700
x86: Also check _SOFT_FLOAT in <x86gprintrin.h>
Push target("general-regs-only") in <x86gprintrin.h> if x87 is enabled.
gcc/
PR target/104890
* config/i386/x86gprintrin.h: Also check _SOFT_FLOAT before
pushing target("general-regs-only").
gcc/testsuite/
PR target/104890
* gcc.target/i386/pr104890.c: New test.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686)
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (15 preceding siblings ...)
2022-03-16 13:31 ` cvs-commit at gcc dot gnu.org
@ 2022-03-16 13:32 ` hjl.tools at gmail dot com
2022-03-21 4:27 ` [Bug target/104890] [11 Regression] <x86gprintrin.h> doesn't work with __attribute__((target ("general-regs-only"))) and -march=i686 hjl.tools at gmail dot com
` (3 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-16 13:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 12 so far.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [11 Regression] <x86gprintrin.h> doesn't work with __attribute__((target ("general-regs-only"))) and -march=i686
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (16 preceding siblings ...)
2022-03-16 13:32 ` hjl.tools at gmail dot com
@ 2022-03-21 4:27 ` hjl.tools at gmail dot com
2022-03-21 4:31 ` hjl.tools at gmail dot com
` (2 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-21 4:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crazylht at gmail dot com
--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-skx-1 gcc]$ cat /tmp/x.c
#include <x86gprintrin.h>
__attribute__((target("no-mmx,no-sse")))
void
_Unwind_Resume_or_Rethrow(void)
{
_inc_ssp(1);
}
[hjl@gnu-skx-1 gcc]$ ./xgcc -B./ -O2 -m32 /tmp/x.c -S -march=tigerlake
In file included from ./include/x86gprintrin.h:45,
from /tmp/x.c:1:
./include/cetintrin.h: In function ?_Unwind_Resume_or_Rethrow?:
./include/cetintrin.h:55:1: error: inlining failed in call to ?always_inline?
?_inc_ssp?: target specific option mismatch
55 | _inc_ssp (unsigned int __B)
| ^~~~~~~~
/tmp/x.c:7:3: note: called from here
7 | _inc_ssp(1);
| ^~~~~~~~~~~
[hjl@gnu-skx-1 gcc]$
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [11 Regression] <x86gprintrin.h> doesn't work with __attribute__((target ("general-regs-only"))) and -march=i686
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (17 preceding siblings ...)
2022-03-21 4:27 ` [Bug target/104890] [11 Regression] <x86gprintrin.h> doesn't work with __attribute__((target ("general-regs-only"))) and -march=i686 hjl.tools at gmail dot com
@ 2022-03-21 4:31 ` hjl.tools at gmail dot com
2022-03-22 16:31 ` cvs-commit at gcc dot gnu.org
2022-03-22 16:34 ` hjl.tools at gmail dot com
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-21 4:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-skx-1 gcc]$ ./xgcc -B./ -O2 -m32 /tmp/x.c -S -march=sapphirerapids
-mshstk
In file included from ./include/x86gprintrin.h:45,
from /tmp/x.c:1:
./include/cetintrin.h: In function ?_Unwind_Resume_or_Rethrow?:
./include/cetintrin.h:55:1: error: inlining failed in call to ?always_inline?
?_inc_ssp?: target specific option mismatch
55 | _inc_ssp (unsigned int __B)
| ^~~~~~~~
/tmp/x.c:7:3: note: called from here
7 | _inc_ssp(1);
| ^~~~~~~~~~~
[hjl@gnu-skx-1 gcc]$ ./xgcc -B./ -O2 -m32 /tmp/x.c -S -march=tigerlake
-mshstkIn file included from ./include/x86gprintrin.h:45,
from /tmp/x.c:1:
./include/cetintrin.h: In function ?_Unwind_Resume_or_Rethrow?:
./include/cetintrin.h:55:1: error: inlining failed in call to ?always_inline?
?_inc_ssp?: target specific option mismatch
55 | _inc_ssp (unsigned int __B)
| ^~~~~~~~
/tmp/x.c:7:3: note: called from here
7 | _inc_ssp(1);
| ^~~~~~~~~~~
[hjl@gnu-skx-1 gcc]$ ./xgcc -B./ -O2 -m32 /tmp/x.c -S -march=alderlake
-mshstkIn file included from ./include/x86gprintrin.h:45,
from /tmp/x.c:1:
./include/cetintrin.h: In function ?_Unwind_Resume_or_Rethrow?:
./include/cetintrin.h:55:1: error: inlining failed in call to ?always_inline?
?_inc_ssp?: target specific option mismatch
55 | _inc_ssp (unsigned int __B)
| ^~~~~~~~
/tmp/x.c:7:3: note: called from here
7 | _inc_ssp(1);
| ^~~~~~~~~~~
[hjl@gnu-skx-1 gcc]$ ./xgcc -B./ -O2 -m32 /tmp/x.c -S -march=cascadelake
-mshstk
[hjl@gnu-skx-1 gcc]$
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [11 Regression] <x86gprintrin.h> doesn't work with __attribute__((target ("general-regs-only"))) and -march=i686
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (18 preceding siblings ...)
2022-03-21 4:31 ` hjl.tools at gmail dot com
@ 2022-03-22 16:31 ` cvs-commit at gcc dot gnu.org
2022-03-22 16:34 ` hjl.tools at gmail dot com
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-22 16:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:f407033b7ca27a75cccef8310360e275cdb94d26
commit r11-9685-gf407033b7ca27a75cccef8310360e275cdb94d26
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun Mar 13 08:57:51 2022 -0700
x86: Also check _SOFT_FLOAT in <x86gprintrin.h>
Push target("general-regs-only") in <x86gprintrin.h> if x87 is enabled.
gcc/
PR target/104890
* config/i386/x86gprintrin.h: Also check _SOFT_FLOAT before
pushing target("general-regs-only").
gcc/testsuite/
PR target/104890
* gcc.target/i386/pr104890.c: New test.
(cherry picked from commit 3117ffce4c1598a35e724138735b099262353358)
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug target/104890] [11 Regression] <x86gprintrin.h> doesn't work with __attribute__((target ("general-regs-only"))) and -march=i686
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
` (19 preceding siblings ...)
2022-03-22 16:31 ` cvs-commit at gcc dot gnu.org
@ 2022-03-22 16:34 ` hjl.tools at gmail dot com
20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2022-03-22 16:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104890
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|12.0 |11.3
Status|NEW |RESOLVED
--- Comment #18 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 12 and GCC 11.3.
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2022-03-22 16:34 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 10:43 [Bug target/104890] New: [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu doko at gcc dot gnu.org
2022-03-12 10:50 ` [Bug target/104890] " doko at gcc dot gnu.org
2022-03-12 15:37 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-default-pie) hjl.tools at gmail dot com
2022-03-13 4:39 ` doko at gcc dot gnu.org
2022-03-13 4:39 ` doko at gcc dot gnu.org
2022-03-13 5:07 ` doko at gcc dot gnu.org
2022-03-13 15:53 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet) hjl.tools at gmail dot com
2022-03-13 16:17 ` [Bug target/104890] [12 Regression] fails to build the 32bit libgcc on x86_64-linux-gnu (--enable-cet --with-arch-32=i686) hjl.tools at gmail dot com
2022-03-13 16:17 ` hjl.tools at gmail dot com
2022-03-13 16:20 ` jakub at gcc dot gnu.org
2022-03-13 16:26 ` hjl.tools at gmail dot com
2022-03-13 18:09 ` hjl.tools at gmail dot com
2022-03-14 2:08 ` doko at gcc dot gnu.org
2022-03-14 8:35 ` rguenth at gcc dot gnu.org
2022-03-14 20:45 ` hjl.tools at gmail dot com
2022-03-15 9:24 ` cvs-commit at gcc dot gnu.org
2022-03-16 13:31 ` cvs-commit at gcc dot gnu.org
2022-03-16 13:32 ` hjl.tools at gmail dot com
2022-03-21 4:27 ` [Bug target/104890] [11 Regression] <x86gprintrin.h> doesn't work with __attribute__((target ("general-regs-only"))) and -march=i686 hjl.tools at gmail dot com
2022-03-21 4:31 ` hjl.tools at gmail dot com
2022-03-22 16:31 ` cvs-commit at gcc dot gnu.org
2022-03-22 16:34 ` hjl.tools at gmail dot com
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).