06d6e4fcfe
Intel C/C++ compiler (lang/icc) to build the kernel. The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but doesn't abort. They also produce CPU specific code (new instructions of the CPU, not only CPU specific scheduling), so if you get coredumps with signal 4 (SIGILL, illegal instruction) you've used the wrong CPUTYPE. Incarnations of this patch survive gcc compiles and my make universe. I use it on my desktop. To use it update share/mk, add /usr/local/intel/compiler70/ia32/bin (icc v7, works) or /usr/local/intel_cc_80/bin (icc v8, doesn't work) to your PATH, make sure you have a new kernel compile directory (e.g. MYKERNEL_icc) and run CFLAGS="-O2 -ip" CC=icc make depend CFLAGS="-O2 -ip" CC=icc make in it. Don't compile with -ipo, the build infrastructure uses ld directly to link the kernel and the modules, but -ipo needs the link step to be performed with Intel's linker. Problems with icc v8: - panic: npx0 cannot be emulated on an SMP system - UP: first start of /bin/sh results in a FP exception Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: silence on -arch Submitted by: netchild
47 lines
917 B
Makefile
47 lines
917 B
Makefile
#
|
|
# $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aicasm/Makefile#2 $
|
|
#
|
|
# $FreeBSD$
|
|
|
|
PROG= aicasm
|
|
|
|
CSRCS= aicasm.c aicasm_symbol.c
|
|
YSRCS= aicasm_gram.y aicasm_macro_gram.y
|
|
LSRCS= aicasm_scan.l aicasm_macro_scan.l
|
|
|
|
GENHDRS= aicasm_gram.h aicasm_macro_gram.h
|
|
|
|
SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSRCS}
|
|
CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
|
|
DPADD= ${LIBL}
|
|
LDADD= -ll
|
|
|
|
# Correct path for kernel builds
|
|
# Don't rely on the kernel's .depend file
|
|
.ifdef MAKESRCPATH
|
|
.PATH: ${MAKESRCPATH}
|
|
DEPENDFILE=
|
|
.endif
|
|
|
|
.if ${CC} == "icc"
|
|
CFLAGS+= -restrict
|
|
NOSTDINC= -X
|
|
.else
|
|
NOSTDINC= -nostdinc
|
|
.endif
|
|
CFLAGS+= ${NOSTDINC} -I/usr/include -I.
|
|
.ifdef MAKESRCPATH
|
|
CFLAGS+= -I${MAKESRCPATH}
|
|
.endif
|
|
NOMAN= noman
|
|
YFLAGS= -b ${.TARGET:R} ${.TARGET:M*macro*:S/$(.TARGET)/-p mm/} -d
|
|
LFLAGS+= ${.TARGET:M*macro*:S/$(.TARGET)/-Pmm/}
|
|
|
|
.ifdef AICASM_DEBUG
|
|
CFLAGS+= -DDEBUG -g
|
|
YFLAGS+= -t -v
|
|
LFLAGS+= -d
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|