mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Makefiles are not built using a Fortran compiler
@ 2005-02-08  3:02 Matthew Wilcox
  2005-02-08 12:23 ` Roman Zippel
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Wilcox @ 2005-02-08  3:02 UTC (permalink / raw)
  To: Sam Ravnborg, Kai Germaschewski; +Cc: linux-kernel, dholland


David Holland pointed out that Make has a lot of implicit suffix rules
built in and you can disable them by setting ".SUFFIXES:".  As an
example, checking the debugging information shows we no longer try to
compile anything from a '.f' suffix.  This turns out to be good for a 15%
speedup on a build with nothing to do; down from 29.1 seconds to 24.7
seconds on my K6.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>

Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/Makefile,v
retrieving revision 1.338
diff -u -p -r1.338 Makefile
--- Makefile	6 Feb 2005 06:43:49 -0000	1.338
+++ Makefile	8 Feb 2005 02:39:28 -0000
@@ -4,6 +4,8 @@ SUBLEVEL = 11
 EXTRAVERSION =-rc3-pa3
 NAME=Woozy Numbat
 
+.SUFFIXES:
+
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
 # More info can be located in ./README
Index: scripts/Makefile.build
===================================================================
RCS file: /var/cvs/linux-2.6/scripts/Makefile.build,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile.build
--- scripts/Makefile.build	12 Jan 2005 20:18:19 -0000	1.9
+++ scripts/Makefile.build	8 Feb 2005 02:39:28 -0000
@@ -4,6 +4,8 @@
 
 src := $(obj)
 
+.SUFFIXES:
+
 .PHONY: __build
 __build:
 

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Makefiles are not built using a Fortran compiler
  2005-02-08  3:02 [PATCH] Makefiles are not built using a Fortran compiler Matthew Wilcox
@ 2005-02-08 12:23 ` Roman Zippel
  2005-02-08 15:44   ` Matthew Wilcox
  0 siblings, 1 reply; 9+ messages in thread
From: Roman Zippel @ 2005-02-08 12:23 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Sam Ravnborg, Kai Germaschewski, linux-kernel, dholland

Hi,

On Tue, 8 Feb 2005, Matthew Wilcox wrote:

> 
> David Holland pointed out that Make has a lot of implicit suffix rules
> built in and you can disable them by setting ".SUFFIXES:".  As an
> example, checking the debugging information shows we no longer try to
> compile anything from a '.f' suffix.  This turns out to be good for a 15%
> speedup on a build with nothing to do; down from 29.1 seconds to 24.7
> seconds on my K6.

Enabling the following in the Makefile should have the same effect:

# For maximum performance (+ possibly random breakage, uncomment
# the following)

#MAKEFLAGS += -rR

bye, Roman

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Makefiles are not built using a Fortran compiler
  2005-02-08 12:23 ` Roman Zippel
@ 2005-02-08 15:44   ` Matthew Wilcox
  2005-02-08 17:04     ` Ryan Anderson
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Matthew Wilcox @ 2005-02-08 15:44 UTC (permalink / raw)
  To: Roman Zippel
  Cc: Matthew Wilcox, Sam Ravnborg, Kai Germaschewski, linux-kernel, dholland

On Tue, Feb 08, 2005 at 01:23:48PM +0100, Roman Zippel wrote:
> Enabling the following in the Makefile should have the same effect:
> 
> # For maximum performance (+ possibly random breakage, uncomment
> # the following)
> 
> #MAKEFLAGS += -rR

This reduces the debug output even further (and size of debug output is
strongly correlated with time taken to do a null build):

-rw-r--r--  1 willy willy 65582214 2005-02-07 21:13 vanilla.debug
-rw-r--r--  1 willy willy 51413770 2005-02-07 22:17 nosuffixes.debug
-rw-r--r--  1 willy willy 37245484 2005-02-08 09:56 maxperf.debug

Seems like it gets rid of the RCS and SCCS rules -- certainly a big
improvement, and I'm not sure anyone really uses those rules.  Can we
perhaps uncomment this line at the beginning of 2.6.12 and see if anyone
complains?  This should reduce make overhead by 30-40% which is really
worth doing.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Makefiles are not built using a Fortran compiler
  2005-02-08 15:44   ` Matthew Wilcox
@ 2005-02-08 17:04     ` Ryan Anderson
  2005-02-08 19:20     ` Sam Ravnborg
  2005-02-08 21:23     ` J.A. Magallon
  2 siblings, 0 replies; 9+ messages in thread
From: Ryan Anderson @ 2005-02-08 17:04 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Roman Zippel, Sam Ravnborg, Kai Germaschewski, linux-kernel, dholland

On Tue, Feb 08, 2005 at 03:44:17PM +0000, Matthew Wilcox wrote:
> On Tue, Feb 08, 2005 at 01:23:48PM +0100, Roman Zippel wrote:
> > Enabling the following in the Makefile should have the same effect:
> > 
> > # For maximum performance (+ possibly random breakage, uncomment
> > # the following)
> > 
> > #MAKEFLAGS += -rR
> 
> This reduces the debug output even further (and size of debug output is
> strongly correlated with time taken to do a null build):
> 
> -rw-r--r--  1 willy willy 65582214 2005-02-07 21:13 vanilla.debug
> -rw-r--r--  1 willy willy 51413770 2005-02-07 22:17 nosuffixes.debug
> -rw-r--r--  1 willy willy 37245484 2005-02-08 09:56 maxperf.debug
> 
> Seems like it gets rid of the RCS and SCCS rules -- certainly a big
> improvement, and I'm not sure anyone really uses those rules.  Can we
> perhaps uncomment this line at the beginning of 2.6.12 and see if anyone
> complains?  This should reduce make overhead by 30-40% which is really
> worth doing.

The BitKeeper users sometimes make use of the SCCS rules.

BK installs itself in such a way as to provide the SCCS commands, and
Make will update things if you forget to do a bk -r get -Sq after a
pull.

>From a totally clean tree, this doesn't work (I forget why, offhand, but
I think it's something to do with the *config targets), but it is
helpful at times from partially clean trees to automatically "get" from
the SCCS copy of the file.

-- 

Ryan Anderson
  sometimes Pug Majere

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Makefiles are not built using a Fortran compiler
  2005-02-08 15:44   ` Matthew Wilcox
  2005-02-08 17:04     ` Ryan Anderson
@ 2005-02-08 19:20     ` Sam Ravnborg
  2005-02-08 19:26       ` Kai Germaschewski
  2005-02-08 21:27       ` Matthew Wilcox
  2005-02-08 21:23     ` J.A. Magallon
  2 siblings, 2 replies; 9+ messages in thread
From: Sam Ravnborg @ 2005-02-08 19:20 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Roman Zippel, Sam Ravnborg, Kai Germaschewski, linux-kernel, dholland

On Tue, Feb 08, 2005 at 03:44:17PM +0000, Matthew Wilcox wrote:
> On Tue, Feb 08, 2005 at 01:23:48PM +0100, Roman Zippel wrote:
> > Enabling the following in the Makefile should have the same effect:
> > 
> > # For maximum performance (+ possibly random breakage, uncomment
> > # the following)
> > 
> > #MAKEFLAGS += -rR
> 
> This reduces the debug output even further (and size of debug output is
> strongly correlated with time taken to do a null build):
> 
> -rw-r--r--  1 willy willy 65582214 2005-02-07 21:13 vanilla.debug
> -rw-r--r--  1 willy willy 51413770 2005-02-07 22:17 nosuffixes.debug
> -rw-r--r--  1 willy willy 37245484 2005-02-08 09:56 maxperf.debug
> 
> Seems like it gets rid of the RCS and SCCS rules -- certainly a big
> improvement, and I'm not sure anyone really uses those rules.
The SCCS rules is the sole reason why -rR has not been enabled.

In my inbox I have a patch that enables SCCS support for all files.
Today it fails for Kconfig files at least.

I'm willing to give it a try. But we will only see people complaining
when it hits linus tree. -mm users uses quilt and the like - and thus
will not be hit by this.

	Sam

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Makefiles are not built using a Fortran compiler
  2005-02-08 19:20     ` Sam Ravnborg
@ 2005-02-08 19:26       ` Kai Germaschewski
  2005-02-09  5:04         ` Sam Ravnborg
  2005-02-08 21:27       ` Matthew Wilcox
  1 sibling, 1 reply; 9+ messages in thread
From: Kai Germaschewski @ 2005-02-08 19:26 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Matthew Wilcox, Roman Zippel, Kai Germaschewski, linux-kernel, dholland

On Tue, 8 Feb 2005, Sam Ravnborg wrote:

> The SCCS rules is the sole reason why -rR has not been enabled.

An easy way to make sure that the SCCS business is not a factor would be 
to explicitly put the SCCS rules into the Makefile -- it's just two lines.

This way one could easily make sure there are no other problems incurred 
(I wouldn't think so, but...), and tackle the SCCS/bk business later.

--Kai


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Makefiles are not built using a Fortran compiler
  2005-02-08 15:44   ` Matthew Wilcox
  2005-02-08 17:04     ` Ryan Anderson
  2005-02-08 19:20     ` Sam Ravnborg
@ 2005-02-08 21:23     ` J.A. Magallon
  2 siblings, 0 replies; 9+ messages in thread
From: J.A. Magallon @ 2005-02-08 21:23 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]


On 2005.02.08, Matthew Wilcox wrote:
> On Tue, Feb 08, 2005 at 01:23:48PM +0100, Roman Zippel wrote:
> > Enabling the following in the Makefile should have the same effect:
> > 
> > # For maximum performance (+ possibly random breakage, uncomment
> > # the following)
> > 
> > #MAKEFLAGS += -rR
> 

aic7xxx fails if you select to build firmware and use -R.
-R suppress the variable definitions, so a rule for lex and yacc
is missing and aicasm fails to build.

A rule for lex and yacc could be added somewhere in kbuild...

--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-jam8 (gcc 3.4.3 (Mandrakelinux 10.2 3.4.3-3mdk)) #1


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Makefiles are not built using a Fortran compiler
  2005-02-08 19:20     ` Sam Ravnborg
  2005-02-08 19:26       ` Kai Germaschewski
@ 2005-02-08 21:27       ` Matthew Wilcox
  1 sibling, 0 replies; 9+ messages in thread
From: Matthew Wilcox @ 2005-02-08 21:27 UTC (permalink / raw)
  To: Matthew Wilcox, Roman Zippel, Sam Ravnborg, Kai Germaschewski,
	linux-kernel, dholland

On Tue, Feb 08, 2005 at 08:20:27PM +0100, Sam Ravnborg wrote:
> In my inbox I have a patch that enables SCCS support for all files.
> Today it fails for Kconfig files at least.

I guess the kconfig system needs to try to make Kconfig files before
including them ... this works for me, checking a Kconfig file out of RCS:

--- scripts/kconfig/zconf.l     29 Jul 2003 17:02:27 -0000      1.1
+++ scripts/kconfig/zconf.l     8 Feb 2005 21:25:43 -0000
@@ -269,15 +269,24 @@ static void zconf_endhelp(void)
  */
 FILE *zconf_fopen(const char *name)
 {
-       char *env, fullname[PATH_MAX+1];
+       char *env, fullname[PATH_MAX+6];
        FILE *f;
 
        f = fopen(name, "r");
+       if (!f) {
+               sprintf(fullname, "make %s", name);
+               system(fullname);
+               f = fopen(name, "r");
+       }
        if (!f && name[0] != '/') {
                env = getenv(SRCTREE);
                if (env) {
-                       sprintf(fullname, "%s/%s", env, name);
-                       f = fopen(fullname, "r");
+                       sprintf(fullname, "make %s/%s", env, name);
+                       f = fopen(fullname + 5, "r");
+                       if (!f) {
+                               system(fullname);
+                               f = fopen(fullname + 5, "r");
+                       }
                }
        }
        return f;

I bet someone else can do it better than this ... I'm sure we don't need
to invoke sh to invoke make ;-)

> I'm willing to give it a try. But we will only see people complaining
> when it hits linus tree. -mm users uses quilt and the like - and thus
> will not be hit by this.
> 
> 	Sam

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Makefiles are not built using a Fortran compiler
  2005-02-08 19:26       ` Kai Germaschewski
@ 2005-02-09  5:04         ` Sam Ravnborg
  0 siblings, 0 replies; 9+ messages in thread
From: Sam Ravnborg @ 2005-02-09  5:04 UTC (permalink / raw)
  To: Kai Germaschewski
  Cc: Sam Ravnborg, Matthew Wilcox, Roman Zippel, Kai Germaschewski,
	linux-kernel, dholland

Hi Kai - long time..

> > The SCCS rules is the sole reason why -rR has not been enabled.
> 
> An easy way to make sure that the SCCS business is not a factor would be 
> to explicitly put the SCCS rules into the Makefile -- it's just two lines.

Yup, I will do that when 2.6.11 opens up.
If other rules are needed I will add them.

	Sam

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-02-09  5:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-08  3:02 [PATCH] Makefiles are not built using a Fortran compiler Matthew Wilcox
2005-02-08 12:23 ` Roman Zippel
2005-02-08 15:44   ` Matthew Wilcox
2005-02-08 17:04     ` Ryan Anderson
2005-02-08 19:20     ` Sam Ravnborg
2005-02-08 19:26       ` Kai Germaschewski
2005-02-09  5:04         ` Sam Ravnborg
2005-02-08 21:27       ` Matthew Wilcox
2005-02-08 21:23     ` J.A. Magallon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®