freebsd-src/sys
Tom Rhodes a122cca953 These are changes to allow to use the Intel C/C++ compiler (lang/icc)
to build the kernel. It doesn't affect the operation if gcc.

Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as
icc v8 may define __GNUC__ some parts may look strange but are
necessary.

Additional changes:
 - in_cksum.[ch]:
   * use a generic C version instead of the assembly version in the !gcc
     case (ASM code breaks with the optimizations icc does)
     -> no bad checksums with an icc compiled kernel
     Help from:		andre, grehan, das
     Stolen from: 	alpha version via ppc version
     The entire checksum code should IMHO be replaced with the DragonFly
     version (because it isn't guaranteed future revisions of gcc will
     include similar optimizations) as in:
        ---snip---
          Revision  Changes    Path
          1.12      +1 -0      src/sys/conf/files.i386
          1.4       +142 -558  src/sys/i386/i386/in_cksum.c
          1.5       +33 -69    src/sys/i386/include/in_cksum.h
          1.5       +2 -0      src/sys/netinet/igmp.c
          1.6       +0 -1      src/sys/netinet/in.h
          1.6       +2 -0      src/sys/netinet/ip_icmp.c

          1.4       +3 -4      src/contrib/ipfilter/ip_compat.h
          1.3       +1 -2      src/sbin/natd/icmp.c
          1.4       +0 -1      src/sbin/natd/natd.c
          1.48      +1 -0      src/sys/conf/files
          1.2       +0 -1      src/sys/conf/files.amd64
          1.13      +0 -1      src/sys/conf/files.i386
          1.5       +0 -1      src/sys/conf/files.pc98
          1.7       +1 -1      src/sys/contrib/ipfilter/netinet/fil.c
          1.10      +2 -3      src/sys/contrib/ipfilter/netinet/ip_compat.h
          1.10      +1 -1      src/sys/contrib/ipfilter/netinet/ip_fil.c
          1.7       +1 -1      src/sys/dev/netif/txp/if_txp.c
          1.7       +1 -1      src/sys/net/ip_mroute/ip_mroute.c
          1.7       +1 -2      src/sys/net/ipfw/ip_fw2.c
          1.6       +1 -2      src/sys/netinet/igmp.c
          1.4       +158 -116  src/sys/netinet/in_cksum.c
          1.6       +1 -1      src/sys/netinet/ip_gre.c
          1.7       +1 -2      src/sys/netinet/ip_icmp.c
          1.10      +1 -1      src/sys/netinet/ip_input.c
          1.10      +1 -2      src/sys/netinet/ip_output.c
          1.13      +1 -2      src/sys/netinet/tcp_input.c
          1.9       +1 -2      src/sys/netinet/tcp_output.c
          1.10      +1 -1      src/sys/netinet/tcp_subr.c
          1.10      +1 -1      src/sys/netinet/tcp_syncache.c
          1.9       +1 -2      src/sys/netinet/udp_usrreq.c

          1.5       +1 -2      src/sys/netinet6/ipsec.c
          1.5       +1 -2      src/sys/netproto/ipsec/ipsec.c
          1.5       +1 -1      src/sys/netproto/ipsec/ipsec_input.c
          1.4       +1 -2      src/sys/netproto/ipsec/ipsec_output.c

          and finally remove
            sys/i386/i386        in_cksum.c
            sys/i386/include     in_cksum.h
        ---snip---
 - endian.h:
   * DTRT in C++ mode
 - quad.h:
   * we don't use gcc v1 anymore, remove support for it
   Suggested by:	bde (long ago)
 - assym.h:
   * avoid zero-length arrays (remove dependency on a gcc specific
     feature)
     This change changes the contents of the object file, but as it's
     only used to generate some values for a header, and the generator
     knows how to handle this, there's no impact in the gcc case.
   Explained by:	bde
   Submitted by:	Marius Strobl <marius@alchemy.franken.de>
 - aicasm.c:
   * minor change to teach it about the way icc spells "-nostdinc"
   Not approved by:	gibbs (no reply to my mail)
 - bump __FreeBSD_version (lang/icc needs to know about the changes)

Incarnations of this patch survive gcc compiles since a loooong time,
I use it on my desktop. An icc compiled kernel works since Nov. 2003
(exceptions: snd_* if used as modules), it survives a build of the
entire ports collection with icc.

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by:	-arch
Submitted by:	netchild
2004-03-12 21:45:33 +00:00
..
alpha Retire pmap_pinit2(). Alpha was the last platform that used it. However, 2004-03-07 21:06:48 +00:00
amd64 These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
arm Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 2003-09-25 01:10:26 +00:00
boot These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
cam Compare the *number* of patterns to zero, not the *pointer* to the 2004-02-28 12:59:56 +00:00
coda Device megapatch 5/6: 2004-02-21 21:32:15 +00:00
compat Remove unused second arg to vfinddev(). 2004-03-11 16:33:11 +00:00
conf This are the build infrastructure changes to allow to use the 2004-03-12 21:36:12 +00:00
contrib Remove `$Name$' leftovers from the port version reporting. 2004-03-10 15:08:21 +00:00
crypto Fix a reentrancy issue in md5_calc(). 2004-01-27 18:57:21 +00:00
ddb Give DDB a "watchdog" command which disables all watchdogs. 2004-02-29 09:55:32 +00:00
dev These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
fs When I was a kid my work table was one cluttered mess an cleaning it up 2004-03-11 18:50:33 +00:00
geom Be more insistent on destroying geoms at unload time. Still not perfect, 2004-03-11 08:16:23 +00:00
gnu Properly vector all bwrite() and BUF_WRITE() calls through the same path 2004-03-11 18:02:36 +00:00
i4b Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
i386 These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
ia64 Identify the Deerfield processor. Deerfield is a low-voltage variant 2004-03-10 22:23:20 +00:00
isa Remove unused FDNUMTOUNIT() macro 2004-02-29 10:21:40 +00:00
isofs/cd9660 Remove unused second arg to vfinddev(). 2004-03-11 16:33:11 +00:00
kern These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
libkern These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
modules Link pf to the build and install: 2004-03-08 22:03:29 +00:00
net Add clone_setup() function rather than rely on lazy initialization. 2004-03-11 12:58:55 +00:00
net80211 Change WI_RID_SCAN_RES compatibility interface to return the result after 2004-01-19 05:25:43 +00:00
netatalk Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netatm These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
netgraph Add a netgraph node to handle ATM LLC encapsulation. This currently handles 2004-03-08 10:54:35 +00:00
netinet Lock down IP-layer encapsulation library: 2004-03-10 02:48:50 +00:00
netinet6 Move the AH algorithm list from a static local function variable to 2004-03-10 04:56:54 +00:00
netipsec Fix type in a sysctl. It used to be: net.key.prefered_oldsa 2004-02-16 17:09:53 +00:00
netipx Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netkey avoid duplicate free. 2004-01-25 17:18:12 +00:00
netnatm Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netncp Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
netsmb Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
nfs University of Michigan's Citi NFSv4 kernel client code. 2003-11-14 20:54:10 +00:00
nfs4client Properly vector all bwrite() and BUF_WRITE() calls through the same path 2004-03-11 18:02:36 +00:00
nfsclient Allow kernel with the BOOTP option to boot when DHCP/BOOTP sets the root 2004-03-12 20:37:40 +00:00
nfsserver Properly vector all bwrite() and BUF_WRITE() calls through the same path 2004-03-11 18:02:36 +00:00
opencrypto kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
pc98 Restore CDIOCREADAUDIO ioctl. 2004-03-07 14:16:42 +00:00
pccard Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
pci Stop setting ifp->if_output to ether_output() since ether_ifattach() 2004-03-11 14:04:59 +00:00
posix4 The sem_timedwait() and ksem_timedwait() functions both 2004-02-03 22:27:03 +00:00
powerpc Retire pmap_pinit2(). Alpha was the last platform that used it. However, 2004-03-07 21:06:48 +00:00
rpc Convert from timeout to callout API. 2004-03-07 16:23:03 +00:00
security Define BPFD_LOCK_ASSERT() to assert the BPF descriptor lock. 2004-02-29 15:33:56 +00:00
sparc64 Change time_t from a 32-bit value to a 64-bit value, on FreeBSD/sparc64 2004-03-10 17:39:05 +00:00
sys These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
tools Attempt to clean up the emu10k1-alsa.h stuff so that config doesn't 2004-02-05 22:51:16 +00:00
ufs When I was a kid my work table was one cluttered mess an cleaning it up 2004-03-11 18:50:33 +00:00
vm Part 2 of rev 1.68. Update comment to match reality now that vm_endcopy 2004-03-12 00:16:48 +00:00
Makefile Replaced outdated comment. 2004-01-17 03:28:27 +00:00