Re: Is detecting endianness at compile-time unworkable?
- From
- Eric Wong <e@80x24.org>
- Date
- Aug 1, 2018, 01:35 UTC
- Message-ID
- <20180801013524.4u5ioghtc2trhsqd@dcvr>
- In-Reply-To
- <xmqqh8kgfuba.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> Well, having said all that, I do not think I personally mind if > ./configure learned to include a "compile small program and run it > to determine byte order on the build machine" as part of "we make a > reasonable effort" as long as it cleanly excludes cross building > case (and the result is made overridable just in case we misdetect > the "cross-ness" of the build).
No need to run the program for cross-compiles, grepping a object file seems to work for autoconf:
git clone https://git.sv.gnu.org/git/autoconf.git $PAGER autoconf/lib/autoconf/c.m4 # look for "BIGenDianSyS"