From: "Frank Ch. Eigler" <fche@redhat.com>
To: systemtap@sources.redhat.com
Subject: PR4186: cross-compilation, $ARCH
Date: Tue, 25 Aug 2009 13:54:00 -0000 [thread overview]
Message-ID: <20090825133335.GA28204@redhat.com> (raw)
Hi -
We need to clear up our use of the generic term "architecture" in
stap, as visible to scripts %( arch %) and the build system (-a foo or
-B ARCH=foo). The linux kernel has a less fuzzy meaning for it than
we have had, roughly as embodied by the SUBARCH computation in the
top level Makefile:
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-e s/sh[234].*/sh/ )
Whereas we in stap land have used uname(2)'s machine, or approximating
"uname -i". But neither of those matches SUBARCH/ARCH, for cases such
as s390[x], powerpc[64], and others. The current systemtap git code
breaks on these latter ones.
So, what to do? A few options:
- Revert some of my cross-arch code, so as to avoid passing ARCH=foo to
the build system if the user hasn't attempted to override the default.
This would preserve the inconsistency. Tapsets would not exist for
where "uname -m" gives wordy labels like "armv5tejl".
- Add the same SUBARCH-flattening hack to systemtap, so that we think
in terms of the same "arch" value as the kernel. (I don't think
there exists any kernel API or /proc filesystem that gives us this
string back at run time!) So "ppc64" would become plain "powerpc",
"s390x"->"s390", "arm5tejl"->"arm", and so on. Tapsets would have
to be moved around a little more, and third-party scripts that use
the old %( arch %) names would have to change.
I'm leaning for #2, but I'm looking for more alternatives or advice.
- FChE
next reply other threads:[~2009-08-25 13:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 13:54 Frank Ch. Eigler [this message]
2009-08-25 14:42 ` David Smith
2009-08-25 14:50 ` Frank Ch. Eigler
2009-08-25 15:13 ` David Smith
2009-08-25 15:15 ` Frank Ch. Eigler
2009-08-27 20:28 ` Mark Wielaard
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=20090825133335.GA28204@redhat.com \
--to=fche@redhat.com \
--cc=systemtap@sources.redhat.com \
/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 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).