From: Rob Landley <rlandley@parallels.com>
To: Jesper Juhl <jj@chaosbits.net>
Cc: <linux-kernel@vger.kernel.org>, <tglx@linutronix.de>,
<mingo@redhat.com>, <hpa@zytor.com>, <x86@kernel.org>,
"K. Y. Srinivasan" <ksrinivasan@novell.com>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [PATCH] Use sed instead of perl to generate x86/kernel/cpu/capflags.c.
Date: Sun, 16 Jan 2011 14:30:12 -0600 [thread overview]
Message-ID: <4D335554.7020403@parallels.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1101162103450.13377@swampdragon.chaosbits.net>
On 01/16/2011 02:05 PM, Jesper Juhl wrote:
> On Sun, 16 Jan 2011, Rob Landley wrote:
>
>> From: Rob Landley <rlandley@parallels.com>
>>
>> Generate capflags.c with sed (POSIX 2008) instead of perl.
>>
>
> While I'm not personally a great perl fan, this still begs the
> question, why?
1) In general, simpler is better. (Why ship autoconf files to build on
hosts that don't have autoconf? Why fix make oldconfig so it builds on
platforms that don't have curses installed?)
2) Making reliable cross compile build environments involves creating a
known build environment on the host, generally removing everything you
don't actually _need_ so it can't screw things up when you introduce
another target or upgrade packages on your host.
I've maintained such a build environment (aboriginal linux) for several
years. I've personally encountered literally _dozens_ of others, and
expect there are at least hundreds if not thousands out in the wild.
3) Perl is not a well-defined langauge. It is a single implementation,
not a standard. (Like Microsoft Word and Excel, their file formats are
just "what this program emits/parses". Similarly, Perl is what the perl
binary runs. Attemts to rewrite it based on Parrot famously collapsed
into a black hole of corner cases.)
Meaning, if you have a platform on which the one and only implementation
of perl doesn't run, you have no alternative implementations to try.
(Did I mention that Perl's configuration stage is implemented in perl?)
This moves to an alternative standardized by POSIX, which has well
understood behavior with multiple independent implementations (gnu, bsd,
busybox...)
> We already depend on perl for other stuff, so why replace something that
> works with something that may or may not work?
We have various development scripts that depend on perl, curses, python,
QT, and so on. But building a _kernel_ doesn't depend on any of that...
except perl. I'm not proposing removing checkstack.pl and such, because
"development system" != "build machine". A build machine can be a
headless box, a development system usually has things like Gnome or KDE
installed.
The kernel's dependency on Perl was introduced in 2.6.25. Before 2008
the kernel built just fine on a host that didn't have perl installed,
and I've been patching the kernel to remove the requirement ever since
in my own build environment. (And building the resulting kernel for a
dozen different targets, and submitting those patches here when they
changed. They just haven't changed in a while.)
Perl is used in exactly three places during the kernel build. I have
patches to remove the other two instances of perl use, and using them
have built a kernel on a system that doesn't have perl installed. I'm
tweaking them for submission later today. My prevoius submissions (such
as http://lkml.indiana.edu/hypermail/linux/kernel/0901.0/00148.html)
treated them as a series, but since the three issues are really
orthogonal I'm posting them individually this time, and cc-ing the
various people get_maintainer.pl says to.
Rob
next prev parent reply other threads:[~2011-01-16 20:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 19:59 [PATCH] Use sed instead of perl to generate x86/kernel/cpu/capflags.c Rob Landley
2011-01-16 20:05 ` Jesper Juhl
2011-01-16 20:30 ` Rob Landley [this message]
2011-01-16 20:39 ` Jesper Juhl
2011-01-18 20:58 ` Rob Landley
2011-01-19 4:57 ` Américo Wang
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=4D335554.7020403@parallels.com \
--to=rlandley@parallels.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jj@chaosbits.net \
--cc=ksrinivasan@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.