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: 10 Apr 2007 18:32:34 -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-04-10 19:32 -------
Thinking about this some more. The way that c_unparser::emit_module_init()
should check for machine really should be determined by build/make of the
module. There shouldn't be a reason for someone to explicitly set the
architecture. The "-march=" doesn't set a single define for this. Thinking of
having is a function/define in the run time library that generates the
appropriate machine string based on __i486__, __i586__, ___i686___, etc.
static inline char *_stp_target_machine_arch()
{
#if defined(__i386__)
return "i386";
#elseif defined(__i486__)
return "i486";
...
#else
#error "cannot determine target arch"
#endif
}
generate code for for test something like this:
if (strcmp (machine, _stp_target_machine_arch())) {
_stp_error ("module machine mismatch (%s vs %s)", machine,
_stap_target_machine_arch());
rc = -EINVAL;
}
--
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.