[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/19153] New: binutils configured for --target=powerpc-ibm-a
From: |
hvr at gnu dot org |
Subject: |
[Bug binutils/19153] New: binutils configured for --target=powerpc-ibm-aix7.1.0.0 has wrong default bfd-target for 'ar' |
Date: |
Mon, 19 Oct 2015 12:32:16 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19153
Bug ID: 19153
Summary: binutils configured for
--target=powerpc-ibm-aix7.1.0.0 has wrong default
bfd-target for 'ar'
Product: binutils
Version: 2.25
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: hvr at gnu dot org
Target Milestone: ---
When configuring binutils-2.25.1 for cross-compilation with
`--target=powerpc-ibm-aix7.1.0.0`, the resulting `./binutils/ar` generates
archives for the wrong bfd-target which causes problems when bootstrapping GCC
targetting AIX (as `libgcc.a` is then created in the wrong format).
> $ echo 'int foo(void) { return 23; }' > foo.c
> $ powerpc-ibm-aix7.1.0.0-gcc -c foo.c
> $ file foo.o
> foo.o: executable (RISC System/6000 V3.1) or obj module not stripped
> $ powerpc-ibm-aix7.1.0.0-ar rv libfoo.a foo.o
> powerpc-ibm-aix7.1.0.0-ar: creating libfoo.a
> a - foo.o
> $ file libfoo.a
> libfoo.a: current ar archive
> $ echo 'int main() { return 0; }' > main.c
> $ powerpc-ibm-aix7.1.0.0-gcc main.c libfoo.a
> collect2: fatal error: libfoo.a: cannot open as COFF file
> compilation terminated.
However, if I explicitly use `--target=aixcoff-rs6000`, it works as expected:
> $ powerpc-ibm-aix7.1.0.0-ar rv libfoo.a foo.o --target=aixcoff-rs6000
> powerpc-ibm-aix7.1.0.0-ar: creating libfoo.a
> a - foo.o
> $ file libfoo.a
> libfoo.a: archive (big format)
> $ powerpc-ibm-aix7.1.0.0-gcc main.c libfoo.a
> $ file a.out
> a.out: executable (RISC System/6000 V3.1) or obj module not stripped
IMO, `--target=aixcoff-rs6000` should be the default bfd-target when binutils
is configured for `powerpc-ibm-aix7.1.0.0`
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/19153] New: binutils configured for --target=powerpc-ibm-aix7.1.0.0 has wrong default bfd-target for 'ar',
hvr at gnu dot org <=