public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/31928] New: glibc doesn't compile if the compiler already define _FORTIFY_SOURCE
@ 2024-06-25 15:06 simon.chopin at canonical dot com
2024-06-26 7:14 ` [Bug build/31928] " fweimer at redhat dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: simon.chopin at canonical dot com @ 2024-06-25 15:06 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31928
Bug ID: 31928
Summary: glibc doesn't compile if the compiler already define
_FORTIFY_SOURCE
Product: glibc
Version: 2.39
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: simon.chopin at canonical dot com
CC: carlos at redhat dot com
Target Milestone: ---
In Ubuntu, GCC has been modified to define _FORTIFY_SOURCE in the preprocessor
driver, resulting in failures to build glibc, with the following error (with
--disable-werror):
syslog.c: In function ‘__vsyslog_internal’:
syslog.c:95:30: error: inlining failed in call to ‘always_inline’ ‘syslog’:
function not inlinable
95 | ldbl_strong_alias (__syslog, syslog)
We're shipping a patch to adress this in 2.39, I still need to rebase it and
clean it up:
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/tree/debian/patches/ubuntu/fix-fortify-source.patch
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug build/31928] glibc doesn't compile if the compiler already define _FORTIFY_SOURCE
2024-06-25 15:06 [Bug build/31928] New: glibc doesn't compile if the compiler already define _FORTIFY_SOURCE simon.chopin at canonical dot com
@ 2024-06-26 7:14 ` fweimer at redhat dot com
2024-06-26 7:48 ` sam at gentoo dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2024-06-26 7:14 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31928
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
You could add a flag _DISTRO_EVADE_FORTIFY_SOURCE, similar to bug 31624. Then
no glibc patching will be required.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug build/31928] glibc doesn't compile if the compiler already define _FORTIFY_SOURCE
2024-06-25 15:06 [Bug build/31928] New: glibc doesn't compile if the compiler already define _FORTIFY_SOURCE simon.chopin at canonical dot com
2024-06-26 7:14 ` [Bug build/31928] " fweimer at redhat dot com
@ 2024-06-26 7:48 ` sam at gentoo dot org
2024-06-26 8:30 ` simon.chopin at canonical dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: sam at gentoo dot org @ 2024-06-26 7:48 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31928
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gentoo dot org
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=31624
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug build/31928] glibc doesn't compile if the compiler already define _FORTIFY_SOURCE
2024-06-25 15:06 [Bug build/31928] New: glibc doesn't compile if the compiler already define _FORTIFY_SOURCE simon.chopin at canonical dot com
2024-06-26 7:14 ` [Bug build/31928] " fweimer at redhat dot com
2024-06-26 7:48 ` sam at gentoo dot org
@ 2024-06-26 8:30 ` simon.chopin at canonical dot com
2024-06-26 8:36 ` fweimer at redhat dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: simon.chopin at canonical dot com @ 2024-06-26 8:30 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31928
--- Comment #2 from Simon Chopin <simon.chopin at canonical dot com> ---
Or we could *not* use -Wp,-U_FORTIFY_SOURCE ? I couldn't find any rationale for
it in the first place.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug build/31928] glibc doesn't compile if the compiler already define _FORTIFY_SOURCE
2024-06-25 15:06 [Bug build/31928] New: glibc doesn't compile if the compiler already define _FORTIFY_SOURCE simon.chopin at canonical dot com
` (2 preceding siblings ...)
2024-06-26 8:30 ` simon.chopin at canonical dot com
@ 2024-06-26 8:36 ` fweimer at redhat dot com
2024-06-26 11:48 ` adhemerval.zanella at linaro dot org
2024-06-26 19:17 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2024-06-26 8:36 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31928
--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Simon Chopin from comment #2)
> Or we could *not* use -Wp,-U_FORTIFY_SOURCE ? I couldn't find any rationale
> for it in the first place.
It's needed to avoid duplicate function bodies. See:
[PATCH 00/11] Build getdomainname, gethostname, syslog with fortification
<https://inbox.sourceware.org/libc-alpha/cover.1707491940.git.fweimer@redhat.com/>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug build/31928] glibc doesn't compile if the compiler already define _FORTIFY_SOURCE
2024-06-25 15:06 [Bug build/31928] New: glibc doesn't compile if the compiler already define _FORTIFY_SOURCE simon.chopin at canonical dot com
` (3 preceding siblings ...)
2024-06-26 8:36 ` fweimer at redhat dot com
@ 2024-06-26 11:48 ` adhemerval.zanella at linaro dot org
2024-06-26 19:17 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-06-26 11:48 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31928
Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adhemerval.zanella at linaro dot o
| |rg
--- Comment #4 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Florian Weimer from comment #3)
> (In reply to Simon Chopin from comment #2)
> > Or we could *not* use -Wp,-U_FORTIFY_SOURCE ? I couldn't find any rationale
> > for it in the first place.
>
> It's needed to avoid duplicate function bodies. See:
>
> [PATCH 00/11] Build getdomainname, gethostname, syslog with fortification
> <https://inbox.sourceware.org/libc-alpha/cover.1707491940.git.fweimer@redhat.
> com/>
Why do we need to use -Wp instead of just -U? It seems that -Wp does not play
nice if compiler defaults to define _FORTIFY_SOURCE.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug build/31928] glibc doesn't compile if the compiler already define _FORTIFY_SOURCE
2024-06-25 15:06 [Bug build/31928] New: glibc doesn't compile if the compiler already define _FORTIFY_SOURCE simon.chopin at canonical dot com
` (4 preceding siblings ...)
2024-06-26 11:48 ` adhemerval.zanella at linaro dot org
@ 2024-06-26 19:17 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2024-06-26 19:17 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=31928
--- Comment #5 from Florian Weimer <fweimer at redhat dot com> ---
If -U works, we can switch to that. The use of -Wp goes back to CFLAGS settings
which needed to be compatible with GCJ, where -D had a different meaning.
Hence, -Wp,-D_FORTIFY_SOURCE=2 came into being, and it has been carried forward
ever since.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-06-26 19:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-25 15:06 [Bug build/31928] New: glibc doesn't compile if the compiler already define _FORTIFY_SOURCE simon.chopin at canonical dot com
2024-06-26 7:14 ` [Bug build/31928] " fweimer at redhat dot com
2024-06-26 7:48 ` sam at gentoo dot org
2024-06-26 8:30 ` simon.chopin at canonical dot com
2024-06-26 8:36 ` fweimer at redhat dot com
2024-06-26 11:48 ` adhemerval.zanella at linaro dot org
2024-06-26 19:17 ` fweimer at redhat 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).