Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#70240 - pacman should provide preprocessor options in CPPFLAGS

Attached to Project: Arch Linux
Opened by Vladimir (_v_l) - Wednesday, 31 March 2021, 01:22 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 31 March 2021, 02:54 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: pacman-5.2.2-3 comes with update /etc/makepkg.conf where *FLAGS options are changed so now only CFLAGS is set. Now it has '-Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS' but gcc(1) recommends to avoid usage of this option (quote: "The preprocessor's direct interface is undocumented and subject to change, so whenever possible you should avoid using -Wp and let the driver handle the options instead"). Shouldn't these two options be set in CPPFLAGS?
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Wednesday, 31 March 2021, 02:54 GMT
Reason for closing:  Won't implement
Additional comments about closing:  The use of -Wp, in CFLAGS is an intentional change which is

a) stable
b) required to sanely handle the fiddly bits of toolchains
Comment by Eli Schwartz (eschwartz) - Wednesday, 31 March 2021, 02:52 GMT
I raised this precise point for clarification here: https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/3?diff_id=2852#note_14628

Allan responded:

> I'll also add, -Wp,-D... is used by Fedora/RedHat and other major contributors to the toolchain. It is so widely used that I have seen configure and test scripts disable fortify_source by explicitly looking for -Wp,-D... (it is very common in the toolchain).
> As this is the standard, we should go with it despite it no being correct. I added CPPFLAGS to makepkg in a push for correctness and it is just more trouble that it is worth.

The reason provided is IMO very compelling... this is not being done without a thorough understanding of the reasoning.

Loading...