Patches to compile the kernel with Intel's C/C++ compiler

Alexander Leidinger Alexander at
Mon Nov 10 13:22:20 PST 2003


at I have some patches
which allow to compile the kernel with icc (CC=icc make depend && CC=icc
make). They are a joint effort of Marius Strobl and me.

The resulting kernel still has some issues (no NFS, some packet loss,
... see icc.README in the above mentioned directory), but it boots and

A quick tour over icc.diff:
 - build infrastructure: just a "translate gcc switches into icc
 - includes: more or less "if gcc" -> "if gcc or intel compiler"
 - assym.h: icc doesn't handle 0 sized arrays like gcc does, the
   patch was suggested by bde, a discussion of this is in the
 - aicasm: understand the icc syntax of -nostdinc
 - stdargh.h and _types.h: the changes are just a reminder to
   enable them when icc understands this particular gcc syntax,
   Intel is working on it

The list of affected files:
        share/mk/                     \
        share/mk/                     \
        share/mk/                     \
        share/mk/                    \
        share/mk/                     \
        share/mk/                         \
        sys/boot/i386/boot2/boot2.c             \
        sys/conf/defines                        \
        sys/conf/                        \
        sys/conf/                   \
        sys/conf/                    \
        sys/conf/                        \
        sys/conf/files                          \
        sys/dev/aic7xxx/aicasm/Makefile         \
        sys/dev/aic7xxx/aicasm/aicasm.c         \
        sys/dev/ichsmb/ichsmb.c                 \
        sys/dev/iir/iir.h                       \
        sys/dev/isp/ispvar.h                    \
        sys/dev/mcd/mcdreg.h                    \
        sys/dev/scd/scdreg.h                    \
        sys/i386/acpica/acpi_wakeup.c           \
        sys/i386/i386/db_interface.c            \
        sys/i386/i386/identcpu.c                \
        sys/i386/include/_types.h               \
        sys/i386/include/atomic.h               \
        sys/i386/include/bus_at386.h            \
        sys/i386/include/cpufunc.h              \
        sys/i386/include/critical.h             \
        sys/i386/include/endian.h               \
        sys/i386/include/ieeefp.h               \
        sys/i386/include/in_cksum.h             \
        sys/i386/include/pcpu.h                 \
        sys/i386/include/profile.h              \
        sys/i386/include/stdarg.h               \
        sys/i386/isa/npx.c                      \
        sys/i386/isa/prof_machdep.c             \
        sys/kern/subr_prof.c                    \
        sys/libkern/quad.h                      \
        sys/netatm/atm_ioctl.h                  \
        sys/sys/assym.h                         \
        sys/sys/cdefs.h                         \
        sys/sys/dir.h                           \
        sys/sys/ioctl.h                         \
        sys/sys/linker_set.h                    \
        sys/sys/queue.h                         \

I run parts of these patches since a long time (months, parts of it over
a year), no bad interactions with a gcc compiled kernel/world so far.


               Speak softly and carry a cellular phone.                       Alexander @

More information about the freebsd-arch mailing list