home *** CD-ROM | disk | FTP | other *** search
-
- > > 6. To compile the kernel, you need the libc stuff from a site that
- > > has the source for the NetBSD-current distribution (libc has bcmp.s,
- > > bzero.s, and a whole mess of other little files that are insisted
- > > upon (I got the libc stuff from agate.berkeley.edu)). A question
- > > here: When making the kernel, "cpp -E -Iwhatever foo.s | as -o foo.o"
- > > grumbles about "_ somelabel" being invalid. The problem is this space
- > > here ------------^. From what I can tell, "ENTRY(foo)" is being
- > > converted to "_ foo:" by cpp instead of "_foo:". Does anyone know why
- > > this space is being (incorrectly?) generated by cpp, and/or how to
- > > solve the problem. I ended up compiling all those little .s files
- > > myself using "cpp -traditional foo.s | as -o foo.o" (and
- > > "cpp -traditional -DPROF foo.s | as -o foo.po" when it came time for
- > > the profiling stuff), but it would be kind of nice to get this
- > > somewhat automated...
-
- > Replace the /**/ in DEFS.h and SYS.h with ##.
-
- There's a little more involved, as you also need to escape the `#' in
- the asm statements. A better solution (borrowed from InterViews) is
- to detect the preprocessor type and conditionally include code. A
- patch follows.
-
- Does anyone know what to do with `ALIGNBYTES' in lib/libc/gen/fts.c?
- It doesn't appear to exist anywhere.
-
- =========================================================================
- Eduardo Horvath eeh@btr.com
- ..!{decwrl,mips,fernwood}!btr!eeh
- "Trust me, I am cognizant of what I am doing." - Hammeroid
-
- *** lib/libc/arch/amiga/SYS.h~ Sat Nov 20 02:39:23 1993
- --- lib/libc/arch/amiga/SYS.h Sat Nov 20 02:45:49 1993
- ***************
- *** 40,66 ****
-
- #include <sys/syscall.h>
-
- ! #ifdef _STDC_
- #ifdef PROF
- #ifdef __GNUC__
- ! #define ENTRY(x) .globl _##x; .even; _##x:; .data; PROF##x:; \
- ! .long 0; .text; link a6,\#0; lea PROF##x,a0; \
- jbsr mcount; unlk a6
- #else
- ! #define ENTRY(x) .globl _##x; .even; _##x:; .data; PROF##x:; \
- ! .long 0; .text; lea PROF##x,a0; jbsr mcount
- #endif
- #else
- ! #define ENTRY(x) .globl _##x; .even; _##x:
- #endif PROF
- ! #define SYSCALL(x) .even; err: jmp cerror; ENTRY(x); movl \#SYS_##x,d0; \
- trap \#0; jcs err
- #define RSYSCALL(x) SYSCALL(x); rts
- ! #define PSEUDO(x,y) ENTRY(x); movl \#SYS_##y,d0; trap \#0; rts
-
- #define ASMSTR .asciz
- -
- - .globl cerror
- #else
-
- #ifdef PROF
- --- 40,64 ----
-
- #include <sys/syscall.h>
-
- ! #ifdef __STDC__
- #ifdef PROF
- #ifdef __GNUC__
- ! #define ENTRY(x) .globl _##x; .even; _##x##:; .data; PROF##x##:; \
- ! .long 0; .text; link a6,\#0; lea PROF##x##,a0; \
- jbsr mcount; unlk a6
- #else
- ! #define ENTRY(x) .globl _##x; .even; _##x##:; .data; PROF##x##:; \
- ! .long 0; .text; lea PROF##x##,a0; jbsr mcount
- #endif
- #else
- ! #define ENTRY(x) .globl _##x; .even; _##x##:
- #endif PROF
- ! #define SYSCALL(x) .even; err: jmp cerror; ENTRY(x); movl \#SYS_##x##,d0; \
- trap \#0; jcs err
- #define RSYSCALL(x) SYSCALL(x); rts
- ! #define PSEUDO(x,y) ENTRY(x); movl \#SYS_##y##,d0; trap \#0; rts
-
- #define ASMSTR .asciz
- #else
-
- #ifdef PROF
- ***************
- *** 76,87 ****
- #define ENTRY(x) .globl _/**/x; .even; _/**/x:
- #endif PROF
- #define SYSCALL(x) .even; err: jmp cerror; ENTRY(x); movl #SYS_/**/x,d0; \
- ! trap \#0; jcs err
- #define RSYSCALL(x) SYSCALL(x); rts
- #define PSEUDO(x,y) ENTRY(x); movl #SYS_/**/y,d0; trap #0; rts
-
- #define ASMSTR .asciz
-
- .globl cerror
- -
- - #endif
- --- 74,84 ----
- #define ENTRY(x) .globl _/**/x; .even; _/**/x:
- #endif PROF
- #define SYSCALL(x) .even; err: jmp cerror; ENTRY(x); movl #SYS_/**/x,d0; \
- ! trap #0; jcs err
- #define RSYSCALL(x) SYSCALL(x); rts
- #define PSEUDO(x,y) ENTRY(x); movl #SYS_/**/y,d0; trap #0; rts
-
- #define ASMSTR .asciz
- + #endif
-
- .globl cerror
- *** lib/libc/arch/amiga/DEFS.h~ Sat Nov 20 02:22:24 1993
- --- lib/libc/arch/amiga/DEFS.h Sat Nov 20 04:00:46 1993
- ***************
- *** 38,46 ****
- --- 38,63 ----
- * $Id: DEFS.h,v 1.1 1993/10/07 00:17:29 cgd Exp $
- */
-
- + #ifdef __STDC__
- #ifdef PROF
- #ifdef __GNUC__
- #define ENTRY(x) \
- + .globl _##x; .even; _##x##:; .data; PROF##x##:; .long 0; .text; \
- + link a6,\#0; lea PROF##x##,a0; jsr mcount; unlk a6
- + #else
- + #define ENTRY(x) \
- + .globl _##x; .even; _##x##:; .data; PROF##x##:; .long 0; .text; \
- + lea PROF##x,a0; jsr mcount
- + #endif
- + #else
- + #define ENTRY(x) \
- + .globl _##x; .even; _##x##:
- + #endif
- + #else
- +
- + #ifdef PROF
- + #ifdef __GNUC__
- + #define ENTRY(x) \
- .globl _/**/x; .even; _/**/x:; .data; PROF/**/x:; .long 0; .text; \
- link a6,#0; lea PROF/**/x,a0; jsr mcount; unlk a6
- #else
- ***************
- *** 51,54 ****
- --- 68,72 ----
- #else
- #define ENTRY(x) \
- .globl _/**/x; .even; _/**/x:
- + #endif
- #endif
-
-