Skip to contentSkip to conversation

Patch to fix s390 cross-compilation in 2.4.18

PATCH Pete Zaitcev 2 participants 3 messages Mar 11, 2002 – Mar 15, 2002 s390

lore
Share & tools
lore
#0 lore raw

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

arch/s390/kernel/Makefile +1 -1
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
@@ -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
 
arch/s390/lib/Makefile +1 -6
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
@@ -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
 
arch/s390x/kernel/Makefile +1 -1
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
@@ -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
 
arch/s390x/lib/Makefile +1 -6
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
@@ -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
 
#1 lore raw
Quoted 3 lines · Pete Zaitcev

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.

#2 lore raw
In reply to Pete Zaitcev
Quoted 9 lines

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

Quoted 3 lines

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