From owner-freebsd-current Mon Aug 4 13:41:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA25934 for current-outgoing; Mon, 4 Aug 1997 13:41:05 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA25921; Mon, 4 Aug 1997 13:40:57 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id GAA20704; Tue, 5 Aug 1997 06:39:08 +1000 Date: Tue, 5 Aug 1997 06:39:08 +1000 From: Bruce Evans Message-Id: <199708042039.GAA20704@godzilla.zeta.org.au> To: current@FreeBSD.ORG, smp@csn.net Subject: Re: kernel compile broken Cc: msmith@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >loading kernel >bios.o: Undefined symbol `_memcmp' referenced from text segment >*** Error code 1 > >Stop. >------------------------------ cut ----------------------------- > >changing memcmp() to bcmp() in i386/i386/bios.c makes it compile, >not sure if this is correct fix. memcmp isn't supported in the kernel. Using bcmp instead is correct (I forget if the ar order is compatible). This problem is sometimes maked by gcc inlining memcmp() without warning about the missing prototype for it. memcpy is supported in the kernel, although bcopy is normal, so that gcc can generate efficient inline code for small copies. The inline code for bcmp isn't particularly efficient (gcc doesn't do anything special for small counts...) so little would be gained by using it. Bruce