-# $OpenBSD: Makefile.inc,v 1.16 2017/05/30 15:02:22 naddy Exp $
+# $OpenBSD: Makefile.inc,v 1.17 2017/05/30 22:32:10 naddy Exp $
CFLAGS=${DEBUG} ${COPTS} -Os -Wall -Werror
CFLAGS+= -ffreestanding -fno-stack-protector -DMDRANDOM
SACFLAGS+=-nostdinc -fno-builtin -fpack-struct
+.include <bsd.own.mk>
+.if ${COMPILER_VERSION:Mclang}
+NO_INTEGR_AS= -no-integrated-as
+.endif
+
.if !make(clean) && !make(cleandir) && !make(includes) && !make(libdep) && \
!make(sadep) && !make(salibdir) && !make(obj)
.BEGIN:
@([ X$(S) = X -o -h machine ] || ln -s $(S)/arch/amd64/include machine)
assym.h: ${S}/kern/genassym.sh ${SADIR}/etc/genassym.cf
- sh ${S}/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
+ sh ${S}/kern/genassym.sh ${CC} ${NO_INTEGR_AS} ${CFLAGS} ${CPPFLAGS} \
${PARAM} < ${SADIR}/etc/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
.endif
-# $OpenBSD: Makefile,v 1.11 2016/07/30 03:25:48 guenther Exp $
+# $OpenBSD: Makefile,v 1.12 2017/05/30 22:32:10 naddy Exp $
MAN= biosboot.8
CPPFLAGS+=-DLOADADDR=$(LOADADDR) -DLINKADDR=$(LINKADDR) -DBOOTMAGIC=$(BOOTMAGIC)
CPPFLAGS+=${DEBUGFLAGS}
CFLAGS+=-fno-pie
+AFLAGS+=${NO_INTEGR_AS}
AFLAGS+=-m32 # -Wa,-a
AFLAGS+=-fno-pie
.else
-# $OpenBSD: Makefile,v 1.36 2016/09/18 16:34:59 jsing Exp $
+# $OpenBSD: Makefile,v 1.37 2017/05/30 22:32:10 naddy Exp $
COPTS?=
MAN?= boot.8
CPPFLAGS+=-DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE
CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} -I${S}/stand/boot #-DCOMPAT_UFS
CFLAGS+=-m32 $(SACFLAGS) -D__INTERNAL_LIBSA_CREAD -fno-pie
+AFLAGS+=${NO_INTEGR_AS}
AFLAGS+=-m32 # -Wa,-R
# AFLAGS+=-Wa,-a
AFLAGS+=-fno-pie
-# $OpenBSD: Makefile,v 1.32 2016/09/18 16:34:59 jsing Exp $
+# $OpenBSD: Makefile,v 1.33 2017/05/30 22:32:10 naddy Exp $
MAN= cdboot.8
CFLAGS+=-DOSREV=\"${OSREV}\" -DMACHINE=\"${MACHINE}\"
CFLAGS+=-DKERNEL=\"/${OSREV}/${MACHINE}/bsd.rd\"
CFLAGS+=-fno-pie
+AFLAGS+=${NO_INTEGR_AS}
AFLAGS+=-m32
AFLAGS+=-fno-pie
-# $OpenBSD: Makefile,v 1.30 2016/09/18 16:34:59 jsing Exp $
+# $OpenBSD: Makefile,v 1.31 2017/05/30 22:32:10 naddy Exp $
MAN= pxeboot.8
CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} -I${S}/stand/boot #-DCOMPAT_UFS
CFLAGS+=-m32
CFLAGS+=$(SACFLAGS) -D__INTERNAL_LIBSA_CREAD -fno-pie
+AFLAGS+=${NO_INTEGR_AS}
# AFLAGS+=-Wa,-a
AFLAGS+=-m32 # -Wa,-R
AFLAGS+=-fno-pie