Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/cats/conf Define the rule to generate the dynamic `...



details:   https://anonhg.NetBSD.org/src/rev/6f823f0747a3
branches:  trunk
changeset: 810122:6f823f0747a3
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Wed Aug 19 04:15:22 2015 +0000

description:
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.

diffstat:

 sys/arch/cats/conf/Makefile.cats.inc |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r e4a388016eb6 -r 6f823f0747a3 sys/arch/cats/conf/Makefile.cats.inc
--- a/sys/arch/cats/conf/Makefile.cats.inc      Wed Aug 19 03:39:45 2015 +0000
+++ b/sys/arch/cats/conf/Makefile.cats.inc      Wed Aug 19 04:15:22 2015 +0000
@@ -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 @@
 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}



Home | Main Index | Thread Index | Old Index