On Fri, 24 Jun 2022 at 09:32, Florian Weimer wrote:
>>> With these new macros, the examples from above could be
re-written as:
>>>
>>> compiler-rt: %global _pkg_extra_cflags -D_DEFAULT_SOURCE
>>> julia: %global _flag_glibcxx_assertions %{nil}
>> Do you have some background why -D_DEFAULT_SOURCE is needed? Why
>> doesn't upstream detect this?
>>
>
> It was added to workaround this bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=25271
This has long since been fixed, so the workaround is no longer needed.
-D_GLIBCXX_ASSERTIONS has zero false positives. Removing it does not
make the code that triggers the asserts well-defined. Only the explicit
assertion failure is gone. So it is probably another example of a flag
where removal does not result in the hoped-for change in toolchain
behavior.
Yes, I don't think an example of how to hide undefined behaviour is a
good example for the change proposal.