123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481 |
- load('//sys/src/FLAGS', "KLIB_COMPILER_FLAGS", "LIB_COMPILER_FLAGS")
- LIBC_SRCS = [
- "9sys/access.c",
- "9sys/announce.c",
- "9sys/convD2M.c",
- "9sys/convM2D.c",
- "9sys/convM2S.c",
- "9sys/convS2M.c",
- "9sys/cputime.c",
- "9sys/ctime.c",
- "9sys/dial.c",
- "9sys/dirfstat.c",
- "9sys/dirfwstat.c",
- "9sys/dirmodefmt.c",
- "9sys/dirread.c",
- "9sys/dirstat.c",
- "9sys/dirwstat.c",
- "9sys/fcallfmt.c",
- "9sys/fork.c",
- "9sys/getnetconninfo.c",
- "9sys/getenv.c",
- "9sys/getpid.c",
- "9sys/getppid.c",
- "9sys/getwd.c",
- "9sys/iounit.c",
- "9sys/nulldir.c",
- "9sys/postnote.c",
- "9sys/privalloc.c",
- "9sys/pushssl.c",
- "9sys/pushtls.c",
- "9sys/putenv.c",
- "9sys/qlock.c",
- "9sys/read9pmsg.c",
- "9sys/read.c",
- "9sys/readv.c",
- "9sys/rerrstr.c",
- "9sys/sbrk.c",
- "9sys/setnetmtpt.c",
- "9sys/sysfatal.c",
- "9sys/syslog.c",
- "9sys/sysname.c",
- "9sys/time.c",
- "9sys/times.c",
- "9sys/tm2sec.c",
- "9sys/truerand.c",
- "9sys/wait.c",
- "9sys/waitpid.c",
- "9sys/werrstr.c",
- "9sys/write.c",
- "9sys/writev.c",
- "9syscall/alarm.s",
- "9syscall/await.s",
- "9syscall/bind.s",
- "9syscall/brk_.s",
- "9syscall/chdir.s",
- "9syscall/close.s",
- "9syscall/create.s",
- "9syscall/dup.s",
- "9syscall/errstr.s",
- "9syscall/exec.s",
- "9syscall/_exits.s",
- "9syscall/fauth.s",
- "9syscall/fd2path.s",
- "9syscall/fstat.s",
- "9syscall/fversion.s",
- "9syscall/fwstat.s",
- "9syscall/mount.s",
- "9syscall/noted.s",
- "9syscall/notify.s",
- "9syscall/nsec.s",
- "9syscall/open.s",
- "9syscall/pipe.s",
- "9syscall/pread.s",
- "9syscall/pwrite.s",
- "9syscall/remove.s",
- "9syscall/rendezvous.s",
- "9syscall/rfork.s",
- "9syscall/seek.s",
- "9syscall/segattach.s",
- "9syscall/segbrk.s",
- "9syscall/segdetach.s",
- "9syscall/segflush.s",
- "9syscall/segfree.s",
- "9syscall/semacquire.s",
- "9syscall/semrelease.s",
- "9syscall/sleep.s",
- "9syscall/stat.s",
- "9syscall/tsemacquire.s",
- "9syscall/unmount.s",
- "9syscall/wstat.s",
- "fmt/dofmt.c",
- "fmt/dorfmt.c",
- "fmt/errfmt.c",
- "fmt/fltfmt.c",
- "fmt/fmt.c",
- "fmt/fmtfd.c",
- "fmt/fmtlock.c",
- "fmt/fmtprint.c",
- "fmt/fmtquote.c",
- "fmt/fmtrune.c",
- "fmt/fmtstr.c",
- "fmt/fmtvprint.c",
- "fmt/fprint.c",
- "fmt/print.c",
- "fmt/runefmtstr.c",
- "fmt/runeseprint.c",
- "fmt/runesmprint.c",
- "fmt/runesnprint.c",
- "fmt/runesprint.c",
- "fmt/runevseprint.c",
- "fmt/runevsmprint.c",
- "fmt/runevsnprint.c",
- "fmt/seprint.c",
- "fmt/smprint.c",
- "fmt/snprint.c",
- "fmt/sprint.c",
- "fmt/vfprint.c",
- "fmt/vseprint.c",
- "fmt/vsmprint.c",
- "fmt/vsnprint.c",
- "port/_assert.c",
- "port/abs.c",
- "port/asin.c",
- "port/atan.c",
- "port/atan2.c",
- "port/atexit.c",
- "port/atnotify.c",
- "port/atof.c",
- "port/atol.c",
- "port/atoll.c",
- "port/cistrcmp.c",
- "port/cistrncmp.c",
- "port/cistrstr.c",
- "port/charstod.c",
- "port/cleanname.c",
- "port/ctype.c",
- "port/encodefmt.c",
- "port/execl.c",
- "port/exp.c",
- "port/fabs.c",
- "port/floor.c",
- "port/fmod.c",
- "port/frand.c",
- "port/frexp.c",
- "port/getcallerpc.c",
- "port/getfields.c",
- "port/getuser.c",
- "port/hangup.c",
- "port/hypot.c",
- "port/lnrand.c",
- "port/lock.c",
- "port/log.c",
- "port/lrand.c",
- "port/malloc.c",
- "port/memccpy.c",
- "port/memchr.c",
- "port/memcmp.c",
- "port/memmove.c",
- "port/memset.c",
- "port/mktemp.c",
- "port/muldiv.c",
- "port/nan.c",
- "port/needsrcquote.c",
- "port/netmkaddr.c",
- "port/nrand.c",
- "port/ntruerand.c",
- "port/perror.c",
- "port/pool.c",
- "port/pow.c",
- "port/pow10.c",
- "port/qsort.c",
- "port/quote.c",
- "port/rand.c",
- "port/readn.c",
- "port/reallocarray.c",
- "port/rijndael.c",
- "port/rune.c",
- "port/runebase.c",
- "port/runebsearch.c",
- "port/runestrcat.c",
- "port/runestrchr.c",
- "port/runestrcmp.c",
- "port/runestrcpy.c",
- "port/runestrecpy.c",
- "port/runestrdup.c",
- "port/runestrncat.c",
- "port/runestrncmp.c",
- "port/runestrncpy.c",
- "port/runestrrchr.c",
- "port/runestrlen.c",
- "port/runestrstr.c",
- "port/runetype.c",
- "port/sha2.c",
- "port/sin.c",
- "port/sinh.c",
- "port/strcat.c",
- "port/strchr.c",
- "port/strcmp.c",
- "port/strcpy.c",
- "port/strecpy.c",
- "port/strcspn.c",
- "port/strdup.c",
- "port/strlcat.c",
- "port/strlcpy.c",
- "port/strlen.c",
- "port/strncat.c",
- "port/strncmp.c",
- "port/strncpy.c",
- "port/strpbrk.c",
- "port/strrchr.c",
- "port/strspn.c",
- "port/strstr.c",
- "port/strtod.c",
- "port/strtok.c",
- "port/strtol.c",
- "port/strtoll.c",
- "port/strtoul.c",
- "port/strtoull.c",
- "port/tan.c",
- "port/tanh.c",
- "port/tokenize.c",
- "port/toupper.c",
- "port/utfecpy.c",
- "port/utflen.c",
- "port/utfnlen.c",
- "port/utfrune.c",
- "port/utfrrune.c",
- "port/utfutf.c",
- "port/u16.c",
- "port/u32.c",
- "port/u64.c",
- "amd64/notejmp.c",
- "amd64/cycles.c",
- "amd64/argv0.c",
- "amd64/rdpmc.c",
- "amd64/setjmp.s",
- "amd64/sqrt.s",
- "amd64/tas.s",
- "amd64/atom.S",
- "amd64/main9.S"
- ]
- KLIBC_SRCS = [
- "9sys/access.c",
- "9sys/announce.c",
- "9sys/convD2M.c",
- "9sys/convM2D.c",
- "9sys/convM2S.c",
- "9sys/convS2M.c",
- "9sys/cputime.c",
- "9sys/ctime.c",
- "9sys/dial.c",
- "9sys/dirfstat.c",
- "9sys/dirfwstat.c",
- "9sys/dirmodefmt.c",
- "9sys/dirread.c",
- "9sys/dirstat.c",
- "9sys/dirwstat.c",
- "9sys/fcallfmt.c",
- "9sys/fork.c",
- "9sys/getnetconninfo.c",
- "9sys/getenv.c",
- "9sys/getpid.c",
- "9sys/getppid.c",
- "9sys/getwd.c",
- "9sys/iounit.c",
- "9sys/nulldir.c",
- "9sys/postnote.c",
- "9sys/privalloc.c",
- "9sys/pushssl.c",
- "9sys/pushtls.c",
- "9sys/putenv.c",
- "9sys/qlock.c",
- "9sys/read9pmsg.c",
- "9sys/read.c",
- "9sys/readv.c",
- "9sys/rerrstr.c",
- "9sys/sbrk.c",
- "9sys/setnetmtpt.c",
- "9sys/sysfatal.c",
- "9sys/syslog.c",
- "9sys/sysname.c",
- "9sys/time.c",
- "9sys/times.c",
- "9sys/tm2sec.c",
- "9sys/truerand.c",
- "9sys/wait.c",
- "9sys/waitpid.c",
- "9sys/werrstr.c",
- "9sys/write.c",
- "9sys/writev.c",
- "fmt/dofmt.c",
- "fmt/dorfmt.c",
- "fmt/errfmt.c",
- "fmt/fltfmt.c",
- "fmt/fmt.c",
- "fmt/fmtfd.c",
- "fmt/fmtlock.c",
- "fmt/fmtprint.c",
- "fmt/fmtquote.c",
- "fmt/fmtrune.c",
- "fmt/fmtstr.c",
- "fmt/fmtvprint.c",
- "fmt/fprint.c",
- "fmt/print.c",
- "fmt/runefmtstr.c",
- "fmt/runeseprint.c",
- "fmt/runesmprint.c",
- "fmt/runesnprint.c",
- "fmt/runesprint.c",
- "fmt/runevseprint.c",
- "fmt/runevsmprint.c",
- "fmt/runevsnprint.c",
- "fmt/seprint.c",
- "fmt/smprint.c",
- "fmt/snprint.c",
- "fmt/sprint.c",
- "fmt/vfprint.c",
- "fmt/vseprint.c",
- "fmt/vsmprint.c",
- "fmt/vsnprint.c",
- "port/_assert.c",
- "port/abs.c",
- "port/asin.c",
- "port/atan.c",
- "port/atan2.c",
- "port/atexit.c",
- "port/atnotify.c",
- "port/atof.c",
- "port/atol.c",
- "port/atoll.c",
- "port/cistrcmp.c",
- "port/cistrncmp.c",
- "port/cistrstr.c",
- "port/charstod.c",
- "port/cleanname.c",
- "port/ctype.c",
- "port/encodefmt.c",
- "port/execl.c",
- "port/exp.c",
- "port/fabs.c",
- "port/floor.c",
- "port/fmod.c",
- "port/frand.c",
- "port/frexp.c",
- "port/getcallerpc.c",
- "port/getfields.c",
- "port/getuser.c",
- "port/hangup.c",
- "port/hypot.c",
- "port/lnrand.c",
- "port/lock.c",
- "port/log.c",
- "port/lrand.c",
- "port/malloc.c",
- "port/memccpy.c",
- "port/memchr.c",
- "port/memcmp.c",
- "port/memmove.c",
- "port/memset.c",
- "port/mktemp.c",
- "port/muldiv.c",
- "port/nan.c",
- "port/needsrcquote.c",
- "port/netmkaddr.c",
- "port/nrand.c",
- "port/ntruerand.c",
- "port/perror.c",
- "port/pool.c",
- "port/pow.c",
- "port/pow10.c",
- "port/qsort.c",
- "port/quote.c",
- "port/rand.c",
- "port/readn.c",
- "port/rijndael.c",
- "port/rune.c",
- "port/runebase.c",
- "port/runebsearch.c",
- "port/runestrcat.c",
- "port/runestrchr.c",
- "port/runestrcmp.c",
- "port/runestrcpy.c",
- "port/runestrecpy.c",
- "port/runestrdup.c",
- "port/runestrncat.c",
- "port/runestrncmp.c",
- "port/runestrncpy.c",
- "port/runestrrchr.c",
- "port/runestrlen.c",
- "port/runestrstr.c",
- "port/runetype.c",
- "port/sha2.c",
- "port/sin.c",
- "port/sinh.c",
- "port/strcat.c",
- "port/strchr.c",
- "port/strcmp.c",
- "port/strcpy.c",
- "port/strecpy.c",
- "port/strcspn.c",
- "port/strdup.c",
- "port/strlen.c",
- "port/strncat.c",
- "port/strncmp.c",
- "port/strncpy.c",
- "port/strpbrk.c",
- "port/strrchr.c",
- "port/strspn.c",
- "port/strstr.c",
- "port/strtod.c",
- "port/strtok.c",
- "port/strtol.c",
- "port/strtoll.c",
- "port/strtoul.c",
- "port/strtoull.c",
- "port/tan.c",
- "port/tanh.c",
- "port/tokenize.c",
- "port/toupper.c",
- "port/utfecpy.c",
- "port/utflen.c",
- "port/utfnlen.c",
- "port/utfrune.c",
- "port/utfrrune.c",
- "port/utfutf.c",
- "port/u16.c",
- "port/u32.c",
- "port/u64.c",
- "amd64/notejmp.c",
- "amd64/cycles.c",
- "amd64/argv0.c",
- "amd64/rdpmc.c",
- "amd64/setjmp.s",
- "amd64/sqrt.s",
- "amd64/tas.s",
- "amd64/atom.S",
- "amd64/main9.S"
- ]
- cc_library(
- name="libkc",
- copts=KLIB_COMPILER_FLAGS,
- includes=[
- "//sys/include",
- "//amd64/include",
- "//sys/src/libc"
- ],
- srcs=KLIBC_SRCS,
- )
- cc_library(
- name="libc",
- copts=LIB_COMPILER_FLAGS,
- includes=[
- "//sys/include",
- "//amd64/include",
- "//sys/src/libc"
- ],
- srcs=LIBC_SRCS,
- deps=[
- ":9syscall",
- ":syscallheader"
- ]
- )
- mk_sys(
- name="syscallheader",
- mode="sys.h",
- arch="amd64",
- sysconf="//sys/src/sysconf.json",
- )
- mk_sys(
- name="9syscall",
- mode="syscallfiles",
- arch="amd64",
- sysconf="//sys/src/sysconf.json",
- )
|