From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Perl in the toolchain
Date: 31 Jan 2003 16:29:47 -0800 [thread overview]
Message-ID: <b1f4dr$5ut$1@cesium.transmeta.com> (raw)
In-Reply-To: 3E3B0557.3070400@pobox.com
Followup to: <3E3B0557.3070400@pobox.com>
By author: Jeff Garzik <jgarzik@pobox.com>
In newsgroup: linux.dev.kernel
>
> This is a logically correct argument, but also one that ignores basic
> numbers.
>
> The fact of the matter is, the area of build tools matters most to
> people who cross-compile their kernels, because every tool is generally
> hand-built rather than automatically installed on their Linux system.
> For this audience, as well as the typical non-cross-compiling kernel
> developer, Perl is on their system.
>
> However, that fact is less significant than the more basic and core
> argument:
>
> klibc uses perl for text munging. i.e. one of Perl's acknowledged
> strengths. This is not a case of choosing a favorite script language,
> but instead a case of choosing "the right tool for the job." Regardless
> of whether you think Perl is line noise :) or not, from a technical
> basis Perl is clearly superior to sed+awk in this case.
>
Thanks Jeff :)
To emphasize things a bit further, Perl is:
a) good at munging text;
b) available on basically all development systems;
c) not host- or target-specific.
Thus, I cannot see it as being an issue, and I challenge anyone to
find a machine on which they regularly build kernels which doesn't
have Perl. Like it or not, today it's as much a part of a
general-purpose Unix platform as sed or awk.
Yes, you can write complete shit code in Perl. You can write shit
code in any language (Perl does, however, make it easier, so if you're
programming in Perl you need to watch out for this.) Yes, you can
require 47 different obscure interdependent modules which were just
released last week on CPAN, but you can require an equivalent number
of obscure libraries in C. Doing that, or require features only
available in very recent versions of Perl, would be wholly
inappropriate for the kernel build. My personal rule of thumb is that
it should work at least as far back as Perl 5.004.
There is one klibc script which possibly ought to be rewritten, and
that is the one that uses Digest::MD5 which may not be available on
some very old platforms. If so, I'd probably just include the MD5
digest code in the script itself, rather than having to deal with C
code that is compiled for the host in the klibc tree.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: cris ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
next prev parent reply other threads:[~2003-02-01 0:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-31 18:39 Perl in the toolchain Pete Zaitcev
2003-01-31 19:41 ` Kai Germaschewski
2003-01-31 19:48 ` Jeff Garzik
2003-01-31 19:55 ` Mr. James W. Laferriere
2003-01-31 20:41 ` Sam Ravnborg
2003-01-31 22:50 ` Ben Greear
2003-01-31 21:38 ` J.A. Magallon
2003-01-31 22:22 ` Sam Ravnborg
2003-01-31 23:23 ` Jeff Garzik
2003-02-01 0:29 ` H. Peter Anvin [this message]
2003-02-01 12:12 ` Sam Ravnborg
2003-01-31 23:40 ` J.A. Magallon
[not found] ` <mailman.1044055681.1939.linux-kernel2news@redhat.com>
2003-02-01 1:06 ` Pete Zaitcev
2003-02-01 6:02 ` Ryan Anderson
2003-01-31 22:51 ` Roman Zippel
2003-01-31 23:27 ` Jeff Garzik
2003-01-31 23:40 ` J.A. Magallon
2003-01-31 23:40 ` Jeff Garzik
2003-02-01 0:01 ` Roman Zippel
2003-02-01 0:05 ` J.A. Magallon
-- strict thread matches above, loose matches on Subject: below --
2003-01-31 20:13 Ed Vance
2003-02-01 3:28 ` Scott Robert Ladd
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='b1f4dr$5ut$1@cesium.transmeta.com' \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox