public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/29979] New: Some -Wmaybe-uninitialized are needed on x86_32 without -Os
@ 2023-01-09 20:19 m.novosyolov at rosalinux dot ru
2023-01-09 20:22 ` [Bug build/29979] " m.novosyolov at rosalinux dot ru
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: m.novosyolov at rosalinux dot ru @ 2023-01-09 20:19 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29979
Bug ID: 29979
Summary: Some -Wmaybe-uninitialized are needed on x86_32
without -Os
Product: glibc
Version: 2.36
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: m.novosyolov at rosalinux dot ru
CC: carlos at redhat dot com
Target Milestone: ---
I had to make the following patch to build glibc 2.36 (release/2.36/master,
4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c) on x86_32 (i686). Other arches
(x86_64, aarch64, riscv64) did not require this change).
--- a/locale/weight.h
+++ b/locale/weight.h
@@ -144,7 +144,7 @@
is impossible for the same reason as described
above. */
DIAG_PUSH_NEEDS_COMMENT;
- DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
+ DIAG_IGNORE_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
offset += usrc[cnt] - cp[cnt];
DIAG_POP_NEEDS_COMMENT;
}
--- a/locale/weightwc.h
+++ b/locale/weightwc.h
@@ -102,7 +102,7 @@
might be used uninitialized. This is impossible for the
same reason as described above. */
DIAG_PUSH_NEEDS_COMMENT;
- DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
+ DIAG_IGNORE_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
for (cnt = 0; cnt < nhere - 1 && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
--- a/string/strcoll_l.c
+++ b/string/strcoll_l.c
@@ -180,7 +180,7 @@
ensures that seq->save_idx was saved to first and contains a
valid value. */
DIAG_PUSH_NEEDS_COMMENT;
- DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
+ DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
len = weights[idx++];
DIAG_POP_NEEDS_COMMENT;
/* Skip over indices of previous levels. */
Comments near patched code write about -Os, but I was building without -Os
Full command line and error (errors were similar for other patched cases):
DEBUG: gcc -fuse-ld=bfd -fomit-frame-pointer strcoll_l.c -c -std=gnu11
-fgnu89-inline -funwind-tables -fasynchronous-unwind-tables -O3
-Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2
-fstack-protector-strong --param=ssp-buffer-size=4 -march=i686 -mtune=generic
-msse -mfpmath=sse -fasynchronous-unwind-tables -mstackrealign -march=i686
-msse -mfpmath=sse -mtune=generic -Wp,-D_GLIBCXX_ASSERTIONS -DNDEBUG=1
-fstack-clash-protection -O3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-strong
--param=ssp-buffer-size=4 -march=i686 -mtune=generic -msse -mfpmath=sse
-fasynchronous-unwind-tables -mstackrealign -O3 -Wno-error=stringop-overflow
-fno-strict-aliasing -Wformat -fno-lto -mno-tls-direct-seg-refs -Wno-error
-Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math
-fstack-protector-strong -fno-common -Wstrict-prototypes -Wold-style-definition
-fmath-errno -fomit-frame-pointer -fomit-frame-pointer -fpie
-ftls-model=initial-exec -U_FORTIFY_SOURCE -I../include
-I/builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/string
-I/builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux
-I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/i386/i686/nptl
-I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/x86/include
-I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/x86/nptl -I../sysdeps/i386/nptl
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux
-I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/i386
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu/multiarch
-I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686/multiarch
-I../sysdeps/i386/i686 -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu
-I../sysdeps/i386 -I../sysdeps/x86/include -I../sysdeps/x86
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/float128
-I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem
/usr/lib/gcc/i686-rosa-linux-gnu/11.2.0/include -isystem /usr/include
-D_LIBC_REENTRANT -include
/builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/libc-modules.h
-DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC
-DTOP_NAMESPACE=glibc -o
/builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/string/strcoll_l.o
-MD -MP -MF
/builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/string/strcoll_l.o.dt
-MT
/builddir/build/BUILD/glibc-4f4d7a13edfd2fdc57c9d76e1fd6d017fb47550c/build-i686-linux/string/strcoll_l.o
DEBUG: In file included from strcoll_l.c:42:
DEBUG: strcoll_l.c: In function '__strcoll_l':
DEBUG: ../locale/weight.h:148:33: error: 'seq2.back_us' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
DEBUG: 148 | offset += usrc[cnt] - cp[cnt];
DEBUG: | ~~~~^~~~~
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug build/29979] Some -Wmaybe-uninitialized are needed on x86_32 without -Os
2023-01-09 20:19 [Bug build/29979] New: Some -Wmaybe-uninitialized are needed on x86_32 without -Os m.novosyolov at rosalinux dot ru
@ 2023-01-09 20:22 ` m.novosyolov at rosalinux dot ru
2023-01-12 13:31 ` adhemerval.zanella at linaro dot org
2023-01-12 18:38 ` m.novosyolov at rosalinux dot ru
2 siblings, 0 replies; 4+ messages in thread
From: m.novosyolov at rosalinux dot ru @ 2023-01-09 20:22 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29979
Mikhail Novosyolov <m.novosyolov at rosalinux dot ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=19444
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug build/29979] Some -Wmaybe-uninitialized are needed on x86_32 without -Os
2023-01-09 20:19 [Bug build/29979] New: Some -Wmaybe-uninitialized are needed on x86_32 without -Os m.novosyolov at rosalinux dot ru
2023-01-09 20:22 ` [Bug build/29979] " m.novosyolov at rosalinux dot ru
@ 2023-01-12 13:31 ` adhemerval.zanella at linaro dot org
2023-01-12 18:38 ` m.novosyolov at rosalinux dot ru
2 siblings, 0 replies; 4+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-01-12 13:31 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29979
Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adhemerval.zanella at linaro dot o
| |rg
--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Right, which gcc version did you use it? I am checking with GCC 11 and I have
not see any issue so far.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug build/29979] Some -Wmaybe-uninitialized are needed on x86_32 without -Os
2023-01-09 20:19 [Bug build/29979] New: Some -Wmaybe-uninitialized are needed on x86_32 without -Os m.novosyolov at rosalinux dot ru
2023-01-09 20:22 ` [Bug build/29979] " m.novosyolov at rosalinux dot ru
2023-01-12 13:31 ` adhemerval.zanella at linaro dot org
@ 2023-01-12 18:38 ` m.novosyolov at rosalinux dot ru
2 siblings, 0 replies; 4+ messages in thread
From: m.novosyolov at rosalinux dot ru @ 2023-01-12 18:38 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=29979
--- Comment #2 from Mikhail Novosyolov <m.novosyolov at rosalinux dot ru> ---
(In reply to Adhemerval Zanella from comment #1)
> Right, which gcc version did you use it? I am checking with GCC 11 and I
> have not see any issue so far.
It is gcc 11:
$ gcc --version
gcc (GCC) 11.2.0 20210728 (ROSA)
I have provided full gcc cmdline with flags above, do not have any ideas else
where the difference can be...
If it will help, here is a chroot in which this problem can be reproduced:
https://mirror.rosalinux.ru/rosa/rosa2021.1/iso/ROSA.FRESH.12/rootfs/rootfs-std-rosa2021.1_x86_64_2022-11-02.tar.xz
Or an installable livecd:
https://mirror.rosalinux.ru/rosa/rosa2021.1/iso/ROSA.FRESH.12/server/
To reproduce the problem, run:
sudo mkdir chroot
cd chroot
sudo tar -xf /path/to/rootfs-std-rosa2021.1_x86_64_2022-11-02.tar.xz
sudo systemd-nspawn -D . (or sudo chroot .)
# if running in VM, not chroot/container, start from here
dnf install basesystem-build /usr/bin/mbd git-core abf
git clone https://abf.io/import/glibc.git -b rosa2023.1
cd glibc
mbd glibc.spec
dnf install *.rpm (install build dependencies of glibc)
Comment out the patch described above:
-Patch10: glibc-fix-ix86-build.patch
+#Patch10: glibc-fix-ix86-build.patch
Run the build:
abf rpmbuild (just press enter when it asks questions about config)
gcc sources are here:
https://abf.io/import/gcc/tree/rosa2021.1
glibc with that problem:
https://abf.io/import/glibc/tree/rosa2023.1
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-12 18:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 20:19 [Bug build/29979] New: Some -Wmaybe-uninitialized are needed on x86_32 without -Os m.novosyolov at rosalinux dot ru
2023-01-09 20:22 ` [Bug build/29979] " m.novosyolov at rosalinux dot ru
2023-01-12 13:31 ` adhemerval.zanella at linaro dot org
2023-01-12 18:38 ` m.novosyolov at rosalinux dot ru
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).