From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Illegal instruction by python's xmlrpclib on powerpc64, gcc-4.9
Date: Wed, 4 Nov 2015 23:48:15 +0100 [thread overview]
Message-ID: <563A8B2F.7070203@mind.be> (raw)
In-Reply-To: <CAM+bi4umtQ1ExSDbSHk32Udqz4TX8aQ3gwNawZgwkikUVdom8g@mail.gmail.com>
On 04-11-15 16:24, Alvaro Gamez wrote:
[snip]
> I've tried to test this, but before I realized that buildroot didn't include
> support for mcpu=e6500, so I applied the following patch:
> diff --git a/arch/Config.in.powerpc b/arch/Config.in.powerpc
> index 95bcaee..cafafea 100644
> --- a/arch/Config.in.powerpc
> +++ b/arch/Config.in.powerpc
> @@ -200,6 +200,7 @@ config BR2_GCC_TARGET_CPU
> default "e300c2" if BR2_powerpc_e300c2
> default "e300c3" if BR2_powerpc_e300c3
> default "e500mc" if BR2_powerpc_e500mc
> + default "e6500" if BR2_powerpc_e6500
> default "power4" if BR2_powerpc_power4
> default "power5" if BR2_powerpc_power5
> default "power6" if BR2_powerpc_power6
Right, Gustavo forgot to add that when he added e5500 and e6500. Patch follows.
>
> Now, however, the problem is pretty different, as when compiling glibc, I
> stumbled upon this:
>
> ../sysdeps/powerpc/powerpc64/start.S: Assembler messages:
> ../sysdeps/powerpc/powerpc64/start.S:77: Error: syntax error; found `@',
> expected `('
> ../sysdeps/powerpc/powerpc64/start.S:77: Error: junk at end of line: `@toc(2)'
> [...]
> ../sysdeps/powerpc/powerpc64/crtn.S: Assembler messages:
> ../sysdeps/powerpc/powerpc64/crtn.S:42: Error: unsupported relocation against
> FRAME_MIN_SIZE_PARM
> ../sysdeps/powerpc/powerpc64/crtn.S:48: Error: unsupported relocation against
> FRAME_MIN_SIZE_PARM
> [...]
> ../sysdeps/powerpc/powerpc64/crti.S: Assembler messages:
> ../sysdeps/powerpc/powerpc64/crti.S:64: Error: unrecognized opcode: `entry_2(_init)'
> ../sysdeps/powerpc/powerpc64/crti.S:66: Error: unrecognized opcode: `body_label'
> ../sysdeps/powerpc/powerpc64/crti.S:67: Error: unrecognized opcode:
> `localentry(_init)'
> ../sysdeps/powerpc/powerpc64/crti.S:72: Error: syntax error; found `@', expected `,'
> ../sysdeps/powerpc/powerpc64/crti.S:72: Error: junk at end of line: `@toc at ha'
> ../sysdeps/powerpc/powerpc64/crti.S:73: Error: syntax error; found `@', expected `('
> ../sysdeps/powerpc/powerpc64/crti.S:73: Error: junk at end of line: `@toc at l(9)'
> ../sysdeps/powerpc/powerpc64/crti.S:82: Error: unrecognized opcode: `entry_2(_fini)'
> ../sysdeps/powerpc/powerpc64/crti.S:84: Error: unrecognized opcode: `body_label'
> ../sysdeps/powerpc/powerpc64/crti.S:85: Error: unrecognized opcode:
> `localentry(_fini)'
> [...]
> ../sysdeps/powerpc/powerpc64/dl-machine.h: In function 'elf_machine_runtime_setup':
> ../sysdeps/powerpc/powerpc64/dl-machine.h:342:26: error: initialization from
> incompatible pointer type [-Werror]
> Elf64_Dyn **info = map->l_info;
> ../sysdeps/powerpc/powerpc64/dl-machine.h:361:11: error: cast from pointer to
> integer of different size [-Werror=pointer-to-int-cast]
> dlrr = (Elf64_Addr) (profile ? _dl_profile_resolve
> [Several other identical errors referring to different casts]
> [...]
> /tmp/test/build/glibc-2.21/build/gnu/lib-names.h:10:31: fatal error:
> gnu/lib-names-32.h: No such file or directory
> compilation terminated.
> /tmp/test/build/glibc-2.21/build/sysd-rules:857: recipe for target
> '/tmp/test/build/glibc-2.21/build/csu/unwind-resume.os' failed
>
>
> And now I just simply don't know how to continue. Any ideas?
The problem is that the compiler doesn't seem to build 64-bit binaries unless
-m64 is specified, but glibc is configured for 64-bit.
Just adding -m64 to BR2_TARGET_OPTIMIZATION works around the issue.
Now that we have the toolchain wrapper, we could just add -DBR_64 in
toolchain-wrapper.mk whenever BR2_ARCH_IS_64. However, I'm not sure how that
will play with n32, ilp32 and x32 ABIs. Adding Vicente, Bamvor and Guido who
added those ABIs.
Regards,
Arnout
> This toolchain with
> previous patch to buildroot results in
> Using built-in specs.
> COLLECT_GCC=/test/output/host/usr/bin/powerpc64-buildroot-linux-gnu-gcc.br_real
> COLLECT_LTO_WRAPPER=/test/output/host/usr/libexec/gcc/powerpc64-buildroot-linux-gnu/4.9.3/lto-wrapper
> Target: powerpc64-buildroot-linux-gnu
> Configured with: ./configure --prefix=/test/output/host/usr
> --sysconfdir=/test/output/host/etc --localstatedir=/test/output/host/var
> --enable-shared --disable-static --disable-gtk-doc --disable-gtk-doc-html
> --disable-doc --disable-docs --disable-documentation --disable-debug
> --with-xmlto=no --with-fop=no --disable-dependency-tracking
> --target=powerpc64-buildroot-linux-gnu
> --with-sysroot=/test/output/host/usr/powerpc64-buildroot-linux-gnu/sysroot
> --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib
> --with-gmp=/test/output/host/usr --with-mpfr=/test/output/host/usr
> --with-pkgversion='Buildroot 2015.11-git-00919-g73eb930-dirty'
> --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath --enable-tls
> --disable-libmudflap --enable-threads --with-mpc=/test/output/host/usr
> --without-isl --without-cloog --disable-decimal-float --with-cpu=e6500
> --enable-languages=c --disable-shared --without-headers --disable-threads
> --with-newlib --disable-largefile --disable-nls
> Thread model: single
> gcc version 4.9.3 (Buildroot 2015.11-git-00919-g73eb930-dirty)
>
>
> Thanks, best regards!
>
> --
> ?lvaro G?mez Machado
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2015-11-04 22:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 9:40 [Buildroot] Illegal instruction by python's xmlrpclib on powerpc64, gcc-4.9 Alvaro Gamez
2015-11-03 14:17 ` Thomas Petazzoni
2015-11-03 19:20 ` Gustavo Zacarias
2015-11-03 19:25 ` Thomas Petazzoni
2015-11-04 10:18 ` Alvaro Gamez
2015-11-04 10:49 ` Thomas Petazzoni
2015-11-04 11:31 ` Alvaro Gamez
2015-11-04 15:24 ` Alvaro Gamez
2015-11-04 22:48 ` Arnout Vandecappelle [this message]
2015-11-05 10:27 ` Alvaro Gamez
2015-11-05 11:13 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563A8B2F.7070203@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.