Module Name: src Committed By: uebayasi Date: Wed Aug 19 04:15:22 UTC 2015
Modified Files: src/sys/arch/cats/conf: Makefile.cats.inc Log Message: Define the rule to generate the dynamic `ldscript', depending on ${SYSTEM_OBJS} properly. Don't forget cleaning the generated `ldscript'. One less ${SYSTEM_LD_HEAD_EXTRA} use as a bonus. No binary changes in ldscript/kernel files are observed. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/cats/conf/Makefile.cats.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/cats/conf/Makefile.cats.inc diff -u src/sys/arch/cats/conf/Makefile.cats.inc:1.31 src/sys/arch/cats/conf/Makefile.cats.inc:1.32 --- src/sys/arch/cats/conf/Makefile.cats.inc:1.31 Tue Nov 25 12:02:20 2014 +++ src/sys/arch/cats/conf/Makefile.cats.inc Wed Aug 19 04:15:22 2015 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile.cats.inc,v 1.31 2014/11/25 12:02:20 skrll Exp $ +# $NetBSD: Makefile.cats.inc,v 1.32 2015/08/19 04:15:22 uebayasi Exp $ MACHINE_ARCH?= arm CPPFLAGS+= -D${MACHINE} .if defined(ABLEELF) && (${ABLEELF} == "1") # use a standard ELF format, adjusted to align areas -LINKSCRIPT= -T ${THISARM}/conf/ldscript.elf +KERNLDSCRIPT= ${THISARM}/conf/ldscript.elf .else # Need to convert the kernel from ELF to a.out so that the firmware @@ -16,16 +16,22 @@ CFLAGS+= -fno-unwind-tables LINKSCRIPT= -T ldscript LOADADDRESS= 0xF0000020 -SYSTEM_LD_HEAD_EXTRA+=; \ +KERNLDSCRIPT= ldscript +EXTRA_CLEAN+= ${KERNLDSCRIPT} + +ldscript: \ + ${ARM}/conf/kern.ldscript.head \ + ${ARM}/conf/kern.ldscript.tail \ + $S/conf/mkldscript.sh \ + ${SYSTEM_OBJ} ( cat ${ARM}/conf/kern.ldscript.head ; \ OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \ ${SYSTEM_OBJ} ; \ cat ${ARM}/conf/kern.ldscript.tail ) > ldscript -KERNLDSCRIPT= ${ARM}/conf/kern.ldscript.head \ - $S/conf/mkldscript.sh \ - ${ARM}/conf/kern.ldscript.tail SYSTEM_LD_TAIL_EXTRA+=; \ echo "${OBJCOPY} ${OBJCOPY_ELF2AOUT_FLAGS} $@ $@.aout"; \ ${OBJCOPY} ${OBJCOPY_ELF2AOUT_FLAGS} $@ $@.aout .endif + +LINKSCRIPT= -T ${KERNLDSCRIPT}