[arch-general] [arch-dev-public] Changing compilation flags

Eli Schwartz eschwartz93 at gmail.com
Sun Jul 9 03:44:13 UTC 2017


On 07/08/2017 06:53 AM, LoneVVolf wrote:
> On 08-07-17 04:31, Evangelos Foutras via arch-general wrote:
>> There are multiple ways the compiler can be selected; two of them are: 1)
>> exporting CC/CXX in the PKGBUILD and 2) the project's configure script
>> picking one of the available compilers. makepkg can't realistically know
>> which compiler is going to be used and thus must have only one set of flags
>> that is supported by both GCC and Clang.
>>
> 
> An alternative solution would be to tailor things to the compiler used 
> by the majority (gcc) and to avoid clang as much as possible.
> That would ocourse require special settings for packages compiled with 
> clang.
> 
> NOTE : whether that is a good idea is another matter, but it IS an option.

AIUI that is already what we do, in the sense that gcc is the assumed
default everywhere, and our (C|CXX|LD)FLAGS are written with the
assumption that gcc is the default compiler.

Any packages that need to deviate from the default makepkg.conf flags
(because they *already* have special settings to use clang, those
settings are in the project build configuration files) can currently
modify those flags on a PKGBUILD-by-PKGBUILD basis, or alternatively we
can try to get clang to deal with basic gcc compatibility in a graceful
manner.

-- 
Eli Schwartz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20170708/4e09fad6/attachment.asc>


More information about the arch-general mailing list