From: Eric Wong Date: Wed, 01 Aug 2018 01:35:24 GMT Subject: Re: Is detecting endianness at compile-time unworkable? Message-ID: <20180801013524.4u5ioghtc2trhsqd@dcvr> In-Reply-To: Junio C Hamano wrote: > 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"