public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/4186] New: Cross compiling for sub architectures (e.g. i586 target i686 host) fails
@ 2007-03-14 21:50 wcohen at redhat dot com
  2007-03-15 14:07 ` [Bug translator/4186] " wcohen at redhat dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: wcohen at redhat dot com @ 2007-03-14 21:50 UTC (permalink / raw)
  To: systemtap

SystemTap generates a test to check the architecture of the target machine and
make sure that it matches. When doing cross compiling for the olpc machine the
kernel is a i586 architecture. systemtap_module_init has the following code in it:

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
    const char* machine = utsname()->machine;
    const char* release = utsname()->release;
    #else
    const char* machine = system_utsname.machine;
    const char* release = system_utsname.release;
    #endif
    if (strcmp (machine, "i686")) {
      _stp_error ("module machine mismatch (%s vs %s)", machine, "i686");
      rc = -EINVAL;
    }

when building for the olpc kernel the "i686" strings should be "i586". The
translator needs to figure out the architecture. It might be able to do this
from the arch in the directory name, like the following:

/usr/src/kernels/2.6.21-20070312.olpc1p.3eca75102a57502-i586

The make also need to build the module for the subarchitecture.

-- 
           Summary: Cross compiling for sub architectures (e.g. i586 target
                    i686 host) fails
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: wcohen at redhat dot com


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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-08-25  0:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-14 21:50 [Bug translator/4186] New: Cross compiling for sub architectures (e.g. i586 target i686 host) fails wcohen at redhat dot com
2007-03-15 14:07 ` [Bug translator/4186] " wcohen at redhat dot com
2007-03-15 18:45 ` fche at redhat dot com
2007-03-20 16:56 ` wcohen at redhat dot com
2007-03-20 20:40 ` wcohen at redhat dot com
2007-04-10 18:32 ` wcohen at redhat dot com
2009-08-05 20:08 ` [Bug translator/4186] cross-architecture compilation fche at redhat dot com
2009-08-05 20:18 ` roland at gnu dot org
2009-08-24 14:38 ` fche at redhat dot com
2009-08-24 21:57 ` mjw at redhat dot com
2009-08-25  0:42 ` fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).