[PATCH 1 of 2] auto/type/sizeof: rework autotest to be cross-compilation friendly

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


Hi Maxim, all,

Overall, thanks a lot for your feedback.

I'm doing this in order to get nginx integrated in Buildroot [1], so
it would be automatically tested by the Buildroot buildfarms [2].

I'd like to know if there is an interest from nginx team to get a
proper cross-compilation support.
- if yes, I'll do my best to help on it (Buildroot developers try to
push upstream as much as possible the fixes they do);
- if no, do the config files touch by this series often change?

BTW, I have to admit the series is mostly (only) for gcc, maybe only
for linux target because this is my main concerns, and I don't have
access to all the hardware/platforms/compilers nginx intends to
support.

Patch comments inlined.

On Fri, May 9, 2014 at 5:49 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
>
> On Sun, May 04, 2014 at 08:08:29AM +0200, Samuel Martin wrote:
>
>> # HG changeset patch
>> # User Samuel Martin <s.martin49 at gmail.com>
>> # Date 1398374852 -7200
>> #      Thu Apr 24 23:27:32 2014 +0200
>> # Node ID f0f3f5208b12c6afbbdfb55b32c968ebd7206ad5
>> # Parent  b9553b4b8e670a0231afc0484f23953c0d8b5f22
>> auto/type/sizeof: rework autotest to be cross-compilation friendly
>>
>> Rework the sizeof test to do the checks at compile time instead of at
>> runtime. This way, it does not break when cross-compiling for a
>> different CPU architecture.
>
> No.
>
> Apart from various problems with the patch like breaking
> ./configure output, this approach (parsing error messages of a
> compiler) is not portable.  E.g., it won't work with MSVC.

Right, instead of parsing the compiler outputs of one file, I think I
can come up with a solution based on testing the compilation status of
several files.

Regards,

-- 
Samuel



More information about the nginx-devel mailing list