Makefiles are not built using a Fortran compiler
PATCH 1/1 Makefiles are not built using a Fortran compiler
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.
Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/Makefile,v
retrieving revision 1.338
Makefile +2 -0
@@ -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
Makefile.build +2 -0
@@ -4,6 +4,8 @@ src := $(obj) +.SUFFIXES: + .PHONY: __build __build:
Signature · 6 lines
"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
Hi,
Quoted 7 lines · Matthew Wilcox
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
Quoted 6 lines · Roman Zippel
Enabling the following in the
Makefileshould 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.
Signature · 6 lines
"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
Quoted 15 lines · Matthew Wilcox
Quoted 6 lines · Roman Zippel
Enabling the following in the
Makefileshould 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):
(quoted diff) +0
-3-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
Quoted 5 lines
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.
Quoted 1 line
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.
Signature · 2 lines
Ryan Anderson sometimes Pug Majere
Quoted 15 lines · Matthew Wilcox
Quoted 6 lines · Roman Zippel
Enabling the following in the
Makefileshould 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):
(quoted diff) +0
-3-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
Quoted 2 lines
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
Quoted 1 line · Sam Ravnborg
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
Hi Kai - long time..
Quoted 4 lines
Quoted 1 line
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
Quoted 2 lines · Sam Ravnborg
In my inbox I have a patch that enables SCCS support for all files. Today it fails for
Kconfigfiles 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:
kconfig/zconf.l 8 Feb 2005 21:25:43 -0000 renamed from kconfig/zconf.l 29 Jul 2003 17:02:27 -0000 1.1 +12 -3
@@ -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 ;-)
Quoted 5 lines
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
Signature · 6 lines
"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
Quoted 8 lines · Matthew Wilcox
Quoted 6 lines · Roman Zippel
Enabling the following in the
Makefileshould 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