On Tue, Jun 12, 2012 at 7:02 PM, H.J. Lu <
hjl....@gmail.com> wrote:
> On Tue, Jun 12, 2012 at 3:58 PM, Daniel Schepler <
dsch...@gmail.com> wrote:
>> I just noticed that even building in an x32-only chroot, binutils 2.22 still
>> ends up with the default target as elf_x86_64. Therefore, a sequence like
>> gcc -c file1.c
>> gcc -c file2.c
>> ld -r -o allmycode.o file1.o file2.o
>> doesn't work as it should (it gives an error regarding target mismatches).
>> Is there any way to configure binutils with the default target being
>> elf32_x86_64? Or will I have to patch bfd/config.bfd and ld/configure.tgt,
>> or something else, to support that?
>
> Please get binutils 2.22.52.0.4 and configure binutils with x86_64-linux-gnux32.
> You will get x32 binutils.
it would still be nice if this were controllable, but maybe that
doesn't matter ... is this the recommended tuple that people will be
going with ? i started out with x86_64-x32-linux-gnu, but had to
abandon that because glibc will use the $vendor field in
auto-detecting ABI. so building with -m64/-m32 always fails because
the $vendor selects x32 ABI for me. i wasn't too keen on
x86_64-pc-linux-gnu due to the ambiguity with the -m64 ABI.
-mike