Re: [arch-dev-public] Changing compilation flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 7 July 2017 at 19:17, Jordan Glover <Golden_Miller83@xxxxxxxxxxxxx>
wrote:

> I'm surprised as it seemed to me that Daniel took it for granted that
> patch like that will get accepted. Anyway it's hard for an outsider to
> successfully submit anything to big upstream project. I hope you'll be more
> lucky if/when you decide to upstream your pie/ssp patches.
>

The SSP/PIE patch is a bit of a hack and is specific to Arch and the
architectures we support. As mentioned in the commit message, it's a
temporary fix until upstream makes those parameters configurable at
compile-time (or a better solution is found). This means it's not
upstreamable.


> It would be nice if makepkg have some conditionals i.e. :
>
> if cc=clang then
> cflags="-march=x86-64 -mtune=generic -O2 -pipe -fsanitize=safe-stack
> -fsanitize=cfi -fvisibility=hidden
>
> if cc=gcc then
> cflags="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fstack-check
>

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.

On 7 July 2017 at 19:17, Jordan Glover <Golden_Miller83@xxxxxxxxxxxxx>
wrote:

> I'm surprised as it seemed to me that Daniel took it for granted that
> patch like that will get accepted. Anyway it's hard for an outsider to
> successfully submit anything to big upstream project. I hope you'll be more
> lucky if/when you decide to upstream your pie/ssp patches.
>
> It would be nice if makepkg have some conditionals i.e. :
>
> if cc=clang then
> cflags="-march=x86-64 -mtune=generic -O2 -pipe -fsanitize=safe-stack
> -fsanitize=cfi -fvisibility=hidden
>
> if cc=gcc then
> cflags="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fstack-check
>
> -------- Original Message --------
> Subject: Re: [arch-dev-public] Changing compilation flags
> From: evangelos@xxxxxxxxxxxxx
> To: Jordan Glover <Golden_Miller83@xxxxxxxxxxxxx>
> arch-general@xxxxxxxxxxxxx <arch-general@xxxxxxxxxxxxx>, Daniel Micay <
> danielmicay@xxxxxxxxx>, Public mailing list for Arch Linux development <
> arch-dev-public@xxxxxxxxxxxxx>, joerg@xxxxxxxxxx
>
> Thanks for trying to push the change upstream. I"m sorry they weren"t
> very receptive of it; your responses were on point and further
> clarified our intended use case.
>
> I"m not sure what Joerg meant by saying "Arch Linux can"t do
> compiler-specific flag definitions". He could be thinking of a regular
> project that can check for supported compiler flags, but AFAIK that
> concept is not readily transferable to distro-wide flags. (Even if it
> was, it would also apply to stack-check and friends so it"s a weak
> argument in my opinion.)
>
> At the end of the day, it"s not an issue to carry this patch
> downstream in Arch. :-)
>
>
>



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux