[PATCH] Require C99 for bfd
Jan Beulich
jbeulich@suse.com
Wed Jan 29 14:41:00 GMT 2020
On 29.01.2020 15:08, cbiesinger@chromium.org wrote:
> From: Christian Biesinger <cbiesinger@google.com>
>
> This allows writing more modern code, such as not having to declare all
> variables at the top of a block.
>
> See also discussion at:
> https://sourceware.org/ml/binutils/2020-01/threads.html#00334
>
> Unfortunately, because of how the toplevel Makefile works, we have to
> override CC for this to work. gnulib/Makefile.am already has a workaround
> for this issue.
>
> My patch to fix this in the toplevel makefile has not gotten any attention
> so far:
> https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02237.html
>
> bfd/ChangeLog:
>
> 2020-01-29 Christian Biesinger <cbiesinger@google.com>
>
> * Makefile.am: Override CC to what configure detected.
> * Makefile.in: Regenerate.
> * configure: Regenerate.
> * configure.ac: Turn on C99 mode.
I'm not convinced of the move, but I'm also not in the position to
argue against it. However, I think precautions should be taken to
prevent headers of libraries made available for external consumption
to require use of C99 as well - C89 ought to remain sufficient for
them. In the Xen Project we make a wee attempt at something similar
(https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/Makefile;hb=refs/heads/staging),
to (hopefully) avoid gaining dependencies on gcc extensions. Maybe
something similar could be done here (unless there is something
like this already, and I'm simply unaware)?
Jan
More information about the Binutils
mailing list