2002-03-11 07:25:51

by Pete Zaitcev

[permalink] [raw]
Subject: Patch to fix s390 cross-compilation in 2.4.18

The s390 cannot be cross-compiled, because necessary -I is missing
from gcc flags of assembler modules. Also I straightened flags up
a little bit (removed duplicated -D__ASSEMBLY__).

-- Pete

diff -ur -X dontdiff linux-2.4.18-0.1.s390/arch/s390/kernel/Makefile linux-2.4.18-0.1-x.s390/arch/s390/kernel/Makefile
--- linux-2.4.18-0.1.s390/arch/s390/kernel/Makefile Thu Oct 11 09:04:57 2001
+++ linux-2.4.18-0.1-x.s390/arch/s390/kernel/Makefile Thu Feb 28 13:24:26 2002
@@ -8,7 +8,7 @@
# Note 2! The CFLAGS definitions are now in the main makefile...

.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c $< -o $*.o
+ $(CC) $(AFLAGS) -traditional -c $< -o $*.o

all: kernel.o head.o init_task.o

diff -ur -X dontdiff linux-2.4.18-0.1.s390/arch/s390/lib/Makefile linux-2.4.18-0.1-x.s390/arch/s390/lib/Makefile
--- linux-2.4.18-0.1.s390/arch/s390/lib/Makefile Wed Apr 11 19:02:28 2001
+++ linux-2.4.18-0.1-x.s390/arch/s390/lib/Makefile Thu Feb 28 13:25:29 2002
@@ -2,13 +2,8 @@
# Makefile for s390-specific library files..
#

-ifdef SMP
.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c $< -o $*.o
-else
-.S.o:
- $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
-endif
+ $(CC) $(AFLAGS) -traditional -c $< -o $*.o

L_TARGET = lib.a

diff -ur -X dontdiff linux-2.4.18-0.1.s390/arch/s390x/kernel/Makefile linux-2.4.18-0.1-x.s390/arch/s390x/kernel/Makefile
--- linux-2.4.18-0.1.s390/arch/s390x/kernel/Makefile Thu Oct 11 09:04:57 2001
+++ linux-2.4.18-0.1-x.s390/arch/s390x/kernel/Makefile Wed Mar 6 19:35:54 2002
@@ -8,7 +8,7 @@
# Note 2! The CFLAGS definitions are now in the main makefile...

.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c $< -o $*.o
+ $(CC) $(AFLAGS) -traditional -c $< -o $*.o

all: kernel.o head.o init_task.o

diff -ur -X dontdiff linux-2.4.18-0.1.s390/arch/s390x/lib/Makefile linux-2.4.18-0.1-x.s390/arch/s390x/lib/Makefile
--- linux-2.4.18-0.1.s390/arch/s390x/lib/Makefile Wed Apr 11 19:02:29 2001
+++ linux-2.4.18-0.1-x.s390/arch/s390x/lib/Makefile Thu Feb 28 13:36:02 2002
@@ -2,13 +2,8 @@
# Makefile for s390-specific library files..
#

-ifdef SMP
.S.o:
- $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c $< -o $*.o
-else
-.S.o:
- $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
-endif
+ $(CC) $(AFLAGS) -traditional -c $< -o $*.o

L_TARGET = lib.a


2002-03-11 08:08:45

by Keith Owens

[permalink] [raw]
Subject: Re: Patch to fix s390 cross-compilation in 2.4.18

On Mon, 11 Mar 2002 02:25:29 -0500,
Pete Zaitcev <[email protected]> wrote:
>The s390 cannot be cross-compiled, because necessary -I is missing
>from gcc flags of assembler modules. Also I straightened flags up
>a little bit (removed duplicated -D__ASSEMBLY__).

Looks good. Could you try without -traditional? I want to know if
that flag is really required or not.

2002-03-15 17:06:03

by Pete Zaitcev

[permalink] [raw]
Subject: Re: Patch to fix s390 cross-compilation in 2.4.18

> From: Keith Owens <[email protected]>
> Date: Mon, 11 Mar 2002 19:08:06 +1100

> >The s390 cannot be cross-compiled, because necessary -I is missing
> >from gcc flags of assembler modules. Also I straightened flags up
> >a little bit (removed duplicated -D__ASSEMBLY__).
>
> Looks good. Could you try without -traditional? I want to know if
> that flag is really required or not.

It is required, because without it cpp blows up on assembler comments
with special characters in them.

Martin, did you apply the patch?

-- Pete

2002-03-18 10:38:12

by BOEBLINGEN LINUX390

[permalink] [raw]
Subject: Re: Patch to fix s390 cross-compilation in 2.4.18


>It is required, because without it cpp blows up on assembler comments
>with special characters in them.
>
>Martin, did you apply the patch?
I did.

blue skies,
Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Sch?naicherstr. 220, D-71032 B?blingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: [email protected]