From c4f9714d6376e1a9fbfed6fbcb883ceb4982e8d3 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 8 Jun 2009 22:37:03 +0200 Subject: [PATCH] second: because of mess between gcc and as: remove cpu directive and use the default provided by gcc (68020). Add rules to manage 68040 and 68030 assembly files in the Makefile. Classic will wait later... Signed-off-by: Laurent Vivier --- second/Makefile | 15 +++++++++------ second/{MMU030_asm.S => asm_MMU030.S} | 2 -- second/{MMU040_asm.S => asm_MMU040.S} | 2 -- second/enter_kernel030.S | 2 -- second/enter_kernel040.S | 2 -- second/enter_kernelnoMMU.S | 2 -- second/head.S | 2 -- second/switch_to_PPC.S | 2 -- 8 files changed, 9 insertions(+), 20 deletions(-) rename second/{MMU030_asm.S => asm_MMU030.S} (99%) rename second/{MMU040_asm.S => asm_MMU040.S} (99%) diff --git a/second/Makefile b/second/Makefile index 582ed1e..7a0c257 100644 --- a/second/Makefile +++ b/second/Makefile @@ -48,8 +48,8 @@ OBJS = $(patsubst %.c,%.o,$(SOURCES:.S=.o)) $(SOURCES_CLI:.c=.o) \ # ARCHITECTURE -SOURCES_MMU030 = MMU030_asm.S MMU030.c enter_kernel030.S -SOURCES_MMU040 = MMU040_asm.S MMU040.c enter_kernel040.S +SOURCES_MMU030 = asm_MMU030.S MMU030.c enter_kernel030.S +SOURCES_MMU040 = asm_MMU040.S MMU040.c enter_kernel040.S SOURCES_MMU = $(SOURCES_MMU030) $(SOURCES_MMU040) SOURCES_noMMU = enter_kernelnoMMU.S SOURCES_M68K = $(SOURCES_MMU) $(SOURCES_noMMU) @@ -77,7 +77,7 @@ ifeq ("$(TARGET)", "m68k-linux") OBJS_TARGET = $(OBJS_M68K) $(OBJS_LINUX_M68K) CPPFLAGS_TARGET = -D__LINUX__ -DARCH_M68K -DUSE_MMU030 -DUSE_MMU040 - CFLAGS_TARGET = -m68020 -Wa,-m68020 -Os + CFLAGS_TARGET = -Os else ifeq ("$(TARGET)", "classic-linux") @@ -91,21 +91,21 @@ ifeq ("$(TARGET)", "ppc-linux") OBJS_TARGET = $(OBJS_PPC) $(OBJS_LINUX_PPC) CPPFLAGS_TARGET = -D__LINUX__ -DARCH_PPC - CFLAGS_TARGET = -m68020 -Wa,-m68020 -Os + CFLAGS_TARGET = -Os else ifeq ("$(TARGET)", "mixed-linux") OBJS_TARGET = $(OBJS_M68K) $(OBJS_LINUX_M68K) $(OBJS_PPC) $(OBJS_LINUX_PPC) CPPFLAGS_TARGET = -D__LINUX__ -DARCH_M68K -DUSE_MMU030 -DUSE_MMU040 -DARCH_PPC - CFLAGS_TARGET = -m68020 -Wa,-m68020 -Os + CFLAGS_TARGET = -Os else ifeq ("$(TARGET)", "m68k-netbsd") OBJS_TARGET = $(OBJS_M68K) $(OBJS_NETBSD_M68K) CPPFLAGS_TARGET = -D__NETBSD__ -DARCH_M68K -DUSE_MMU030 -DUSE_MMU040 - CFLAGS_TARGET = -m68020 -Wa,-m68020 -Os + CFLAGS_TARGET = -Os endif endif @@ -180,6 +180,9 @@ endif .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ +%030.o: %030.S; $(CC) $(CPPFLAGS) $(CFLAGS) -m68030 -c -o $@ $^ +%040.o: %040.S; $(CC) $(CPPFLAGS) $(CFLAGS) -m68040 -c -o $@ $^ + install:: install -d $(DESTDIR)/$(PREFIX)/boot/emile/ install $(KARCH)-linux-scsi/second $(DESTDIR)/$(PREFIX)/boot/emile/$(KARCH)-second_scsi diff --git a/second/MMU030_asm.S b/second/asm_MMU030.S similarity index 99% rename from second/MMU030_asm.S rename to second/asm_MMU030.S index 037d372..0e8f5e0 100644 --- a/second/MMU030_asm.S +++ b/second/asm_MMU030.S @@ -4,8 +4,6 @@ * */ - .cpu 68030 - .global MMU030_disable_cache MMU030_disable_cache: lea 0x0808, %a0 diff --git a/second/MMU040_asm.S b/second/asm_MMU040.S similarity index 99% rename from second/MMU040_asm.S rename to second/asm_MMU040.S index e230d20..4b9102f 100644 --- a/second/MMU040_asm.S +++ b/second/asm_MMU040.S @@ -4,8 +4,6 @@ * */ - .cpu 68040 - .global MMU040_disable_cache MMU040_disable_cache: moveq.l #0, %d0 diff --git a/second/enter_kernel030.S b/second/enter_kernel030.S index 226eadd..f00de86 100644 --- a/second/enter_kernel030.S +++ b/second/enter_kernel030.S @@ -4,8 +4,6 @@ * */ - .cpu 68030 - .include "copymem.i" .align 4 diff --git a/second/enter_kernel040.S b/second/enter_kernel040.S index acfcc9b..88555c1 100644 --- a/second/enter_kernel040.S +++ b/second/enter_kernel040.S @@ -4,8 +4,6 @@ * */ - .cpu 68040 - .include "copymem.i" .align 4 diff --git a/second/enter_kernelnoMMU.S b/second/enter_kernelnoMMU.S index f308ba6..1b30a67 100644 --- a/second/enter_kernelnoMMU.S +++ b/second/enter_kernelnoMMU.S @@ -3,8 +3,6 @@ * (c) 2004-2007 Laurent Vivier * */ - .cpu 68000 - .include "copymem.i" .align 4 diff --git a/second/head.S b/second/head.S index 58af3ae..f960bde 100644 --- a/second/head.S +++ b/second/head.S @@ -4,8 +4,6 @@ * */ - .cpu 68000 - .include "../first/macos.i" #if defined(APPLE_DRIVER) diff --git a/second/switch_to_PPC.S b/second/switch_to_PPC.S index 6d7aa16..7f20ba9 100644 --- a/second/switch_to_PPC.S +++ b/second/switch_to_PPC.S @@ -5,8 +5,6 @@ * */ - .cpu 68020 - .equ PC, 0x00FC .equ GPR, 0x0100 .equ FPR, 0x0200