[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 0/3] Fix building with clang
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2 0/3] Fix building with clang |
Date: |
Fri, 21 Oct 2022 15:53:24 +0200 |
On Fri, Oct 21, 2022 at 01:32:58PM +0000, Darren Kenny wrote:
> The abiltiy to build with clang was broken in the last release after the
> upgrade of gnulib, but it would also appear to have been broken too with
> versions of clang prior to 8.0.0.
>
> There were two main issues:
>
> - The use of __builtin_trap in the abort() macro.
>
> This builtin doesn't exist for clang builds
>
> After some discussion between Daniel and Vladimir, it was requested that I
> should revert some past changes in this area, and re-introduce the use of
> grub_abort().
>
> - The is some use of variable length arrays (vla) in gnulib's code, and when
> an attempt was made to resolve this in gnulib itself, I was informed that we
> shouldn't be building gnulib with -Werror.
>
> Rather than totally disabling -Werror, it seemed better to just limit it for
> the specific case that is causing problems, i.e. vla.
>
> - Attempts to build clang with versions prior to 8.0.0 are also failing due to
> the use of the previously introduced safematch function usage. So we're also
> bumping the minimum version of clang in the INSTALL file and safemath.h
> where the test is done for the requisite version.
>
> Thanks,
>
> Darren.
>
> v1 -> v2
> --------
> - Update with changes to INSTALL and safemath.h after testing various clang
> versions from 3.8 and up.
>
> Darren Kenny (3):
> gnulib: Provide abort() implementation for gnulib
> configure: Fix building with clang
> build: Update to reflect minimum clang version 8.0
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> for all patches...
Thank you for fixing all these issues!
Daniel