This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/4186] Cross compiling for sub architectures (e.g. i586 target i686 host) fails
- From: "wcohen at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 20 Mar 2007 20:40:04 -0000
- Subject: [Bug translator/4186] Cross compiling for sub architectures (e.g. i586 target i686 host) fails
- References: <20070314215028.4186.wcohen@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From wcohen at redhat dot com 2007-03-20 20:40 -------
It looks like the correct code subarchitecture code should be
generated. An automated grep of the files in the linux kernel
directory turned up the following line:
./arch/i386/Makefile.cpu:cflags-$(CONFIG_M586) += -march=i586
One of the problems observed in the stap translator code is that
tapsets.cxx:query_module() assumes that if the vmlinux file is i386
that it should be i686. It could be i586 or i486. There is a comment
in there about this:
// Validate the machine code in this elf file against the
// session machine. This is important, in case the wrong kind
// of debuginfo is being automagically processed by elfutils.
// Unfortunately, while we can tell i686 apart from x86-64,
// we can't help confusing i586 vs i686 (both EM_386).
The translator should be able to do a better job determine the target
architecture. Couldn't this information be obtained from .config and
Makefile in kernel-devel?
For cross compiling http://lwn.net/Articles/21823/ has comments about
building modules and cross-compile. Should be able to do the following
when building the systemtap module:
CROSS_COMPILE=ppc_4xx- make -C ...
--
http://sourceware.org/bugzilla/show_bug.cgi?id=4186
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.