From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [autobuild.buildroot.net] Build results for 2016-03-01
Date: Wed, 2 Mar 2016 16:21:56 +0100 [thread overview]
Message-ID: <20160302162156.2c4d6d13@free-electrons.com> (raw)
In-Reply-To: <878u20kiw7.fsf@dell.be.48ers.dk>
Hello,
On Wed, 02 Mar 2016 16:18:48 +0100, Peter Korsgaard wrote:
> The point seems to be that it is _ALWAYS_ claiming big endian, E.G. see
> this arm (not armeb!) build failure:
>
> http://autobuild.buildroot.net/results/382/382699bbed15f598625b9296e464d1349ef559f8/build-end.log
>
> Looking at ./auto/endianess, it tries to figure out endianess by
> building and executing a test program, and selecting little endian if
> the program exited with error code 0, otherwise big endian.
>
> As this is done with the cross compiler and the executable cannot be run
> on the build host, the program (-loader) will exit with a non-zero exit
> code and big endian is used:
>
> echo $ngx_n "checking for system byte ordering ...$ngx_c"
> echo >> $NGX_ERR
> echo "checking for system byte ordering" >> $NGX_ERR
>
>
> cat << END > $NGX_AUTOTEST.c
>
> int main() {
> int i = 0x11223344;
> char *p;
>
> p = (char *) &i;
> if (*p == 0x44) return 0;
> return 1;
> }
>
> END
>
> ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
> -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
>
> eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
>
> if [ -x $NGX_AUTOTEST ]; then
> if $NGX_AUTOTEST >/dev/null 2>&1; then
> echo " little endian"
> have=NGX_HAVE_LITTLE_ENDIAN . auto/have
> else
> echo " big endian"
> fi
>
> So this is horrible broken :/
Ah, I understand better. I was confused by Jeroen's report, since his
report was essentially "nginx concludes that SPARC is big endian",
which was not wrong at all.
Thanks for the explanation. Then indeed, passing NGX_HAVE_LITTLE_ENDIAN
seems like the right thing to do.
Does this means that nginx has never worked on little endian platforms ?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-03-02 15:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 7:30 [Buildroot] [autobuild.buildroot.net] Build results for 2016-03-01 Thomas Petazzoni
2016-03-02 14:24 ` Jeroen Roovers
2016-03-02 14:26 ` Jeroen Roovers
2016-03-02 15:04 ` Thomas Petazzoni
2016-03-02 15:18 ` Peter Korsgaard
2016-03-02 15:21 ` Thomas Petazzoni [this message]
2016-03-02 15:25 ` Peter Korsgaard
2016-03-02 15:29 ` Jeroen Roovers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160302162156.2c4d6d13@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox