diff options
-rw-r--r-- | src/arch/i386/Config.lb | 16 | ||||
-rw-r--r-- | src/config/Config.lb | 18 |
2 files changed, 16 insertions, 18 deletions
diff --git a/src/arch/i386/Config.lb b/src/arch/i386/Config.lb index bb5202bc45..e9b426cc2d 100644 --- a/src/arch/i386/Config.lb +++ b/src/arch/i386/Config.lb @@ -1,4 +1,5 @@ uses CONFIG_SMP +uses CONFIG_USE_INIT init init/crt0.S.lb ldscript init/ldscript.lb @@ -29,6 +30,21 @@ end addaction clean "rm -f romimage payload.*" +if CONFIG_USE_INIT +makerule init.o + depends "$(INIT-OBJECTS)" + action "$(LD) -melf_i386 -r -o init.pre.o $(INIT-OBJECTS)" + action "$(OBJCOPY) --rename-section .text=.init.text --rename-section .data=.init.data --rename-section .rodata=.init.rodata --rename-section .rodata.str1.1=.init.rodata.str1.1 init.pre.o init.o" +end + +makerule linuxbios + depends "crt0.o init.o linuxbios_ram.rom ldscript.ld" + action "$(CC) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o init.o" + action "$(CROSS_COMPILE)nm -n linuxbios | sort > linuxbios.map" +end + +end + dir lib dir boot if CONFIG_SMP diff --git a/src/config/Config.lb b/src/config/Config.lb index 6a4b284f9d..70fc96de41 100644 --- a/src/config/Config.lb +++ b/src/config/Config.lb @@ -1,7 +1,6 @@ ## This is Architecture independant part of the makefile uses HAVE_OPTION_TABLE -uses CONFIG_USE_INIT makedefine CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E makedefine LIBGCC_FILE_NAME := $(shell $(CC) -print-libgcc-file-name) @@ -64,29 +63,12 @@ makerule linuxbios_ram.rom action "cp $(LINUXBIOS_RAM-1) linuxbios_ram.rom" end -if CONFIG_USE_INIT -makerule init.o - depends "$(INIT-OBJECTS)" - action "$(LD) -melf_i386 -r -o init.pre.o $(INIT-OBJECTS)" - action "$(OBJCOPY) --rename-section .text=.init.text --rename-section .data=.init.data --rename-section .rodata=.init.rodata --rename-section .rodata.str1.1=.init.rodata.str1.1 init.pre.o init.o" -end - -makerule linuxbios - depends "crt0.o init.o linuxbios_ram.rom ldscript.ld" - action "$(CC) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o init.o" - action "$(CROSS_COMPILE)nm -n linuxbios | sort > linuxbios.map" -end - -else - makerule linuxbios depends "crt0.o $(INIT-OBJECTS) linuxbios_ram.rom ldscript.ld" action "$(CC) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o $(INIT-OBJECTS)" action "$(CROSS_COMPILE)nm -n linuxbios | sort > linuxbios.map" end -end - makerule linuxbios.a depends "$(OBJECTS)" action "rm -f linuxbios.a" |