[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DO NOT use file format of /bin/sh for x32 detection!

From: Thorsten Glaser
Subject: Re: DO NOT use file format of /bin/sh for x32 detection!
Date: Wed, 28 Feb 2018 15:55:57 +0100 (CET)
User-agent: Alpine 2.21 (DEB 202 2017-01-01)

On Wed, 28 Feb 2018, James Clarke wrote:

> This is what I proposed to upstream initially[0], but I was told that
> CC_FOR_BUILD was deprecated and being phased out, and that I should be relying


> on standard system utilities instead. I chose objdump /bin/sh as another
> architecture was already doing that (though with different flags). I agree,

That is broken, though.

> CC_FOR_BUILD is the only real way of determining whether the build 
> architecture
> is x32, but the upstream rules are the rules. Do you have a suggestion for
> something better that doesn't rely on CC_FOR_BUILD?

I really have no other idea that’s in scope. After all, CC_FOR_BUILD
is the *only* tool guaranteed to correspond to the target (in FreeWRT
speak; --build= in GNU autotools speak) system.

Not using CC_FOR_BUILD would also break all sorts of cross-compiling,
so IMNSHO, that’s *really* out.

For x32 (and other upcoming architectures like arm64ilp32), and with
the advent of Multi-Arch, this is really a problem (beyond my initial
“/bin/sh on x32 is amd64 because it’s linked against klibc, whose x32
build is really amd64 since it lacks explicit x32 support” problem).

[16:04:33] bkix: "veni vidi violini"
[16:04:45] bkix: "ich kam, sah und vergeigte"...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]