linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Rob Landley <rob@landley.net>
Cc: linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 1/3] Replace kernel/timeconst.pl with kernel/timeconst.sh
Date: Thu, 10 Dec 2009 14:52:44 +0100	[thread overview]
Message-ID: <4B20FD2C.1010804@suse.cz> (raw)
In-Reply-To: <200912091740.43147.rob@landley.net>

On 10.12.2009 00:40, Rob Landley wrote:
> On Wednesday 09 December 2009 09:45:37 Michal Marek wrote:
>> You're trying to avoid the build dependency on Perl. What about adding a
>> timeconst.h_shipped with the precomputed values from timeconst.pl:
> 
> Been there, done that.  My first patch (way back for 2.6.25) took that 
> approach:
> 
> http://landley.net/hg/hgwebdir.cgi/firmware/file/a791ca629d9c/sources/patches/linux-2.6.25-
> rc1-noperl.patch
> 
> But it turns out various non-x86 targets (such as ARM OMAP) allow HZ to be 
> specified by an entry field in the config file, into which the user can type a 
> range of numbers.  See this post from last year for details:
> 
> http://lists.impactlinux.com/pipermail/firmware-impactlinux.com/2008-
> December/000022.html
> 
> This is why reducing the perl version to just the precomputed constants 
> wouldn't work either.  (They're there so that you only need to install a 
> random cpan library when surprised by a build break on non-x86 machines.)

That's why I wrote

>> plus some makefile automagic to run the script iff the HZ value isn't
>> precomputed. Then you would only need Perl for exotic HZ configurations.

E.g. make it
...
#elif HZ == 1200
...
#else
#include "timeconst_custom.h"
#endif

and the makefile would run timeconst.pl to generate timeconst_custom.h
iff HZ is set to something arbitrary. I don't have a patch for that, but
I don't see a fundamental problem with such approach.

Michal

  parent reply	other threads:[~2009-12-10 13:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200912080317.08254.rob@landley.net>
2009-12-08 10:23 ` [PATCH 0/3] clean out Perl from build system Michal Marek
2009-12-08 15:08   ` Rob Landley
     [not found] ` <200912080319.30679.rob@landley.net>
2009-12-09 15:45   ` [PATCH 1/3] Replace kernel/timeconst.pl with kernel/timeconst.sh Michal Marek
2009-12-09 23:40     ` Rob Landley
2009-12-09 23:45       ` H. Peter Anvin
2009-12-10  1:50         ` Rob Landley
2009-12-10  1:53           ` H. Peter Anvin
2009-12-10 13:52       ` Michal Marek [this message]
2009-12-10 23:16         ` Rob Landley
2009-12-11 15:31           ` Michal Marek
2009-12-11 19:13             ` H. Peter Anvin
2009-12-12  0:49               ` Rob Landley

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=4B20FD2C.1010804@suse.cz \
    --to=mmarek@suse.cz \
    --cc=hpa@zytor.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob@landley.net \
    /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 NNTP newsgroup(s).