Re: [coreboot] [RFC] Explicitly use C11/GNU11

2016-12-01 Thread Paul Menzel via coreboot
Dear Julius,


Am Mittwoch, den 30.11.2016, 20:10 -0800 schrieb Julius Werner:
> > Thank you for the elaborate explanation. I never intended to take on
> > that task, but if I had, you would have convinced me.
> > 
> > I hope using GNU11 suits everyone.
> 
> Yes, just to be clear (this has split into so many different threads
> that I'm no longer sure what the latest decision is?), I only
> (prematurely) objected to forbidding GNU extensions. Otherwise, I'm
> totally in favor of switching to C11 and not aware of any difference
> between the versions that would cause a problem for us.

As written, my current understanding is, that when switching the
coreboot toolchain from 4.9(?) to 5.3(?), the coreboot project switched
from GNU89 to GNU11.

My current proposal [1] is to explicitly set that, so that people can
still use GCC 4.9 – Debian 8.5 (Jessie/stable) ships GCC 4.9.2.

Reviews are welcome.


Thanks,

Paul


[1] https://review.coreboot.org/17636

signature.asc
Description: This is a digitally signed message part
-- 
coreboot mailing list: coreboot@coreboot.org
https://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] [RFC] Explicitly use C11/GNU11

2016-11-30 Thread Julius Werner
> Thank you for the elaborate explanation. I never intended to take on
> that task, but if I had, you would have convinced me.
>
> I hope using GNU11 suits everyone.

Yes, just to be clear (this has split into so many different threads
that I'm no longer sure what the latest decision is?), I only
(prematurely) objected to forbidding GNU extensions. Otherwise, I'm
totally in favor of switching to C11 and not aware of any difference
between the versions that would cause a problem for us.

-- 
coreboot mailing list: coreboot@coreboot.org
https://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [RFC] Explicitly use C11/GNU11

2016-11-29 Thread Paul Menzel via coreboot
Dear Julius,


Am Dienstag, den 29.11.2016, 14:20 -0800 schrieb Julius Werner:
> > A lot of the GNU extensions are used in our codebase, so if somebody
> > feels strongly about moving away from GNU11 to C11, the code needs to
> > be cleaned up. But that should be done in a different patch set.
> 
> I'd like to explicitly object to that. There are many GNU extensions
> which are simply necessary to write sane, readable and performant code
> (e.g. to implement non-double-evaluating MIN()/MAX() macros, to
> cleanly control linking into particular sections, to get performant
> code generated for IO accessor functions, etc.). The C standard by
> itself is simply insufficient to support all systems programming use
> cases, and if we forbade GNU extensions we'd have to rewrite
> significant parts of coreboot in pure assembly and add weird, hardly
> readable workarounds for many code patterns. I don't see how this
> would be worth it just to try to get compatibility with compilers
> nobody wants to use anyway, or for some theoretical goal of "standards
> compliance" with no practical benefit. (Note that many GNU extensions
> are implicitly available even without -std=gnuXX, some of them even if
> you also enable -Werror=pedantic. But that doesn't not make them GNU
> extensions, and there'd be no reason to treat them differently from
> ones that require the -std flag. Ditching GNU extensions would mean
> that every __attribute__, every __builtin and every extended asm
> becomes illegal.)

Thank you for the elaborate explanation. I never intended to take on
that task, but if I had, you would have convinced me.

I hope using GNU11 suits everyone.


Thanks,

Paul

signature.asc
Description: This is a digitally signed message part
-- 
coreboot mailing list: coreboot@coreboot.org
https://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] [RFC] Explicitly use C11

2016-11-29 Thread Julius Werner
> A lot of the GNU extensions are used in our codebase, so if somebody
> feels strongly about moving away from GNU11 to C11, the code needs to
> be cleaned up. But that should be done in a different patch set.

I'd like to explicitly object to that. There are many GNU extensions
which are simply necessary to write sane, readable and performant code
(e.g. to implement non-double-evaluating MIN()/MAX() macros, to
cleanly control linking into particular sections, to get performant
code generated for IO accessor functions, etc.). The C standard by
itself is simply insufficient to support all systems programming use
cases, and if we forbade GNU extensions we'd have to rewrite
significant parts of coreboot in pure assembly and add weird, hardly
readable workarounds for many code patterns. I don't see how this
would be worth it just to try to get compatibility with compilers
nobody wants to use anyway, or for some theoretical goal of "standards
compliance" with no practical benefit. (Note that many GNU extensions
are implicitly available even without -std=gnuXX, some of them even if
you also enable -Werror=pedantic. But that doesn't not make them GNU
extensions, and there'd be no reason to treat them differently from
ones that require the -std flag. Ditching GNU extensions would mean
that every __attribute__, every __builtin and every extended asm
becomes illegal.)

-- 
coreboot mailing list: coreboot@coreboot.org
https://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [RFC] Explicitly use C11

2016-11-29 Thread Paul Menzel via coreboot
Dear coreboot folks,


Am Dienstag, den 29.11.2016, 00:38 +0100 schrieb Nico Huber:
> On 29.11.2016 00:23, Alexander Couzens wrote:
> > I like the idea of using C11.
> 
> I would be looking forward to that.

As GCC 5.3 from the coreboot toolchain uses GNU11 by default, there is
now a change set up for review, explicitly setting that [1].

A lot of the GNU extensions are used in our codebase, so if somebody
feels strongly about moving away from GNU11 to C11, the code needs to
be cleaned up. But that should be done in a different patch set.


Thanks,

Paul


[1] https://review.coreboot.org/17636/

signature.asc
Description: This is a digitally signed message part
-- 
coreboot mailing list: coreboot@coreboot.org
https://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] [RFC] Explicitly use C11

2016-11-28 Thread Nico Huber
On 29.11.2016 00:23, Alexander Couzens wrote:
> I like the idea of using C11.

I would be looking forward to that.

Nico

-- 
coreboot mailing list: coreboot@coreboot.org
https://www.coreboot.org/mailman/listinfo/coreboot


Re: [coreboot] [RFC] Explicitly use C11 (was: Setting C99 by default)

2016-11-28 Thread Alexander Couzens
I like the idea of using C11.

best,
lynxis
-- 
Alexander Couzens

mail: lyn...@fe80.eu
jabber: lyn...@fe80.eu
mobile: +4915123277221
gpg: 390D CF78 8BF9 AA50 4F8F  F1E2 C29E 9DA6 A0DF 8604


pgpeL_QoOUuik.pgp
Description: OpenPGP digital signature
-- 
coreboot mailing list: coreboot@coreboot.org
https://www.coreboot.org/mailman/listinfo/coreboot