#3157 closed defect (fixed)
PowerPC tools don't build on 32-bit hosts
Reported by: | Jeff Mayes | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | 5.1 |
Component: | unspecified | Version: | 5 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Using RSB and trying to build PowerPC.
Updated RSB just a few days ago.
i386 and arm build successfully, but PowerPC fails.
configure:3662: checking for suffix of object files
configure:3684: /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/xgcc -B/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/ -nostdinc -B/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/gcc-7.2.0/newlib/libc/include -B/desk/rtems/powerpc-rtems4.12/bin/ -B/desk/rtems/powerpc-rtems4.12/lib/ -isystem /desk/rtems/powerpc-rtems4.12/include -isystem /desk/rtems/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -c -g -O2 conftest.c >&5
Assembler messages:
Fatal error: -a64 unsupported
configure:3688: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3702: error: in `/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/libgcc':
configure:3705: error: cannot compute suffix of object files: cannot compile
Change History (17)
comment:1 Changed on 09/29/17 at 20:32:06 by Jeff Mayes
Owner: | set to Sebastian Huber |
---|---|
Status: | new → assigned |
comment:2 Changed on 09/29/17 at 20:55:48 by Joel Sherrill
Summary: | PowerPC tools doesn't build → PowerPC tools don't build |
---|
comment:3 Changed on 09/30/17 at 07:20:20 by Sebastian Huber
Please make sure that no previous RTEMS tools are in your $PATH before the build, e.g. delete the previous installation and try it again.
comment:4 Changed on 09/30/17 at 07:25:02 by Sebastian Huber
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Duplicate of #2540.
comment:5 Changed on 10/04/17 at 19:48:34 by Jeff Mayes
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
OK. There are no RTEMS tools in my path. I deleted the build folder in my working dir and tried again. I also changed the #PREFIX to use a different directory. It still fails with the same error as reported.
Any other ideas?
Thanks
comment:6 Changed on 10/04/17 at 19:55:52 by Jeff Mayes
Joel had the idea to see what verbose gcc output showed. This shows the as version used (2.29).
We have checked and my RSB is up to date. Is there any chance 64-bit PowerPC support is disabled in binutils on Cygwin?
+ /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/xgcc -B/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/ -nostdinc -B/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/ -isystem /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/gcc-7.2.0/newlib/libc/include -B/desk/rtems/powerpc/powerpc-rtems4.12/bin/ -B/desk/rtems/powerpc/powerpc-rtems4.12/lib/ -isystem /desk/rtems/powerpc/powerpc-rtems4.12/include -isystem /desk/rtems/powerpc/powerpc-rtems4.12/sys-include -mcpu=e6500 -m64 -c -g -v -O2 conftest.c Reading specs from /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/specs COLLECT_GCC=/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/xgcc Target: powerpc-rtems4.12 Configured with: ../gcc-7.2.0/configure --prefix=/desk/rtems/powerpc --bindir=/desk/rtems/powerpc/bin --exec_prefix=/desk/rtems/powerpc --includedir=/desk/rtems/powerpc/include --libdir=/desk/rtems/powerpc/lib --libexecdir=/desk/rtems/powerpc/libexec --mandir=/desk/rtems/powerpc/share/man --infodir=/desk/rtems/powerpc/share/info --datadir=/desk/rtems/powerpc/share --build=i686-pc-cygwin --host=i686-pc-cygwin --target=powerpc-rtems4.12 --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --verbose --with-newlib --disable-nls --without-included-gettext --disable-win32-registry --enable-version-specific-runtime-libs --disable-lto --enable-newlib-io-c99-formats --enable-newlib-iconv --enable-newlib-iconv-encodings=big5,cp775,cp850,cp852,cp855,cp866,euc_jp,euc_kr,euc_tw,iso_8859_1,iso_8859_10,iso_8859_11,iso_8859_13,iso_8859_14,iso_8859_15,iso_8859_2,iso_8859_3,iso_8859_4,iso_8859_5,iso_8859_6,iso_8859_7,iso_8859_8,iso_8859_9,iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,win_1253,win_1254,win_1255,win_1256,win_1257,win_1258 --enable-threads --disable-plugin --enable-libgomp --enable-languages=c,c++ Thread model: rtems gcc version 7.2.0 20170814 (RTEMS 4.12, RSB 55f2d69e9b67cde23d61375fa34ef5b0f04a985d, Newlib 2.5.0.20170818) (GCC) COLLECT_GCC_OPTIONS='-B' '/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/' '-nostdinc' '-B' '/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/' '-isystem' '/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/targ-include' '-isystem' '/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/gcc-7.2.0/newlib/libc/include' '-B' '/desk/rtems/powerpc/powerpc-rtems4.12/bin/' '-B' '/desk/rtems/powerpc/powerpc-rtems4.12/lib/' '-isystem' '/desk/rtems/powerpc/powerpc-rtems4.12/include' '-isystem' '/desk/rtems/powerpc/powerpc-rtems4.12/sys-include' '-mcpu=e6500' '-m64' '-c' '-g' '-v' '-O2' /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/cc1.exe -quiet -nostdinc -v -imultilib me6500/m64 -iprefix /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/gcc/../lib/gcc/powerpc-rtems4.12/7.2.0/ -isystem /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/include -isystem /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/include-fixed -D__PPC_CPU_E6500__ -isystem /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/targ-include -isystem /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/gcc-7.2.0/newlib/libc/include -isystem /desk/rtems/powerpc/powerpc-rtems4.12/include -isystem /desk/rtems/powerpc/powerpc-rtems4.12/sys-include conftest.c -quiet -dumpbase conftest.c -mcpu=e6500 -m64 -auxbase conftest -g -O2 -version -o /tmp/ccRXH4mo.s GNU C11 (GCC) version 7.2.0 20170814 (RTEMS 4.12, RSB 55f2d69e9b67cde23d61375fa34ef5b0f04a985d, Newlib 2.5.0.20170818) (powerpc-rtems4.12) compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/targ-include" ignoring nonexistent directory "/desk/rtems/powerpc/powerpc-rtems4.12/include" ignoring nonexistent directory "/desk/rtems/powerpc/powerpc-rtems4.12/sys-include" #include "..." search starts here: #include <...> search starts here: /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/include /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/include-fixed /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/gcc-7.2.0/newlib/libc/include End of search list. GNU C11 (GCC) version 7.2.0 20170814 (RTEMS 4.12, RSB 55f2d69e9b67cde23d61375fa34ef5b0f04a985d, Newlib 2.5.0.20170818) (powerpc-rtems4.12) compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: c400f821a881560be7012bb91d375b83 COLLECT_GCC_OPTIONS='-B' '/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/' '-nostdinc' '-B' '/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/' '-isystem' '/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/powerpc-rtems4.12/me6500/m64/newlib/targ-include' '-isystem' '/opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/gcc-7.2.0/newlib/libc/include' '-B' '/desk/rtems/powerpc/powerpc-rtems4.12/bin/' '-B' '/desk/rtems/powerpc/powerpc-rtems4.12/lib/' '-isystem' '/desk/rtems/powerpc/powerpc-rtems4.12/include' '-isystem' '/desk/rtems/powerpc/powerpc-rtems4.12/sys-include' '-mcpu=e6500' '-m64' '-c' '-g' '-v' '-O2' /opt/rtems-tools/rsb/rtems/build/powerpc-rtems4.12-gcc-7.2.0-newlib-2.5.0.20170818-i686-pc-cygwin-1/build/./gcc/as -v -a64 -me6500 -many -mbig -o conftest.o /tmp/ccRXH4mo.s GNU assembler version 2.29 (powerpc-rtems4.12) using BFD version (GNU Binutils) 2.29 Assembler messages: Fatal error: -a64 unsupported
comment:7 Changed on 10/04/17 at 23:45:27 by Chris Johns
The error is happening in as
and it would appear the PPC as
does not support 64bit options. Does an as
Linux build of the PPC support the -a64
option? Hint, use -save-temp
to get a .s
file and shift it to Linux and try.
I would compare the full build logs for a Linux build and a Cygwin build paying extra attention to the assembler configure and build. I would try and locate a PowerPC 64bit assembler file in the as
source and see if it is build on Linux and Cygwin.
comment:8 Changed on 10/05/17 at 06:53:10 by Sebastian Huber
The BFD configuration is in Binutils bfd/config.bfd:
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \ powerpc-*-chorus*) targ_defvec=powerpc_elf32_vec targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec" targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec" ;;
Looks like some Cygwin-specific build problem to me.
comment:9 Changed on 10/10/17 at 22:53:01 by Jeff Mayes
With Joel's help, I got it to build today. Here are the changes we made:
jeff@Win7-VM /opt/rtems-tools/rsb/rtems $ git diff config/tools/rtems-binutils-2.29-1.cfg diff --git a/rtems/config/tools/rtems-binutils-2.29-1.cfg b/rtems/config/tools/rtems-binutils-2.29-1.cfg index 6941ebb..87580f8 100644 --- a/rtems/config/tools/rtems-binutils-2.29-1.cfg +++ b/rtems/config/tools/rtems-binutils-2.29-1.cfg @@ -20,6 +20,11 @@ %define with_deterministic_archives 1 # +# Enable 64-bit BFD support +# +%define with_64_bit_bfd 1 + +# # The binutils build instructions. We use 2.xx Release 1. # %include %{_configdir}/binutils-2-1.cfg jeff@Win7-VM /opt/rtems-tools/rsb/rtems $ git diff ../source-builder/config/binutils-2-1.cfg diff --git a/source-builder/config/binutils-2-1.cfg b/source-builder/config/binutils-2-1.cfg index 539f076..0b4101d 100644 --- a/source-builder/config/binutils-2-1.cfg +++ b/source-builder/config/binutils-2-1.cfg @@ -70,6 +70,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) --target=%{_target} \ --verbose --disable-nls \ %{?with_deterministic_archives:--enable-deterministic-archives} \ + %{?with_64_bit_bfd:--enable-64-bit-bfd} \ %{?with_gold:--enable-gold=yes} \ %{?with_lto:--enable-lto --enable-plugins}%{!?with_lto:--disable-lto} \ --without-included-gettext \
comment:10 Changed on 10/11/17 at 10:21:20 by Chris Johns
Please correct the ticket and:
- Assign ownership to Joel.
- Set a milestone
- Add
binutils PowerPC 64bit
to the tags
Thanks
What hosts have you tested?
comment:11 follow-up: 12 Changed on 10/11/17 at 10:33:42 by Joel Sherrill
Milestone: | → 4.12.0 |
---|---|
Owner: | changed from Sebastian Huber to Joel Sherrill |
Status: | reopened → assigned |
No other hosts have been tested. We were happy it worked on Cygwin. If you are ok with the patch, we can test it elsewhere.
comment:12 Changed on 10/11/17 at 11:32:44 by Chris Johns
Replying to Joel Sherrill:
No other hosts have been tested. We were happy it worked on Cygwin. If you are ok with the patch, we can test it elsewhere.
Patch looks fine with a minor change in the commit to say Enable 64-bit BFD support. Needed on 32bit hosts.
. We just need to make sure other hosts are not broken.
comment:13 Changed on 10/11/17 at 12:13:05 by Joel Sherrill
Testing now on CentOS 7 and Fedora 26 which are 64-bit hosts.
Following up on a comment from Sebastian that I missed. This is not Cygwin specific. It is an issue on all 32-bit hosts. The bfd magic silently disables 64-bit BFD on 32-bit hosts unless you specify --enable-64-bit-bfd. I have not checked yet if sparc64 or aarch64 will build on 32-bit Cygwin. They may need this option also. I will ask Jeff to check if they build. They may need this option also.
comment:14 Changed on 10/11/17 at 20:24:31 by Jeff Mayes
Just tested aarch64 and sparc64 with the fixed files, and they both build just fine.
comment:15 Changed on 10/11/17 at 23:57:25 by Joel Sherrill
Summary: | PowerPC tools don't build → PowerPC tools don't build on 32-bit hosts |
---|
comment:16 Changed on 10/12/17 at 02:18:45 by Joel Sherrill <joel.sherrill@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:17 Changed on 11/09/17 at 06:27:14 by Sebastian Huber
Milestone: | 4.12.0 → 5.1 |
---|
Milestone renamed
I have built the tools on two CentOS 7 computers. Jeff was on Cygwin and has successfully built both arm and x86.