1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

Fixed "misspelling" of bcmp as memcmp. memcmp doesn't exist in the

kernel, but gcc provides a pessimal builtin for it.

Makefile.i386:
Added a variable (CONF_CFLAGS) for configuration-specific compiler flags.

LINT:
Use CONF_CFLAGS to inhibit use of gcc builtins.
This commit is contained in:
Bruce Evans 1999-10-03 07:09:31 +00:00
parent bc8427c52d
commit 503e666658
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51898
8 changed files with 38 additions and 5 deletions

View File

@ -67,6 +67,10 @@ PROF+= -mprofiler-epilogue
.endif
.endif
# Put configuration-specific C flags last (except for ${PROF}) so that they
# can override the others.
CFLAGS+= ${CONF_CFLAGS}
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<

View File

@ -67,6 +67,10 @@ PROF+= -mprofiler-epilogue
.endif
.endif
# Put configuration-specific C flags last (except for ${PROF}) so that they
# can override the others.
CFLAGS+= ${CONF_CFLAGS}
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<

View File

@ -30,7 +30,13 @@ maxusers 10
#
# The `makeoptions' parameter allows variables to be passed to the
# generated Makefile in the build area. DEBUG happens to be magic.
# generated Makefile in the build area.
#
# CONF_CFLAGS gives some extra compiler flags that are added to ${CFLAGS}
# after most other flags. Here we use it to inhibit use of non-optimal
# gcc builtin functions (e.g., memcmp).
#
# DEBUG happens to be magic.
# The following is equivalent to 'config -g KERNELNAME' and creates
# 'kernel.debug' compiled with -g debugging as well as a normal
# 'kernel'. Use 'make install.debug' to install the debug kernel
@ -40,6 +46,7 @@ maxusers 10
# KERNEL can be overridden so that you can change the default name of your
# kernel.
#
makeoptions CONF_CFLAGS=-fno-builtin #Don't allow use of memcmp, etc.
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
#makeoptions KERNEL=foo #Build kernel "foo" and install "/foo"

View File

@ -1106,7 +1106,7 @@ acd_done(struct atapi_request *request)
struct toc buf = cdp->toc;
acd_read_toc(cdp);
if (memcmp(&buf, &cdp->toc, sizeof(struct toc)))
if (bcmp(&buf, &cdp->toc, sizeof(struct toc)))
cdp->atp->flags |= ATAPI_F_MEDIA_CHANGED;
else {
error = atapi_immed_cmd(cdp->atp, request->ccb, request->data,

View File

@ -30,7 +30,13 @@ maxusers 10
#
# The `makeoptions' parameter allows variables to be passed to the
# generated Makefile in the build area. DEBUG happens to be magic.
# generated Makefile in the build area.
#
# CONF_CFLAGS gives some extra compiler flags that are added to ${CFLAGS}
# after most other flags. Here we use it to inhibit use of non-optimal
# gcc builtin functions (e.g., memcmp).
#
# DEBUG happens to be magic.
# The following is equivalent to 'config -g KERNELNAME' and creates
# 'kernel.debug' compiled with -g debugging as well as a normal
# 'kernel'. Use 'make install.debug' to install the debug kernel
@ -40,6 +46,7 @@ maxusers 10
# KERNEL can be overridden so that you can change the default name of your
# kernel.
#
makeoptions CONF_CFLAGS=-fno-builtin #Don't allow use of memcmp, etc.
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
#makeoptions KERNEL=foo #Build kernel "foo" and install "/foo"

View File

@ -67,6 +67,10 @@ PROF+= -mprofiler-epilogue
.endif
.endif
# Put configuration-specific C flags last (except for ${PROF}) so that they
# can override the others.
CFLAGS+= ${CONF_CFLAGS}
NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} $<
NORMAL_S= ${CC} -c ${ASM_CFLAGS} $<

View File

@ -30,7 +30,13 @@ maxusers 10
#
# The `makeoptions' parameter allows variables to be passed to the
# generated Makefile in the build area. DEBUG happens to be magic.
# generated Makefile in the build area.
#
# CONF_CFLAGS gives some extra compiler flags that are added to ${CFLAGS}
# after most other flags. Here we use it to inhibit use of non-optimal
# gcc builtin functions (e.g., memcmp).
#
# DEBUG happens to be magic.
# The following is equivalent to 'config -g KERNELNAME' and creates
# 'kernel.debug' compiled with -g debugging as well as a normal
# 'kernel'. Use 'make install.debug' to install the debug kernel
@ -40,6 +46,7 @@ maxusers 10
# KERNEL can be overridden so that you can change the default name of your
# kernel.
#
makeoptions CONF_CFLAGS=-fno-builtin #Don't allow use of memcmp, etc.
#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
#makeoptions KERNEL=foo #Build kernel "foo" and install "/foo"

View File

@ -292,7 +292,7 @@ ncp_conn_getattached(struct ncp_conn_args *li,struct proc *p,struct ucred *cred,
if ((ncp->flags & NCPFL_LOGGED) != 0 ||
strcmp(ncp->li.server,li->server) != 0 ||
ncp->li.saddr.sa_len != li->saddr.sa_len ||
memcmp(&ncp->li.saddr,&ncp->li.saddr,li->saddr.sa_len) != 0)
bcmp(&ncp->li.saddr,&ncp->li.saddr,li->saddr.sa_len) != 0)
continue;
if (ncp_suser(cred) == 0 ||
cred->cr_uid == ncp->nc_owner->cr_uid)