[PATCH 2 of 2] auto/feature: disable feature autotest when cross-compiling

Samuel Martin s.martin49 at gmail.com
Fri May 9 12:13:12 UTC 2014


Hi Maxim, all,

On Fri, May 9, 2014 at 6:04 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
>
> On Sun, May 04, 2014 at 08:08:30AM +0200, Samuel Martin wrote:
>
>> # HG changeset patch
>> # User Samuel Martin <s.martin49 at gmail.com>
>> # Date 1399156849 -7200
>> #      Sun May 04 00:40:49 2014 +0200
>> # Node ID 03617a96c528d1f02abf829df964fcb29b06c942
>> # Parent  f0f3f5208b12c6afbbdfb55b32c968ebd7206ad5
>> auto/feature: disable feature autotest when cross-compiling
>>
>> This patch introduce a new NGX_CROSSBUILD configure variable that records
>> whether --crossbuild=... option was passed on the command line.
>>
>> Then this variable is used to disable the feature runtest because they
>> cannot usually be executed when cross-compiling.
>
> No.
>
> This is very bad approach, as it silently assumes that every test
> which can be compiled succeeds.

Note that, when doing cross-compilation, one knows (or should better
know) exactly what he/she is compiling. So, it's usual (at least ok)
to edit or generate the config.h file (or equivalent files) used at
build time.

>
> Not to mention that is't just wrong for "value" and "bug" tests.

To be honest, I did not really check what this is.

AFAICS, there is:
- only 1 feature check using "bug", which is for darwin, so not really
relevant to me (though I can try to find some solution for this, but I
have no way to test it);
- only 1 feature (but up-to 3 checks) using "value", this is about the
sys_nerr, sys_errlist support in the C-library. However AFAICS, these
checks are useless because nginx does implement its own
ngx_sys_errlist, and never uses the one from the C-library.


Regards,

-- 
Samuel



More information about the nginx-devel mailing list