This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/4186] New: Cross compiling for sub architectures (e.g. i586 target i686 host) fails


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]