summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2000-01-08 15:52:22 +0000
committerbde <bde@FreeBSD.org>2000-01-08 15:52:22 +0000
commit56c26012ce83d84970d82e62757ffefc7048ea0d (patch)
treed9de48ddc8c5296a56d6326b285b18e99b35f3c4 /sys/i386
parent3aad71b6b47d45903ffa2a7af4e05f85167cbc39 (diff)
downloadFreeBSD-src-56c26012ce83d84970d82e62757ffefc7048ea0d.zip
FreeBSD-src-56c26012ce83d84970d82e62757ffefc7048ea0d.tar.gz
Compile genassym.c with ordinary ${CFLAGS}. The (small) needs for
${GEN_CFLAGS} and -U_KERNEL became negative when all all the genassym.c's were converted to be cross-built. Makefile.*: - Cleanups associated with the old genassym. - Fixed deprecated spelling of ${.IMPSRC} as "$<".
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/conf/Makefile.i38624
-rw-r--r--sys/i386/i386/genassym.c3
2 files changed, 11 insertions, 16 deletions
diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386
index 5951cf4..e98e4da 100644
--- a/sys/i386/conf/Makefile.i386
+++ b/sys/i386/conf/Makefile.i386
@@ -49,12 +49,9 @@ CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
# XXX LOCORE means "don't declare C stuff" not "for locore.s".
ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}
-# Use the default object format for genassym, etc.
-GEN_CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} -U_KERNEL
-
# Select the correct set of tools. Can't set OBJFORMAT here because it
# doesn't get exported into the environment, and if it were exported
-# then it might break building of genassym, etc.
+# then it might break building of utilities.
.if ${KERNFORMAT} == "elf"
FMT= -elf
.else
@@ -76,10 +73,10 @@ PROF+= -mprofiler-epilogue
# 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} $<
-PROFILE_C= ${CC} -c ${CFLAGS} $<
+NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC}
+NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC}
+NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${.IMPSRC}
+PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC}
GEN_CFILES= $S/$M/$M/genassym.c
# setdef0.c and setdef1.c are intentionally
@@ -144,9 +141,9 @@ ${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h}
.endif
clean:
- rm -f *.o *.so *.So *.ko *.s eddep errs genassym gensetdefs \
- ${KERNEL} ${FULLKERNEL} linterrs makelinks param.c \
- setdef[01].c setdefs.h symbols.exclude symbols.sort tags \
+ rm -f *.o *.so *.So *.ko *.s eddep errs genassym \
+ ${FULLKERNEL} ${KERNEL} linterrs makelinks param.c \
+ setdef[01].c setdefs.h tags \
vers.c vnode_if.c vnode_if.h ${CLEAN}
#lint: /tmp param.c
@@ -186,15 +183,14 @@ assym.s: genassym.o
genassym genassym.o >assym.s
genassym.o: $S/$M/$M/genassym.c
- ${CC} -c ${GEN_CFLAGS} $S/$M/$M/genassym.c
+ ${CC} -c ${CFLAGS} $S/$M/$M/genassym.c
${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \
${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} ${SYSTEM_SFILES}
rm -f .newdep
- mkdep -a -f .newdep ${CFLAGS} ${CFILES} ${SYSTEM_CFILES}
- mkdep -a -f .newdep ${GEN_CFLAGS} ${GEN_CFILES}
+ mkdep -a -f .newdep ${CFLAGS} ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES}
env MKDEP_CPP="${CC} -E" \
mkdep -a -f .newdep ${ASM_CFLAGS} ${SFILES} ${SYSTEM_SFILES}
rm -f .depend
diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c
index f9a42fa..3e843db 100644
--- a/sys/i386/i386/genassym.c
+++ b/sys/i386/i386/genassym.c
@@ -42,6 +42,7 @@
#include <stddef.h>
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/assym.h>
#include <sys/buf.h>
#include <sys/proc.h>
@@ -57,9 +58,7 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
-#define _KERNEL /* Avoid userland compatability headers */
#include <sys/user.h>
-#undef _KERNEL
#include <net/if.h>
#include <netinet/in.h>
#include <nfs/nfsv2.h>
OpenPOWER on IntegriCloud