Makefile.cats.inc revision 1.31
11.31Sskrll#	$NetBSD: Makefile.cats.inc,v 1.31 2014/11/25 12:02:20 skrll Exp $
21.13Sthorpej
31.26SmattMACHINE_ARCH?=	arm
41.13SthorpejCPPFLAGS+=	-D${MACHINE}
51.3Schris
61.15Schris.if defined(ABLEELF) && (${ABLEELF} == "1")
71.15Schris# use a standard ELF format, adjusted to align areas
81.29SuebayasiLINKSCRIPT=	-T ${THISARM}/conf/ldscript.elf
91.15Schris
101.15Schris.else
111.12Schris# Need to convert the kernel from ELF to a.out so that the firmware
121.5Sthorpej# can load it.
131.3Schris
141.27SskrllCFLAGS+=	-fno-unwind-tables
151.27Sskrll
161.29SuebayasiLINKSCRIPT=	-T ldscript
171.31SskrllLOADADDRESS=	0xF0000020
181.16Schs
191.16SchsSYSTEM_LD_HEAD_EXTRA+=; \
201.16Schs	( cat ${ARM}/conf/kern.ldscript.head ; \
211.18Stsutsui	  OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \
221.16Schs		${SYSTEM_OBJ} ; \
231.16Schs	  cat ${ARM}/conf/kern.ldscript.tail ) > ldscript
241.30SuebayasiKERNLDSCRIPT=	${ARM}/conf/kern.ldscript.head \
251.28Suebayasi		$S/conf/mkldscript.sh \
261.28Suebayasi		${ARM}/conf/kern.ldscript.tail
271.3Schris
281.8SskrllSYSTEM_LD_TAIL_EXTRA+=; \
291.25Stsutsui	echo "${OBJCOPY} ${OBJCOPY_ELF2AOUT_FLAGS} $@ $@.aout"; \
301.25Stsutsui	${OBJCOPY} ${OBJCOPY_ELF2AOUT_FLAGS} $@ $@.aout
311.15Schris.endif
32