Skip to contentSkip to conversation

Remove obsolete HEAD in top Makefile

PATCH In review Coywolf Qi Hunt 4 participants 12 messages Aug 15, 2004 – Aug 18, 2004 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove obsolete HEAD in top Makefile

Hi,

This removes an obsolete variable in the top Makefile. It is used in 2.4 Makefile. Now the 2.6 kbuild is no longer using it. I have tested it.

coywolf

Makefile 2004-08-15 05:46:41.296231310 -0400 renamed from Makefile~remove-HEAD 2004-08-15 05:46:21.215837742 -0400 +0 -0
@@ -506,7 +506,6 @@ libs-y              := $(libs-y1) $(libs-y2)

# normal descending-into-subdirs phase, since at that time
# we cannot yet know if we will need to relink vmlinux.
# So we descend into init/ inside the rule for vmlinux again.
-head-y += $(HEAD)
vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)

quiet_cmd_vmlinux__ = LD $@

Signature · 3 lines
Coywolf Qi Hunt
Homepage http://greatcn.org/~coywolf/
Admin of http://GreatCN.org and http://LoveCN.org
#1 lore raw
Quoted 1 line · In article <[email protected]> you wrote:

Now the 2.6 kbuild is no longer using it. I have tested it.

...

Quoted 3 lines

-head-y += $(HEAD)
vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)

iff it is not using it you need to remove it in the next line, too.

Gruss
Bernd

Signature · 3 lines
-- 
eckes privat - http://www.eckes.org/
Project Freefire - http://www.freefire.org/
#2 lore raw
Quoted 9 lines · Bernd Eckenfels
Quoted 3 lines · In article <[email protected]> you wrote:

Now the 2.6 kbuild is no longer using it. I have tested it.

...

Quoted 9 lines
Quoted 4 lines

-head-y += $(HEAD)
vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)

iff it is not using it you need to remove it in the next line, too.

Nah, I'm only removing HEAD, not head-y. :p

Signature · 3 lines
Coywolf Qi Hunt
Homepage http://greatcn.org/~coywolf/
Admin of http://GreatCN.org and http://LoveCN.org
#3 lore raw
Quoted 2 lines · Coywolf Qi Hunt
Quoted 1 line

iff it is not using it you need to remove it in the next line, too.

Nah, I'm only removing HEAD, not head-y. :p

If you remove this line:
head-y += $(HEAD)

then head-y is undefined, and could therefore be removed, too. I dont know what HEAD was used for, and where does it come from. But since the 2.4 code uses head in a compareable way (i.e. only in that location with toetally differen s tructure) I am not sure if it is not needed.

Can you explain what it was used for and why it can be removed now?

Gruss
Bernd

Signature · 4 lines
  (OO)      -- Bernd_Eckenfels@Mörscher_Strasse_8.76185Karlsruhe.de --
 ( .. )      ecki@{inka.de,linux.de,debian.org}  http://www.eckes.org/
  o--o     1024D/E383CD7E  eckes@IRCNet  v:+497211603874  f:+497211606754
(O____O)  When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl!
#4 lore raw
Quoted 7 lines · Bernd Eckenfels
Quoted 2 lines · Coywolf Qi Hunt
Quoted 1 line

iff it is not using it you need to remove it in the next line, too.

Nah, I'm only removing HEAD, not head-y. :p

If you remove this line:
head-y += $(HEAD)

Quoted 6 lines

then head-y is undefined, and could therefore be removed, too. I dont know what HEAD was used for, and where does it come from. But since the 2.4 code uses head in a compareable way (i.e. only in that location with toetally differen s tructure) I am not sure if it is not needed.

Can you explain what it was used for and why it can be removed now?

HEAD got replaced with head-y sometime in 2.5.
It's about time to rip out the last bits.

About head-y:

Quoted 1 line

From Documentation/kbuild/makefiles.txt:

The very first objects linked are listed in head-y, assigned by

      arch/$(ARCH)/Makefile.

And later:

    head-y, init-y, core-y, libs-y, drivers-y, net-y

            $(head-y) list objects to be linked first in vmlinux.
            $(libs-y) list directories where a lib.a archive can be located.
            The rest list directories where a built-in.o object file can be located.
	    
            $(init-y) objects will be located after $(head-y).
            Then the rest follows in this order:
            $(core-y), $(libs-y), $(drivers-y) and $(net-y).
						    

	Sam
#5 lore raw
In reply to Coywolf Qi Hunt
Quoted 5 lines · Coywolf Qi Hunt

Hi,

This removes an obsolete variable in the top Makefile. It is used in 2.4 Makefile.
Now the 2.6 kbuild is no longer using it. I have tested it.

find -name 'Makefile*' | xargs grep HEAD
identify one user: cris.

Please resend patch with removal in arch/cris/Makefile.

Sam

#6 lore raw

PATCH 1/1 remove obsolete HEAD in kbuild

Quoted 10 lines · Sam Ravnborg
Quoted 6 lines · Coywolf Qi Hunt

Hi,

This removes an obsolete variable in the top Makefile. It is used in 2.4 Makefile. Now the 2.6 kbuild is no longer using it. I have tested it.

Quoted 5 lines

find -name 'Makefile*' | xargs grep HEAD
identify one user: cris.

Please resend patch with removal in arch/cris/Makefile.

Makefile           |    1 -
arch/cris/Makefile |    2 --
2 files changed, 3 deletions(-)
Makefile +0 -0
diff -Nrup linux-2.6.8/Makefile linux-2.6.8-cy/Makefile
@@ -506,7 +506,6 @@ libs-y		:= $(libs-y1) $(libs-y2)

# normal descending-into-subdirs phase, since at that time
# we cannot yet know if we will need to relink vmlinux.
# So we descend into init/ inside the rule for vmlinux again.
-head-y += $(HEAD)
vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)

quiet_cmd_vmlinux__ = LD $@

arch/cris/Makefile +0 -0
diff -Nrup linux-2.6.8/arch/cris/Makefile linux-2.6.8-cy/arch/cris/Makefile
@@ -39,8 +39,6 @@ CFLAGS := $(subst -fomit-frame-pointer,,

CFLAGS += -fno-omit-frame-pointer
endif

-HEAD := arch/$(ARCH)/$(SARCH)/kernel/head.o
-
LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)

core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/

Signature · 3 lines
Coywolf Qi Hunt
Homepage http://greatcn.org/~coywolf/
Admin of http://GreatCN.org and http://LoveCN.org
#7 lore raw

Re: [patch] remove obsolete HEAD in kbuild

Quoted 11 lines · Coywolf Qi Hunt

diff -Nrup linux-2.6.8/arch/cris/Makefile linux-2.6.8-cy/arch/cris/Makefile

arch/cris/Makefile +0 -0
@@ -39,8 +39,6 @@ CFLAGS := $(subst -fomit-frame-pointer,,

CFLAGS += -fno-omit-frame-pointer
endif

arch/cris/Makefile +0 -2
-HEAD := arch/$(ARCH)/$(SARCH)/kernel/head.o
-

LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)

Quoted 1 line

core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/

When you remove assignment to HEAD you need to replace it with assignment to head-y.

Sam

#8 lore raw

Re: [patch] remove obsolete HEAD in kbuild

Quoted 14 lines · Sam Ravnborg
Quoted 11 lines · Coywolf Qi Hunt

diff -Nrup linux-2.6.8/arch/cris/Makefile linux-2.6.8-cy/arch/cris/Makefile

arch/cris/Makefile +0 -0
@@ -39,8 +39,6 @@ CFLAGS := $(subst -fomit-frame-pointer,,

CFLAGS += -fno-omit-frame-pointer
endif

arch/cris/Makefile +0 -2
-HEAD := arch/$(ARCH)/$(SARCH)/kernel/head.o
-

LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)

Quoted 6 lines
Quoted 3 lines

core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/

When you remove assignment to HEAD you need to replace it with assignment to head-y.

No, we needn't. Some archs do not have head-y. They use core-y for head.o .

Signature · 3 lines
Coywolf Qi Hunt
Homepage http://greatcn.org/~coywolf/
Admin of http://GreatCN.org and http://LoveCN.org
#9 lore raw

Re: [patch] remove obsolete HEAD in kbuild

Quoted 26 lines · Coywolf Qi Hunt
Quoted 16 lines · Sam Ravnborg
Quoted 13 lines · Coywolf Qi Hunt

diff -Nrup linux-2.6.8/arch/cris/Makefile
linux-2.6.8-cy/arch/cris/Makefile

arch/cris/Makefile +0 -0

20:59:30.109679014 -0400

arch/cris/Makefile +0 -0
@@ -39,8 +39,6 @@ CFLAGS := $(subst -fomit-frame-pointer,,

CFLAGS += -fno-omit-frame-pointer
endif

arch/cris/Makefile +0 -2
-HEAD := arch/$(ARCH)/$(SARCH)/kernel/head.o
-

LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)

Quoted 7 lines
Quoted 3 lines

core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/

When you remove assignment to HEAD you need to replace it with assignment to head-y.

Quoted 1 line

No, we needn't. Some archs do not have head-y. They use core-y for head.o .

Looked and could not find it...
Adding head.o to extra-y does not get it compiled in. To compile it in it needs to be listed in obj-y, and do not confuse the three different head.S files.

Sam

#10 lore raw

Re: [patch] remove obsolete HEAD in kbuild

Quoted 6 lines · Sam Ravnborg
Quoted 3 lines · Coywolf Qi Hunt

No, we needn't. Some archs do not have head-y. They use core-y for head.o .

Sorry for my wrongness.

I felt _quit_ sure when I was saying that stupidity in the morning when I just woke up. I was hesitating to look into it, but I didn't. It seemed so real to me then. Maybe I dreamed I found that. It's possible for one who thinks of kernel issuses day to day.

What a shame. I nearly break kbuild on cris. :-(

Quoted 7 lines

Looked and could not find it...
Adding head.o to extra-y does not get it compiled in. To compile it in it needs to be listed in obj-y, and do not confuse the three different head.S files.

Sam

Makefile: remove obsolete HEAD arch/cris/Makefile: replace HEAD with assignment to head-y

Makefile           |    1 -
arch/cris/Makefile |    2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
Makefile +0 -0
diff -Nrup linux-2.6.8/Makefile linux-2.6.8-cy/Makefile
@@ -506,7 +506,6 @@ libs-y		:= $(libs-y1) $(libs-y2)

# normal descending-into-subdirs phase, since at that time
# we cannot yet know if we will need to relink vmlinux.
# So we descend into init/ inside the rule for vmlinux again.
-head-y += $(HEAD)
vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y)

quiet_cmd_vmlinux__ = LD $@

arch/cris/Makefile +0 -0
diff -Nrup linux-2.6.8/arch/cris/Makefile linux-2.6.8-cy/arch/cris/Makefile
@@ -39,7 +39,7 @@ CFLAGS := $(subst -fomit-frame-pointer,,

CFLAGS += -fno-omit-frame-pointer
endif

-HEAD := arch/$(ARCH)/$(SARCH)/kernel/head.o
+head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o

LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)

Signature · 3 lines
Coywolf Qi Hunt
Homepage http://greatcn.org/~coywolf/
Admin of http://GreatCN.org and http://LoveCN.org
Applied
#11 lore raw

Re: [patch] remove obsolete HEAD in kbuild

Quoted 3 lines · Coywolf Qi Hunt

Makefile: remove obsolete HEAD arch/cris/Makefile: replace HEAD with assignment to head-y

Thanks, applied.

Sam