Skip to contentSkip to conversation

Makefile cleanups and gcc-3.4+binutils-2.14 check

PATCH In review Tom Rini 9 participants 29 messages Jul 28, 2004 – Aug 6, 2004 1 message not in the archive

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 Makefile cleanups and gcc-3.4+binutils-2.14 check

The following patch does three things. First, it removes all instances of:
ifeq ($(CONFIG_FOO),y)
AFLAGS += -Wa,-mfoo
endif

and makes us set them once in arch/ppc/Makefile, via aflags-$(CONFIG_FOO), just like we do for CFLAGS. Next it adds a test for gcc-3.4 and binutils-2.14. The problem with this combination is that the -many flag is broken in binutils-2.14 and gcc-3.4 will pass it down, causing other flags to be overridden and the compile to fail. Changing gcc or binutils versions fixes this. Finally, it changes places in the Makefiles where we did:
ifeq ($(CONFIG_FOO),y)
obj-$(CONFIG_BAR) += foo_bar.o
endif
into
obj-$(CONFIG_FOO) += $(bar-y)
bar-$(CONFIG_BAR) += foo_bar.o

 arch/ppc/Makefile           |   23 ++++++++++++++++-----
 arch/ppc/kernel/Makefile    |   16 +-------------
 arch/ppc/mm/Makefile        |    4 ---
 arch/ppc/platforms/Makefile |   33 ++++++++++--------------------
 arch/ppc/syslib/Makefile    |   47 ++++++++++++++------------------------------
 5 files changed, 46 insertions(+), 77 deletions(-)
arch/ppc/Makefile +18 -5
@@ -22,7 +22,7 @@
 
 LDFLAGS_vmlinux	:= -Ttext $(KERNELLOAD) -Bstatic
 CPPFLAGS	+= -Iarch/$(ARCH)
-AFLAGS		+= -Iarch/$(ARCH)
+aflags-y	+= -Iarch/$(ARCH)
 cflags-y	+= -Iarch/$(ARCH) -msoft-float -pipe \
 		-ffixed-r2 -Wno-uninitialized -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
@@ -31,10 +31,16 @@
 cflags-y	+= -mstring
 endif
 
+aflags-$(CONFIG_4xx)		+= -m405
 cflags-$(CONFIG_4xx)		+= -Wa,-m405
+aflags-$(CONFIG_6xx)		+= -maltivec
+cflags-$(CONFIG_6xx)		+= -Wa,-maltivec
+aflags-$(CONFIG_E500)		+= -me500
 cflags-$(CONFIG_E500)		+= -Wa,-me500
+aflags-$(CONFIG_PPC64BRIDGE)	+= -mppc64bridge
 cflags-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
 
+AFLAGS += $(aflags-y)
 CFLAGS += $(cflags-y)
 
 head-y				:= arch/ppc/kernel/head.o
@@ -106,17 +112,24 @@
 else
 NEW_AS	:= 0
 endif
+# gcc-3.4 and binutils-2.14 are a fatal combination.
+GCC_VERSION	:= $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
+BAD_GCC_AS	:= $(shell echo mftb 5 | $(AS) -mppc -many -o /dev/null >/dev/null 2>&1 && echo 0 || echo 1)
 
-ifneq ($(NEW_AS),0)
 checkbin:
+ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041)
+	@echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '
+	@echo 'correctly with gcc-3.4 and your version of binutils.'
+	@echo '*** Please upgrade your binutils or downgrade your gcc'
+	@false
+endif
+ifneq ($(NEW_AS),0)
 	@echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '
 	@echo 'correctly with old versions of binutils.'
 	@echo '*** Please upgrade your binutils to ${GOODVER} or newer'
 	@false
-else
-checkbin:
-	@true
 endif
+	@true
 
 CLEAN_FILES +=	include/asm-$(ARCH)/offsets.h \
 		arch/$(ARCH)/kernel/asm-offsets.s
arch/ppc/kernel/Makefile +2 -14
@@ -2,16 +2,6 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-ifdef CONFIG_4xx
-EXTRA_AFLAGS		:= -Wa,-m405
-endif
-ifdef CONFIG_E500
-EXTRA_AFLAGS		:= -Wa,-me500
-endif
-
 extra-$(CONFIG_PPC_STD_MMU)	:= head.o
 extra-$(CONFIG_40x)		:= head_4xx.o
 extra-$(CONFIG_44x)		:= head_44x.o
@@ -35,7 +25,5 @@
 obj-$(CONFIG_TAU)		+= temp.o
 obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
 
-ifdef CONFIG_MATH_EMULATION
-obj-$(CONFIG_8xx)		+= softemu8xx.o
-endif
-
+sw-math-emu-$(CONFIG_8xx)	+= softemu8xx.o
+obj-$(CONFIG_MATH_EMULATION)	+= $(sw-math-emu-y)
arch/ppc/mm/Makefile +0 -4
@@ -2,10 +2,6 @@
 # Makefile for the linux ppc-specific parts of the memory manager.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-
 obj-y				:= fault.o init.o mem_pieces.o \
 					mmu_context.o pgtable.o
 
arch/ppc/platforms/Makefile +11 -22
@@ -2,29 +2,23 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-ifdef CONFIG_40x
-EXTRA_AFLAGS		:= -Wa,-m405
-endif
-
 # Extra CFLAGS so we don't have to do relative includes
 CFLAGS_pmac_setup.o	+= -Iarch/$(ARCH)/mm
 
-obj-$(CONFIG_APUS)		+= apus_setup.o
-ifeq ($(CONFIG_APUS),y)
-obj-$(CONFIG_PCI)		+= apus_pci.o
-endif
+# Multiple dependancies
+apus-$(CONFIG_PCI)		+= apus_pci.o
+chrp-$(CONFIG_SMP)		+= chrp_smp.o
+pmac-$(CONFIG_NVRAM)		+= pmac_nvram.o
+pmac-$(CONFIG_CPU_FREQ_PMAC)	+= pmac_cpufreq.o
+pmac-$(CONFIG_SMP)		+= pmac_smp.o
+
+obj-$(CONFIG_APUS)		+= apus_setup.o $(apus-y)
 obj-$(CONFIG_PPC_PMAC)		+= pmac_pic.o pmac_setup.o pmac_time.o \
 					pmac_feature.o pmac_pci.o pmac_sleep.o \
-					pmac_low_i2c.o
-obj-$(CONFIG_PPC_CHRP)		+= chrp_setup.o chrp_time.o chrp_pci.o
+					pmac_low_i2c.o $(pmac-y)
+obj-$(CONFIG_PPC_CHRP)		+= chrp_setup.o chrp_time.o chrp_pci.o \
+					$(chrp-y)
 obj-$(CONFIG_PPC_PREP)		+= prep_pci.o prep_setup.o
-ifeq ($(CONFIG_PPC_PMAC),y)
-obj-$(CONFIG_NVRAM)		+= pmac_nvram.o
-obj-$(CONFIG_CPU_FREQ_PMAC)	+= pmac_cpufreq.o
-endif
 obj-$(CONFIG_PMAC_BACKLIGHT)	+= pmac_backlight.o
 obj-$(CONFIG_PPC_RTAS)		+= error_log.o proc_rtas.o
 obj-$(CONFIG_PREP_RESIDUAL)	+= residual.o
@@ -48,8 +42,3 @@
 obj-$(CONFIG_SANDPOINT)		+= sandpoint.o
 obj-$(CONFIG_SBC82xx)		+= sbc82xx.o
 obj-$(CONFIG_SPRUCE)		+= spruce.o
-
-ifeq ($(CONFIG_SMP),y)
-obj-$(CONFIG_PPC_PMAC)		+= pmac_smp.o
-obj-$(CONFIG_PPC_CHRP)		+= chrp_smp.o
-endif
arch/ppc/syslib/Makefile +15 -32

70 lines not on this page · raw message

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#1 lore raw
Quoted 7 lines · Tom Rini

The following patch does three things. First, it removes all instances of:
ifeq ($(CONFIG_FOO),y)
AFLAGS += -Wa,-mfoo
endif

Quoted 13 lines

and makes us set them once in arch/ppc/Makefile, via aflags-$(CONFIG_FOO), just like we do for CFLAGS. Next it adds a test for gcc-3.4 and binutils-2.14. The problem with this combination is that the -many flag is broken in binutils-2.14 and gcc-3.4 will pass it down, causing other flags to be overridden and the compile to fail. Changing gcc or binutils versions fixes this. Finally, it changes places in the Makefiles where we did:
ifeq ($(CONFIG_FOO),y)
obj-$(CONFIG_BAR) += foo_bar.o
endif
into
obj-$(CONFIG_FOO) += $(bar-y)
bar-$(CONFIG_BAR) += foo_bar.o

Unfortunately this has significant clashes with the mpc52xx bk tree which I'm carrying.

That patch has been sitting around for several weeks now - can we get it merged up first?

author
#2 lore raw
Quoted 22 lines · Andrew Morton
Quoted 7 lines · Tom Rini

The following patch does three things. First, it removes all instances of:
ifeq ($(CONFIG_FOO),y)
AFLAGS += -Wa,-mfoo
endif

Quoted 13 lines

and makes us set them once in arch/ppc/Makefile, via aflags-$(CONFIG_FOO), just like we do for CFLAGS. Next it adds a test for gcc-3.4 and binutils-2.14. The problem with this combination is that the -many flag is broken in binutils-2.14 and gcc-3.4 will pass it down, causing other flags to be overridden and the compile to fail. Changing gcc or binutils versions fixes this. Finally, it changes places in the Makefiles where we did:
ifeq ($(CONFIG_FOO),y)
obj-$(CONFIG_BAR) += foo_bar.o
endif
into
obj-$(CONFIG_FOO) += $(bar-y)
bar-$(CONFIG_BAR) += foo_bar.o

Quoted 5 lines

Unfortunately this has significant clashes with the mpc52xx bk tree which I'm carrying.

That patch has been sitting around for several weeks now - can we get it merged up first?

I talked with Kumar Gala at OLS, and I believe everyone (ppc) is happy with mpc52xx stuff. So yes, that can go out.

I've taken the binutils-2.14+gcc-3.4 bit out (and none of the other cleanups) as it seems like we get 1-2 reports a week from this bad tools combination:

===== arch/ppc/Makefile 1.55 vs edited =====

arch/ppc/Makefile +11 -4
@@ -106,17 +106,24 @@
 else
 NEW_AS	:= 0
 endif
+# gcc-3.4 and binutils-2.14 are a fatal combination.
+GCC_VERSION	:= $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
+BAD_GCC_AS	:= $(shell echo mftb 5 | $(AS) -mppc -many -o /dev/null >/dev/null 2>&1 && echo 0 || echo 1)
 
-ifneq ($(NEW_AS),0)
 checkbin:
+ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041)
+	@echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '
+	@echo 'correctly with gcc-3.4 and your version of binutils.'
+	@echo '*** Please upgrade your binutils or downgrade your gcc'
+	@false
+endif
+ifneq ($(NEW_AS),0)
 	@echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '
 	@echo 'correctly with old versions of binutils.'
 	@echo '*** Please upgrade your binutils to ${GOODVER} or newer'
 	@false
-else
-checkbin:
-	@true
 endif
+	@true
 
 CLEAN_FILES +=	include/asm-$(ARCH)/offsets.h \
 		arch/$(ARCH)/kernel/asm-offsets.s
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#3 lore raw
Quoted 3 lines · Tom Rini

I talked with Kumar Gala at OLS, and I believe everyone (ppc) is happy with mpc52xx stuff. So yes, that can go out.

OK, well could someone pease send Linus a pull request on that tree?

#4 lore raw

Hi

Quoted 11 lines · Andrew Morton
Quoted 4 lines · Tom Rini

I talked with Kumar Gala at OLS, and I believe everyone (ppc) is happy with mpc52xx stuff. So yes, that can go out.

OK, well could someone pease send Linus a pull request on that tree?

Tom is pushing it into for-linus-ppc and will try to get Linus to pull it from there.

Originally when I saw -rc1 was out I just thought I would wait unti 2.6.8 to post the update and get it merged.

Sylvain Munaut

PS: Sorry for the delay, bad mail filters made me miss the messages ;(

#5 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

In reply to Tom Rini
Quoted 3 lines · On 28-Jul-2004 Tom Rini wrote:

I've taken the binutils-2.14+gcc-3.4 bit out (and none of the other cleanups) as it seems like we get 1-2 reports a week from this bad tools combination:

I had no time to do a lot of testing, but it seems that binutils 2.15 + gcc 3.3.3 is a bad one too. I didn't try to compile the kernel (which may also break), but at least I couldn't compile gcc 3.4.1 with the above combination. It seems that as doesn't get the -mxxx parameter required to compile altivec stuff. Hacking the Makefile to make it pass -Wa,-m7455 helped a little, but it eventually failed in another weird way. I hadn't time to investigate further, sorry.

--
Giuliano.

author
#6 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 6 lines · Giuliano Pochini
Quoted 3 lines · On 28-Jul-2004 Tom Rini wrote:

I've taken the binutils-2.14+gcc-3.4 bit out (and none of the other cleanups) as it seems like we get 1-2 reports a week from this bad tools combination:

Quoted 7 lines

I had no time to do a lot of testing, but it seems that binutils 2.15 + gcc 3.3.3 is a bad one too. I didn't try to compile the kernel (which may also break), but at least I couldn't compile gcc 3.4.1 with the above combination. It seems that as doesn't get the -mxxx parameter required to compile altivec stuff. Hacking the Makefile to make it pass -Wa,-m7455 helped a little, but it eventually failed in another weird way. I hadn't time to investigate further, sorry.

Stock gcc-3.3.3 or from the hammer branch? There is, I think, a second problem that was left out. The problem with gcc-3.4 + binutils-2.14 is that -many gets passed, which zeros out previous flags. -many is fine in binutils-2.15 (and 2.13 and 2.12 and 2.12.1 it seems), but 2.15 does require -maltivec to be passed in order to handle altivec instructions. Getting this right was part of the cleanup that conflicted with the mpc52xx changes (Andrew: trying to take care of getting this into Linus' tree now).

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#7 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 9 lines · On Thu, 29 Jul 2004 07:43:47 -0700 Tom Rini <[email protected]> wrote:
Quoted 7 lines

I had no time to do a lot of testing, but it seems that binutils 2.15 + gcc 3.3.3 is a bad one too. I didn't try to compile the kernel (which may also break), but at least I couldn't compile gcc 3.4.1 with the above combination. It seems that as doesn't get the -mxxx parameter required to compile altivec stuff. Hacking the Makefile to make it pass -Wa,-m7455 helped a little, but it eventually failed in another weird way. I hadn't time to investigate further, sorry.

Stock gcc-3.3.3 or from the hammer branch ?

Stock.

Quoted 8 lines

There is, I think, a second
problem that was left out. The problem with gcc-3.4 + binutils-2.14 is that -many gets passed, which zeros out previous flags. -many is fine in binutils-2.15 (and 2.13 and 2.12 and 2.12.1 it seems), but 2.15 does require -maltivec to be passed in order to handle altivec instructions. Getting this right was part of the cleanup that conflicted with the mpc52xx changes (Andrew: trying to take care of getting this into Linus' tree now).

Ah, ok, this is useful to know. Btw, I compiled linux 2.6.7 with gcc 3.4.1 and binutils 2.15 without problems.

--
Giuliano.

author
#8 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 10 lines · Giuliano Pochini
Quoted 8 lines · On Thu, 29 Jul 2004 07:43:47 -0700 Tom Rini <[email protected]> wrote:
Quoted 7 lines

I had no time to do a lot of testing, but it seems that binutils 2.15 + gcc 3.3.3 is a bad one too. I didn't try to compile the kernel (which may also break), but at least I couldn't compile gcc 3.4.1 with the above combination. It seems that as doesn't get the -mxxx parameter required to compile altivec stuff. Hacking the Makefile to make it pass -Wa,-m7455 helped a little, but it eventually failed in another weird way. I hadn't time to investigate further, sorry.

Quoted 3 lines
Quoted 1 line

Stock gcc-3.3.3 or from the hammer branch ?

Stock.

That is interesting. Olaf, is gcc-3.3.x + binutils-2.15 one of the combinations you've got in your matrix of toolchains?

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#9 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 13 lines · On Fri, 30 Jul 2004 12:07:31 -0700 Tom Rini <[email protected]> wrote:
Quoted 10 lines · Giuliano Pochini
Quoted 8 lines · On Thu, 29 Jul 2004 07:43:47 -0700 Tom Rini <[email protected]> wrote:
Quoted 7 lines

I had no time to do a lot of testing, but it seems that binutils 2.15 + gcc 3.3.3 is a bad one too. I didn't try to compile the kernel (which may also break), but at least I couldn't compile gcc 3.4.1 with the above combination. It seems that as doesn't get the -mxxx parameter required to compile altivec stuff. Hacking the Makefile to make it pass -Wa,-m7455 helped a little, but it eventually failed in another weird way. I hadn't time to investigate further, sorry.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Stock gcc-3.3.3 or from the hammer branch ?

Stock.

That is interesting.

Actually, I don't know what the "hammer" thing is. I downloaded gcc from one
of the gcc.gnu.org mirrors: IIRC ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-3.4.1

Quoted 2 lines

Olaf, is gcc-3.3.x + binutils-2.15 one of the combinations you've got in your matrix of toolchains?

gcc 3.3.3 + binutils 2.15 fails quite soon here:

AS arch/ppc/kernel/l2cr.o
arch/ppc/kernel/l2cr.S: Assembler messages:
arch/ppc/kernel/l2cr.S:110: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:278: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:387: Error: Unrecognized opcode: `dssall' make[1]: *** [arch/ppc/kernel/l2cr.o] Error 1

--
Giuliano.

author
#10 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

On Fri, Jul 30, 2004 at 10:48:28PM +0200, Giuliano Pochini wrote:

[snip]

Quoted 8 lines

gcc 3.3.3 + binutils 2.15 fails quite soon here:

AS arch/ppc/kernel/l2cr.o
arch/ppc/kernel/l2cr.S: Assembler messages:
arch/ppc/kernel/l2cr.S:110: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:278: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:387: Error: Unrecognized opcode: `dssall' make[1]: *** [arch/ppc/kernel/l2cr.o] Error 1

Can you try with the following?

===== arch/ppc/Makefile 1.57 vs edited =====

arch/ppc/Makefile +7 -1
@@ -22,7 +22,7 @@
 
 LDFLAGS_vmlinux	:= -Ttext $(KERNELLOAD) -Bstatic
 CPPFLAGS	+= -Iarch/$(ARCH)
-AFLAGS		+= -Iarch/$(ARCH)
+aflags-y	+= -Iarch/$(ARCH)
 cflags-y	+= -Iarch/$(ARCH) -msoft-float -pipe \
 		-ffixed-r2 -Wno-uninitialized -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
@@ -33,10 +33,16 @@
 cflags-y	+= -mstring
 endif
 
+aflags-$(CONFIG_4xx)		+= -m405
 cflags-$(CONFIG_4xx)		+= -Wa,-m405
+aflags-$(CONFIG_6xx)		+= -maltivec
+cflags-$(CONFIG_6xx)		+= -Wa,-maltivec
+aflags-$(CONFIG_E500)		+= -me500
 cflags-$(CONFIG_E500)		+= -Wa,-me500
+aflags-$(CONFIG_PPC64BRIDGE)	+= -mppc64bridge
 cflags-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
 
+AFLAGS += $(aflags-y)
 CFLAGS += $(cflags-y)
 
 head-y				:= arch/ppc/kernel/head.o
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#11 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 13 lines · On Fri, 30 Jul 2004 14:03:18 -0700 Tom Rini <[email protected]> wrote:

On Fri, Jul 30, 2004 at 10:48:28PM +0200, Giuliano Pochini wrote:

[snip]

Quoted 8 lines

gcc 3.3.3 + binutils 2.15 fails quite soon here:

AS arch/ppc/kernel/l2cr.o
arch/ppc/kernel/l2cr.S: Assembler messages:
arch/ppc/kernel/l2cr.S:110: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:278: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:387: Error: Unrecognized opcode: `dssall' make[1]: *** [arch/ppc/kernel/l2cr.o] Error 1

Quoted 2 lines

Can you try with the following ?
[...]

It doesn't apply to plain 2.6.7. What version I have to use ?

--
Giuliano.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

author
#12 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 16 lines · Giuliano Pochini
Quoted 13 lines · On Fri, 30 Jul 2004 14:03:18 -0700 Tom Rini <[email protected]> wrote:

On Fri, Jul 30, 2004 at 10:48:28PM +0200, Giuliano Pochini wrote:

[snip]

Quoted 8 lines

gcc 3.3.3 + binutils 2.15 fails quite soon here:

AS arch/ppc/kernel/l2cr.o
arch/ppc/kernel/l2cr.S: Assembler messages:
arch/ppc/kernel/l2cr.S:110: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:278: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:387: Error: Unrecognized opcode: `dssall' make[1]: *** [arch/ppc/kernel/l2cr.o] Error 1

Quoted 4 lines
Quoted 2 lines

Can you try with the following ?
[...]

It doesn't apply to plain 2.6.7. What version I have to use ?

That was against then-current 2.6 bk, but might have been OK vs -rc2. It is also part of now-current 2.6 bk, so if you can get that..

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#13 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

In reply to Tom Rini

Hi alltogether!

Quoted 6 lines · Tom Rini

On Fri, Jul 30, 2004 at 10:48:28PM +0200, Giuliano Pochini wrote:

[snip]

Quoted 2 lines

gcc 3.3.3 + binutils 2.15 fails quite soon here:

Quoted 8 lines
Quoted 6 lines

AS arch/ppc/kernel/l2cr.o
arch/ppc/kernel/l2cr.S: Assembler messages:
arch/ppc/kernel/l2cr.S:110: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:278: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:387: Error: Unrecognized opcode: `dssall' make[1]: *** [arch/ppc/kernel/l2cr.o] Error 1

Can you try with the following?

I had to apply this patch to get 2.6.8-rc2 compiled on debian unstable (3.3.4-2 and binutils 2.15-1). I think ths patch should make it into 2.6.8.

With best regards,

Wolfi

Quoted 38 lines

===== arch/ppc/Makefile 1.57 vs edited =====

arch/ppc/Makefile +7 -2
@@ -22,7 +22,7 @@
 
 LDFLAGS_vmlinux	:= -Ttext $(KERNELLOAD) -Bstatic
 CPPFLAGS	+= -Iarch/$(ARCH)
-AFLAGS		+= -Iarch/$(ARCH)
+aflags-y	+= -Iarch/$(ARCH)
 cflags-y	+= -Iarch/$(ARCH) -msoft-float -pipe \
 		-ffixed-r2 -Wno-uninitialized -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
@@ -33,10 +33,16 @@
 cflags-y	+= -mstring
 endif
 
+aflags-$(CONFIG_4xx)		+= -m405
 cflags-$(CONFIG_4xx)		+= -Wa,-m405
+aflags-$(CONFIG_6xx)		+= -maltivec
+cflags-$(CONFIG_6xx)		+= -Wa,-maltivec
+aflags-$(CONFIG_E500)		+= -me500
 cflags-$(CONFIG_E500)		+= -Wa,-me500
+aflags-$(CONFIG_PPC64BRIDGE)	+= -mppc64bridge
 cflags-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
 
+AFLAGS += $(aflags-y)
 CFLAGS += $(cflags-y)
 
 head-y				:= arch/ppc/kernel/head.o
 
--

Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#14 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

In reply to Tom Rini
Quoted 6 lines · Tom Rini

On Fri, Jul 30, 2004 at 10:48:28PM +0200, Giuliano Pochini wrote:

[snip]

Quoted 2 lines

gcc 3.3.3 + binutils 2.15 fails quite soon here:

Quoted 8 lines
Quoted 6 lines

AS arch/ppc/kernel/l2cr.o
arch/ppc/kernel/l2cr.S: Assembler messages:
arch/ppc/kernel/l2cr.S:110: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:278: Error: Unrecognized opcode: dssall' arch/ppc/kernel/l2cr.S:387: Error: Unrecognized opcode: `dssall' make[1]: *** [arch/ppc/kernel/l2cr.o] Error 1

Can you try with the following?

Doesn't apply against 2.6.8-rc3. For what it's worth, I've attached a version that does. Cheers,
-- Guido

ppc/Makefile renamed from linux-2.6.8-rc3.orig/arch/ppc/Makefile +7 -1
@@ -15,14 +15,20 @@
 
 LDFLAGS_vmlinux	:= -Ttext $(KERNELLOAD) -Bstatic
 CPPFLAGS	+= -Iarch/$(ARCH)
-AFLAGS		+= -Iarch/$(ARCH)
+aflags-y	+= -Iarch/$(ARCH)
 cflags-y	+= -Iarch/$(ARCH) -msoft-float -pipe \
 		-ffixed-r2 -Wno-uninitialized -mmultiple -mstring
 CPP		= $(CC) -E $(CFLAGS)
 
+aflags-$(CONFIG_4xx)		+= -m405
 cflags-$(CONFIG_4xx)		+= -Wa,-m405
+aflags-$(CONFIG_6xx)		+= -maltivec
+cflags-$(CONFIG_6xx)		+= -Wa,-maltivec
+aflags-$(CONFIG_E500)		+= -me500
+aflags-$(CONFIG_PPC64BRIDGE)	+= -mppc64bridge
 cflags-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
 
+AFLAGS += $(aflags-y)
 CFLAGS += $(cflags-y)
 
 
#15 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 3 lines · Guido Guenther
Quoted 2 lines · Tom Rini
Quoted 1 line · Giuliano Pochini

gcc 3.3.3 + binutils 2.15 fails quite soon here:

[..snip..]

Quoted 2 lines
Quoted 1 line

Can you try with the following?

Doesn't apply against 2.6.8-rc3. For what it's worth, I've attached a version that does.

Forget about that one, wrong tree.
-- Guido

#16 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

In reply to Tom Rini
Quoted 2 lines · Tom Rini

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

this should be -Wa,-mppc64bridge for some reasons.

Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
author
#17 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 6 lines · Olaf Hering
Quoted 2 lines · Tom Rini

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#18 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 9 lines · Tom Rini
Quoted 6 lines · Olaf Hering
Quoted 2 lines · Tom Rini

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

The cmdline was 'gcc .. -mppc64bridge ..'
But there is more breakage with g5 32bit, I'm looking at it right now.

Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
author
#19 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 6 lines · Olaf Hering
Quoted 4 lines · Tom Rini
Quoted 3 lines · Olaf Hering
Quoted 1 line · Tom Rini
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

The cmdline was 'gcc .. -mppc64bridge ..'
But there is more breakage with g5 32bit, I'm looking at it right now.

Hmm. Was cflags-... done correctly?

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#20 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 9 lines · Tom Rini
Quoted 8 lines · Olaf Hering
Quoted 6 lines · Tom Rini
Quoted 5 lines · Olaf Hering
Quoted 2 lines · Tom Rini

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

The cmdline was 'gcc .. -mppc64bridge ..'
But there is more breakage with g5 32bit, I'm looking at it right now.

Hmm. Was cflags-... done correctly?

I have currently no idea whats going on with the cflags. power3 and g5 fails for me with current binutils and hammer branch.

g5 needs the altivec option, because -maltivec -mppc64bridge will disable altivec again in as. And arch/ppc/kernel/Makefile adds -mppc64bridge after the cflags in arch/ppc/Makefile. Maybe the EXTRA_CFLAGS can be removed from arch/ppc/kernel/Makefile?

plain rc3 with g5 32bit (and power3) .config gives this:

gcc -m32 -Wp,-MD,usr/.initramfs_data.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iarch/ppc -D__ASSEMBLY__ -Iarch/ppc -mppc64bridge -c -o usr/initramfs_data.o usr/initramfs_data.S
cc1: error: invalid option `ppc64bridge'

this comes from aflags-$(CONFIG_PPC64BRIDGE) in arch/ppc/Makefile

Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
author
#21 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 20 lines · Olaf Hering
Quoted 9 lines · Tom Rini
Quoted 8 lines · Olaf Hering
Quoted 6 lines · Tom Rini
Quoted 5 lines · Olaf Hering
Quoted 2 lines · Tom Rini

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

The cmdline was 'gcc .. -mppc64bridge ..'
But there is more breakage with g5 32bit, I'm looking at it right now.

Hmm. Was cflags-... done correctly?

Quoted 7 lines

I have currently no idea whats going on with the cflags. power3 and g5 fails for me with current binutils and hammer branch.

g5 needs the altivec option, because -maltivec -mppc64bridge will disable altivec again in as. And arch/ppc/kernel/Makefile adds -mppc64bridge after the cflags in arch/ppc/Makefile. Maybe the EXTRA_CFLAGS can be removed from arch/ppc/kernel/Makefile?

EXTRA_CFLAGS can go, yes (I was assuming -rc2 then -final, or I would have done this already_. The problem looks like AFLAGS being used when CFLAGS are wanted to be used.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#22 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

In reply to Tom Rini
Quoted 9 lines · Tom Rini
Quoted 6 lines · Olaf Hering
Quoted 2 lines · Tom Rini

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

This makes g5 32bit happy. aflags- is used with 'gcc $options', not for as I'm not sure if the other aflags- should stay.

g5 has altivec, some include files use dsall in asm(). head.S will not compile without -maltivevec

arch/ppc/Makefile +1 -1
diff -purNX /tmp/kernel_exclude.txt linux-2.6.8-rc3.orig/arch/ppc/Makefile linux-2.6.8-rc3/arch/ppc/Makefile
@@ -39,8 +39,8 @@ aflags-$(CONFIG_6xx)		+= -maltivec
 cflags-$(CONFIG_6xx)		+= -Wa,-maltivec
 aflags-$(CONFIG_E500)		+= -me500
 cflags-$(CONFIG_E500)		+= -Wa,-me500
-aflags-$(CONFIG_PPC64BRIDGE)	+= -mppc64bridge
 cflags-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
+cflags-$(CONFIG_POWER4)		+= -Wa,-maltivec
 
 AFLAGS += $(aflags-y)
 CFLAGS += $(cflags-y)
arch/ppc/kernel/Makefile +3 -0
diff -purNX /tmp/kernel_exclude.txt linux-2.6.8-rc3.orig/arch/ppc/kernel/Makefile linux-2.6.8-rc3/arch/ppc/kernel/Makefile
@@ -5,6 +5,9 @@
 ifdef CONFIG_PPC64BRIDGE
 EXTRA_AFLAGS		:= -Wa,-mppc64bridge
 endif
+ifdef CONFIG_POWER4
+EXTRA_AFLAGS		:= -Wa,-maltivec
+endif
 ifdef CONFIG_4xx
 EXTRA_AFLAGS		:= -Wa,-m405
 endif
Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
author
#23 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 6 lines · Olaf Hering
Quoted 4 lines · Tom Rini
Quoted 3 lines · Olaf Hering
Quoted 1 line · Tom Rini
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

This makes g5 32bit happy. aflags- is used with 'gcc $options', not for as I'm not sure if the other aflags- should stay.

I mistook AFLAGS for being always invoked with gas, which is not the case. Lets do the following:

arch/ppc/Makefile +10 -13
@@ -22,28 +22,25 @@
 
 LDFLAGS_vmlinux	:= -Ttext $(KERNELLOAD) -Bstatic
 CPPFLAGS	+= -Iarch/$(ARCH)
-aflags-y	+= -Iarch/$(ARCH)
-cflags-y	+= -Iarch/$(ARCH) -msoft-float -pipe \
+AFLAGS		+= -Iarch/$(ARCH)
+CFLAGS		+= -Iarch/$(ARCH) -msoft-float -pipe \
 		-ffixed-r2 -Wno-uninitialized -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
 
 CHECK		:= $(CHECK) -D__powerpc__=1
 
 ifndef CONFIG_E500
-cflags-y	+= -mstring
+CFLAGS		+= -mstring
 endif
 
-aflags-$(CONFIG_4xx)		+= -m405
-cflags-$(CONFIG_4xx)		+= -Wa,-m405
-aflags-$(CONFIG_6xx)		+= -maltivec
-cflags-$(CONFIG_6xx)		+= -Wa,-maltivec
-aflags-$(CONFIG_E500)		+= -me500
-cflags-$(CONFIG_E500)		+= -Wa,-me500
-aflags-$(CONFIG_PPC64BRIDGE)	+= -mppc64bridge
-cflags-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
+cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
+cpu-as-$(CONFIG_6xx)		+= -Wa,-maltivec
+cpu-as-$(CONFIG_POWER4)		+= -Wa,-maltivec
+cpu-as-$(CONFIG_E500)		+= -Wa,-me500
+cpu-as-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
 
-AFLAGS += $(aflags-y)
-CFLAGS += $(cflags-y)
+AFLAGS += $(cpu-as-y)
+CFLAGS += $(cpu-as-y)
 
 head-y				:= arch/ppc/kernel/head.o
 head-$(CONFIG_8xx)		:= arch/ppc/kernel/head_8xx.o
arch/ppc/kernel/Makefile +0 -10
@@ -2,16 +2,6 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-ifdef CONFIG_4xx
-EXTRA_AFLAGS		:= -Wa,-m405
-endif
-ifdef CONFIG_E500
-EXTRA_AFLAGS		:= -Wa,-me500
-endif
-
 extra-$(CONFIG_PPC_STD_MMU)	:= head.o
 extra-$(CONFIG_40x)		:= head_4xx.o
 extra-$(CONFIG_44x)		:= head_44x.o
arch/ppc/mm/Makefile +0 -4
@@ -2,10 +2,6 @@
 # Makefile for the linux ppc-specific parts of the memory manager.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-
 obj-y				:= fault.o init.o mem_pieces.o \
 					mmu_context.o pgtable.o
 
arch/ppc/platforms/Makefile +0 -7
@@ -2,13 +2,6 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-ifdef CONFIG_40x
-EXTRA_AFLAGS		:= -Wa,-m405
-endif
-
 # Extra CFLAGS so we don't have to do relative includes
 CFLAGS_pmac_setup.o	+= -Iarch/$(ARCH)/mm
 
arch/ppc/syslib/Makefile +0 -10
@@ -2,16 +2,6 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-ifdef CONFIG_4xx
-EXTRA_AFLAGS		:= -Wa,-m405
-endif
-ifdef CONFIG_E500
-EXTRA_AFLAGS		:= -Wa,-me500
-endif
-
 CFLAGS_prom_init.o      += -fPIC
 CFLAGS_btext.o          += -fPIC
 
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#24 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

Quoted 3 lines · Tom Rini

I mistook AFLAGS for being always invoked with gas, which is not the case.

Correct, AFLAGS is kbuild internal. AFLAGS is used only for .S -> .o and for .S -> .s

Quoted 1 line

Lets do the following:

Yup - looks better with cpu-as-

Sam

#25 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

In reply to Tom Rini
Quoted 14 lines · Tom Rini
Quoted 12 lines · Olaf Hering
Quoted 9 lines · Tom Rini
Quoted 6 lines · Olaf Hering
Quoted 2 lines · Tom Rini

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

Quoted 7 lines
Quoted 2 lines

This makes g5 32bit happy. aflags- is used with 'gcc $options', not for as I'm not sure if the other aflags- should stay.

I mistook AFLAGS for being always invoked with gas, which is not the case. Lets do the following:

This fixed the build problems (unrecognized -m405) with a PPC440 native toolchain.

-Matt

#26 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

In reply to Tom Rini
Quoted 13 lines · Tom Rini
Quoted 12 lines · Olaf Hering
Quoted 9 lines · Tom Rini
Quoted 6 lines · Olaf Hering
Quoted 2 lines · Tom Rini

+aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge

this should be -Wa,-mppc64bridge for some reasons.

That, er, doesn't make sense. The assembler needs -Wa,?

Quoted 7 lines
Quoted 2 lines

This makes g5 32bit happy. aflags- is used with 'gcc $options', not for as I'm not sure if the other aflags- should stay.

I mistook AFLAGS for being always invoked with gas, which is not the case. Lets do the following:

and this one to enable altivec, because ppc64bridge disables altivec again.
g5 32bit has CONFIG_POWER4=y and CONFIG_PPC64BRIDGE=y

arch/ppc/Makefile +1 -1
diff -purNX /tmp/kernel_exclude.txt linux-2.6.8-rc3.trini/arch/ppc/Makefile linux-2.6.8-rc3.trini.fixed/arch/ppc/Makefile
@@ -35,9 +35,9 @@ endif
 
 cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
 cpu-as-$(CONFIG_6xx)		+= -Wa,-maltivec
-cpu-as-$(CONFIG_POWER4)		+= -Wa,-maltivec
 cpu-as-$(CONFIG_E500)		+= -Wa,-me500
 cpu-as-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
+cpu-as-$(CONFIG_POWER4)		+= -Wa,-maltivec
 
 AFLAGS += $(cpu-as-y)
 CFLAGS += $(cpu-as-y)
Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#28 lore raw

PATCH 1/1 ppc32: Fix building of certain CPU types (Was: Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14)

Quoted 7 lines · Jens Schmalzing

Hi,

Quoted 2 lines · Tom Rini

I mistook AFLAGS for being always invoked with gas, which is not the case. Lets do the following:

Quoted 6 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+cpu-as-$(CONFIG_POWER4)		+= -Wa,-maltivec
+cpu-as-$(CONFIG_E500)		+= -Wa,-me500
+cpu-as-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge

These three lines should be the other way round for a successful build on a G5.

Done.

The following corrects how we pass CPU flags to gas. Previous, AFLAGS was incorrectly assumed to be pased directly to $(AS), which is not the case.

Concept ack'd by Sam Ravnborg.

arch/ppc/Makefile +10 -13
@@ -22,28 +22,25 @@
 
 LDFLAGS_vmlinux	:= -Ttext $(KERNELLOAD) -Bstatic
 CPPFLAGS	+= -Iarch/$(ARCH)
-aflags-y	+= -Iarch/$(ARCH)
-cflags-y	+= -Iarch/$(ARCH) -msoft-float -pipe \
+AFLAGS		+= -Iarch/$(ARCH)
+CFLAGS		+= -Iarch/$(ARCH) -msoft-float -pipe \
 		-ffixed-r2 -Wno-uninitialized -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
 
 CHECK		:= $(CHECK) -D__powerpc__=1
 
 ifndef CONFIG_E500
-cflags-y	+= -mstring
+CFLAGS		+= -mstring
 endif
 
-aflags-$(CONFIG_4xx)		+= -m405
-cflags-$(CONFIG_4xx)		+= -Wa,-m405
-aflags-$(CONFIG_6xx)		+= -maltivec
-cflags-$(CONFIG_6xx)		+= -Wa,-maltivec
-aflags-$(CONFIG_E500)		+= -me500
-cflags-$(CONFIG_E500)		+= -Wa,-me500
-aflags-$(CONFIG_PPC64BRIDGE)	+= -mppc64bridge
-cflags-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
+cpu-as-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
+cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
+cpu-as-$(CONFIG_6xx)		+= -Wa,-maltivec
+cpu-as-$(CONFIG_POWER4)		+= -Wa,-maltivec
+cpu-as-$(CONFIG_E500)		+= -Wa,-me500
 
-AFLAGS += $(aflags-y)
-CFLAGS += $(cflags-y)
+AFLAGS += $(cpu-as-y)
+CFLAGS += $(cpu-as-y)
 
 head-y				:= arch/ppc/kernel/head.o
 head-$(CONFIG_8xx)		:= arch/ppc/kernel/head_8xx.o
arch/ppc/kernel/Makefile +0 -10
@@ -2,16 +2,6 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-ifdef CONFIG_4xx
-EXTRA_AFLAGS		:= -Wa,-m405
-endif
-ifdef CONFIG_E500
-EXTRA_AFLAGS		:= -Wa,-me500
-endif
-
 extra-$(CONFIG_PPC_STD_MMU)	:= head.o
 extra-$(CONFIG_40x)		:= head_4xx.o
 extra-$(CONFIG_44x)		:= head_44x.o
arch/ppc/mm/Makefile +0 -4
@@ -2,10 +2,6 @@
 # Makefile for the linux ppc-specific parts of the memory manager.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-
 obj-y				:= fault.o init.o mem_pieces.o \
 					mmu_context.o pgtable.o
 
arch/ppc/platforms/Makefile +0 -7
@@ -2,13 +2,6 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-ifdef CONFIG_40x
-EXTRA_AFLAGS		:= -Wa,-m405
-endif
-
 # Extra CFLAGS so we don't have to do relative includes
 CFLAGS_pmac_setup.o	+= -Iarch/$(ARCH)/mm
 
arch/ppc/syslib/Makefile +0 -10
@@ -2,16 +2,6 @@
 # Makefile for the linux kernel.
 #
 
-ifdef CONFIG_PPC64BRIDGE
-EXTRA_AFLAGS		:= -Wa,-mppc64bridge
-endif
-ifdef CONFIG_4xx
-EXTRA_AFLAGS		:= -Wa,-m405
-endif
-ifdef CONFIG_E500
-EXTRA_AFLAGS		:= -Wa,-me500
-endif
-
 CFLAGS_prom_init.o      += -fPIC
 CFLAGS_btext.o          += -fPIC
 
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#29 lore raw

Re: [PATCH][PPC32] Makefile cleanups and gcc-3.4+binutils-2.14 c

In reply to Tom Rini
Quoted 12 lines · Tom Rini
Quoted 10 lines · Giuliano Pochini
Quoted 8 lines · On Thu, 29 Jul 2004 07:43:47 -0700 Tom Rini <[email protected]> wrote:
Quoted 7 lines

I had no time to do a lot of testing, but it seems that binutils 2.15 + gcc 3.3.3 is a bad one too. I didn't try to compile the kernel (which may also break), but at least I couldn't compile gcc 3.4.1 with the above combination. It seems that as doesn't get the -mxxx parameter required to compile altivec stuff. Hacking the Makefile to make it pass -Wa,-m7455 helped a little, but it eventually failed in another weird way. I hadn't time to investigate further, sorry.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Stock gcc-3.3.3 or from the hammer branch ?

Stock.

That is interesting. Olaf, is gcc-3.3.x + binutils-2.15 one of the combinations you've got in your matrix of toolchains?

yes, it worked ok for kernel builds. gcc-3_3-branch + binutils 2.15

Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG