Makefile.cats.inc revision 1.30
11.28Suebayasi#	$NetBSD: Makefile.cats.inc,v 1.30 2014/11/16 12:02:55 uebayasi 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.16Schs
181.16SchsSYSTEM_LD_HEAD_EXTRA+=; \
191.16Schs	( cat ${ARM}/conf/kern.ldscript.head ; \
201.18Stsutsui	  OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \
211.16Schs		${SYSTEM_OBJ} ; \
221.16Schs	  cat ${ARM}/conf/kern.ldscript.tail ) > ldscript
231.30SuebayasiKERNLDSCRIPT=	${ARM}/conf/kern.ldscript.head \
241.28Suebayasi		$S/conf/mkldscript.sh \
251.28Suebayasi		${ARM}/conf/kern.ldscript.tail
261.3Schris
271.8SskrllSYSTEM_LD_TAIL_EXTRA+=; \
281.25Stsutsui	echo "${OBJCOPY} ${OBJCOPY_ELF2AOUT_FLAGS} $@ $@.aout"; \
291.25Stsutsui	${OBJCOPY} ${OBJCOPY_ELF2AOUT_FLAGS} $@ $@.aout
301.15Schris.endif
31