Re: [PATCH v2 02/10] Add Aarch64 SVE Linux headers

Simon Marchi
2018-06-12T15:21:09Z

On 2018-06-12 11:11, Pedro Alves wrote:
> On 06/12/2018 04:06 PM, Simon Marchi wrote:
>> I think that would be a good compromise.Â  By default, building on a
>> machine with an older kernel would exclude SVE support.Â  But it would
>> be possible to add it by pointing to the headers of a recent kernel.Â
>> So when building on a machine with an older kernel...
>>
>> - ... without any special flags, you don't get SVE support.
>> - ... with just --enable-sve, you get a configure error.
>> - ... with --enable-sve and CFLAGS/CXXFLAGS pointing to headers of a
>> kernel w/ SVE macros, you get SVE support.
>>
>> Does that make sense?
> Yes. Not sure an --enable-sve switch is necessary (compared to just
> having
> headers vs not having headers), but I'd be fine with having one.

I think it is useful if you want to make sure your build will have the
support:

- auto/not specified: include the support if the prerequisites are
available
- enable: include the support, error at configure if prerequisites are
missing
- disable: don't include the support

Otherwise, just a typo in your include path can result in a build
without the feature you want, and you only discover it later, that's
annoying.

Simon