diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha index 1929b4d7e239..df48d84770fb 100644 --- a/sys/conf/Makefile.alpha +++ b/sys/conf/Makefile.alpha @@ -90,9 +90,6 @@ __reml.S: $S/$M/$M/divrem.m4 @(echo "define(NAME,\`__reml')define(OP,\`rem')define(S,\`true')"; \ echo "define(WORDSIZE,32)"; cat ${.ALLSRC}) | m4 > ${.TARGET} -locore.o: $S/$M/$M/locore.s assym.s - ${NORMAL_S} - %RULES .include "$S/conf/kern.post.mk" diff --git a/sys/conf/Makefile.amd64 b/sys/conf/Makefile.amd64 index 59b57ef1ab78..77bbc37ca45b 100644 --- a/sys/conf/Makefile.amd64 +++ b/sys/conf/Makefile.amd64 @@ -45,9 +45,6 @@ MKMODULESENV+= MACHINE=x86_64 %CLEAN -locore.o: $S/$M/$M/locore.s assym.s - ${NORMAL_S} - %RULES .include "$S/conf/kern.post.mk" diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index c6ff5db6df52..62e871c3c478 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -44,9 +44,6 @@ MKMODULESENV+= MACHINE=i386 %CLEAN -locore.o: $S/$M/$M/locore.s assym.s - ${NORMAL_S} - %RULES .include "$S/conf/kern.post.mk" diff --git a/sys/conf/Makefile.ia64 b/sys/conf/Makefile.ia64 index 5e9b216ef611..8aee4f51c8c4 100644 --- a/sys/conf/Makefile.ia64 +++ b/sys/conf/Makefile.ia64 @@ -48,9 +48,6 @@ ASM_CFLAGS= -x assembler-with-cpp -Wa,-x -DLOCORE ${CFLAGS} %CLEAN -locore.o: $S/$M/$M/locore.s assym.s - ${NORMAL_S} - %RULES .include "$S/conf/kern.post.mk" diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98 index 440d85b0b3a9..0e5d57ac0aee 100644 --- a/sys/conf/Makefile.pc98 +++ b/sys/conf/Makefile.pc98 @@ -45,9 +45,6 @@ MKMODULESENV+= MACHINE=pc98 %CLEAN -locore.o: $S/$M/$M/locore.s assym.s - ${NORMAL_S} - %RULES .include "$S/conf/kern.post.mk" diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 8e22e0496123..ef481082552c 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -35,8 +35,6 @@ S= ../../.. COPTS+= -msoft-float -SYSTEM_SFILES= $S/$M/$M/locore.S - %BEFORE_DEPEND %OBJS diff --git a/sys/conf/Makefile.sparc64 b/sys/conf/Makefile.sparc64 index 719e9ce46f4b..8666315dbfcf 100644 --- a/sys/conf/Makefile.sparc64 +++ b/sys/conf/Makefile.sparc64 @@ -30,9 +30,7 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -SYSTEM_SFILES= $S/$M/$M/locore.S $S/$M/$M/exception.S $S/$M/$M/interrupt.S -SYSTEM_OBJS= locore.o exception.o interrupt.o vnode_if.o ${OBJS} hints.o \ - env.o config.o hack.So majors.o +MDOBJS= exception.o interrupt.o %BEFORE_DEPEND @@ -46,15 +44,6 @@ SYSTEM_OBJS= locore.o exception.o interrupt.o vnode_if.o ${OBJS} hints.o \ %CLEAN -exception.o: $S/$M/$M/exception.S assym.s - ${NORMAL_S} - -interrupt.o: $S/$M/$M/interrupt.S assym.s - ${NORMAL_S} - -locore.o: $S/$M/$M/locore.S assym.s - ${NORMAL_S} - %RULES .include "$S/conf/kern.post.mk" diff --git a/sys/conf/files.alpha b/sys/conf/files.alpha index 9f38b0d6db95..4f5203c032d3 100644 --- a/sys/conf/files.alpha +++ b/sys/conf/files.alpha @@ -69,9 +69,7 @@ alpha/alpha/fp_emulate.c standard alpha/alpha/ieee_float.c standard alpha/alpha/in_cksum.c optional inet alpha/alpha/interrupt.c standard -# locore.s needs to be handled in Makefile to put it first. Otherwise it's -# now normal. -# alpha/alpha/locore.s standard +alpha/alpha/locore.s standard no-obj alpha/alpha/machdep.c standard alpha/alpha/mem.c standard alpha/alpha/pmap.c standard diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index cc2584632666..2845f1bf680f 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -45,9 +45,7 @@ x86_64/x86_64/i686_mem.c standard x86_64/x86_64/identcpu.c standard x86_64/x86_64/initcpu.c standard x86_64/x86_64/k6_mem.c standard -# locore.s needs to be handled in Makefile to put it first. Otherwise it's -# now normal. -# x86_64/x86_64/locore.s standard +x86_64/x86_64/locore.s standard no-obj x86_64/x86_64/machdep.c standard x86_64/x86_64/mem.c standard x86_64/x86_64/nexus.c standard diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 0b4459b90702..a89c4aa7cb74 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -211,9 +211,7 @@ i386/i386/in_cksum.c optional inet i386/i386/initcpu.c standard i386/i386/k6_mem.c standard i386/i386/legacy.c standard -# locore.s needs to be handled in Makefile to put it first. Otherwise it's -# now normal. -# i386/i386/locore.s standard +i386/i386/locore.s standard no-obj i386/i386/machdep.c standard i386/i386/math_emulate.c optional math_emulate i386/i386/mem.c standard diff --git a/sys/conf/files.ia64 b/sys/conf/files.ia64 index dd9dd5a22cbf..7a7fb26a277b 100644 --- a/sys/conf/files.ia64 +++ b/sys/conf/files.ia64 @@ -41,9 +41,7 @@ ia64/ia64/elf_machdep.c standard ia64/ia64/exception.s standard ia64/ia64/in_cksum.c optional inet ia64/ia64/interrupt.c standard -# locore.s needs to be handled in Makefile to put it first. Otherwise it's -# now normal. -# ia64/ia64/locore.s standard +ia64/ia64/locore.s standard no-obj ia64/ia64/machdep.c standard ia64/ia64/mca.c standard ia64/ia64/mem.c standard diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98 index 900967ad82e9..de002484790e 100644 --- a/sys/conf/files.pc98 +++ b/sys/conf/files.pc98 @@ -177,9 +177,7 @@ i386/i386/in_cksum.c optional inet i386/i386/initcpu.c standard i386/i386/k6_mem.c standard i386/i386/legacy.c standard -# locore.s needs to be handled in Makefile to put it first. Otherwise it's -# now normal. -# i386/i386/locore.s standard +i386/i386/locore.s standard no-obj i386/i386/math_emulate.c optional math_emulate i386/i386/mem.c standard i386/i386/mp_clock.c optional smp diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index b6b6bd05c427..e5131d44653d 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -25,6 +25,7 @@ powerpc/powerpc/fuswintr.c standard powerpc/powerpc/in_cksum.c optional inet powerpc/powerpc/interrupt.c standard powerpc/powerpc/intr_machdep.c standard +powerpc/powerpc/locore.S standard no-obj powerpc/powerpc/machdep.c standard powerpc/powerpc/nexus.c standard powerpc/powerpc/ofwmagic.S standard diff --git a/sys/conf/files.sparc64 b/sys/conf/files.sparc64 index 8b16895812f0..8f8ff7480e44 100644 --- a/sys/conf/files.sparc64 +++ b/sys/conf/files.sparc64 @@ -45,19 +45,17 @@ sparc64/sparc64/db_trace.c optional ddb sparc64/sparc64/db_hwwatch.c optional ddb sparc64/sparc64/dump_machdep.c standard sparc64/sparc64/elf_machdep.c standard -# locore.S and exception.S need to be handled in the Makefile to put them -# first. Otherwise they're normal. -# sparc64/sparc64/locore.S standard -# sparc64/sparc64/exception.S standard -# sparc64/sparc64/interrupt.S standard +sparc64/sparc64/exception.S standard no-obj sparc64/sparc64/eeprom.c optional eeprom sparc64/sparc64/eeprom_ebus.c optional eeprom ebus sparc64/sparc64/eeprom_fhc.c optional eeprom fhc sparc64/sparc64/eeprom_sbus.c optional eeprom sbus sparc64/sparc64/identcpu.c standard sparc64/sparc64/in_cksum.c optional inet +sparc64/sparc64/interrupt.S standard no-obj sparc64/sparc64/intr_machdep.c standard sparc64/sparc64/iommu.c standard +sparc64/sparc64/locore.S standard no-obj sparc64/sparc64/machdep.c standard sparc64/sparc64/mem.c standard sparc64/sparc64/mp_exception.S optional smp diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index f1e2ceb16950..c7f212b27494 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -116,12 +116,12 @@ GEN_M_CFILES= ${MFILES:T:S/.m$/.c/} # pass it to mkdep. _kernel-depend: assym.s vnode_if.h miidevs.h ${BEFORE_DEPEND} \ ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${GEN_M_CFILES} \ - ${SFILES} ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} + ${SFILES} ${MFILES:T:S/.m$/.h/} if [ -f .olddep ]; then mv .olddep .depend; fi rm -f .newdep ${MAKE} -V CFILES -V SYSTEM_CFILES -V GEN_CFILES -V GEN_M_CFILES | \ MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS} - ${MAKE} -V SFILES -V SYSTEM_SFILES | \ + ${MAKE} -V SFILES | \ MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ASM_CFLAGS} rm -f .depend mv .newdep .depend diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 63987d69a1ec..cde1afb49698 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -63,11 +63,11 @@ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c GEN_CFILES= $S/$M/$M/genassym.c -SYSTEM_CFILES= vnode_if.c hints.c env.c config.c -SYSTEM_SFILES= $S/$M/$M/locore.s +SYSTEM_CFILES= config.c env.c hints.c majors.c vnode_if.c SYSTEM_DEP= Makefile ${SYSTEM_OBJS} -SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} hints.o env.o config.o hack.So -SYSTEM_OBJS+= majors.o +SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} +SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} +SYSTEM_OBJS+= hack.So SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \ -warn-common -export-dynamic -dynamic-linker /red/herring \ -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o