]> Zhao Yanbai Git Server - minix.git/commitdiff
Move minimal libc from libsys into separate lib.
authorEvgeniy Ivanov <lolkaantimat@gmail.com>
Sat, 9 Jul 2011 13:17:12 +0000 (17:17 +0400)
committerBen Gras <ben@minix3.org>
Sat, 9 Jul 2011 20:32:38 +0000 (22:32 +0200)
Now users can choose between libsys, libsys + libminc and
libsys + libc. E.g. PUFFS/FUSE servers need libsys + libc while
old servers can use libsys + libminc.

12 files changed:
kernel/Makefile
lib/Makefile
lib/libminc/Makefile [moved from lib/libsys/Makefile.libc.inc with 97% similarity]
lib/libminc/_stdfile.c [moved from lib/libsys/_stdfile.c with 100% similarity]
lib/libminc/abort.c [moved from lib/libsys/abort.c with 100% similarity]
lib/libminc/arch/i386/Makefile.libc.inc [moved from lib/libsys/arch/i386/Makefile.libc.inc with 100% similarity]
lib/libminc/calloc.c [moved from lib/libsys/calloc.c with 100% similarity]
lib/libminc/errlist.c [moved from lib/libsys/errlist.c with 100% similarity]
lib/libminc/fputs.c [moved from lib/libsys/fputs.c with 100% similarity]
lib/libminc/malloc.c [moved from lib/libsys/malloc.c with 100% similarity]
lib/libsys/Makefile
share/mk/minix.service.mk

index 9ad077a8889410c17f860e8da737505c1b239002..deb33e353ea8963849f2b95e80653a57118535f2 100644 (file)
@@ -28,9 +28,9 @@ LDFLAGS+= -nostdlib -L${LIBDIR}
 LDADD+= -lminlib
 DPADD+= ${LIBMINLIB}
 .if ${CC} == "gcc"
-LDADD+=        -lgcc -lsys -lgcc
+LDADD+=        -lgcc -lsys -lgcc -lminc
 .elif ${CC} == "clang"
-LDADD+= -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
+LDADD+= -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc
 DPADD+=        ${LIBC}
 .endif
 .endif
index 876928b5ab934f84939474ad708044460f0529e2..f5a596dcf8a6094a8ff77ee59ac5a99a73020a31 100644 (file)
@@ -21,7 +21,7 @@ SUBDIR= csu ${LIBCOMPAT_DIR} ${LIBC_DIR} libcurses libdriver libnetdriver \
        libddekit
 
 .if defined(NBSD_LIBC) && (${NBSD_LIBC} != "no")
-SUBDIR+= libelf
+SUBDIR+= libelf libminc
 .endif
 
 .if ${COMPILER_TYPE} == "ack"
similarity index 97%
rename from lib/libsys/Makefile.libc.inc
rename to lib/libminc/Makefile
index b2e819927be66f2ffd7812fa5ad58c18106d092d..aac2f2644a960599c113d8accf7bbd18445a0d84 100644 (file)
@@ -2,9 +2,14 @@
 # Minimal libc for servers and drivers.
 #
 
+.include <bsd.own.mk>
+
+LIB=           minc
+
+CPPFLAGS.sched_start.c+=       -I${MINIXSRCDIR}
+
 LIBCSRCDIR=${MINIXSRCDIR}/lib/nbsd_libc
 
-.if (${NBSD_LIBC} != "no")
 MACHINE_ARCH=${MACHINE}
 
 #
@@ -133,4 +138,4 @@ CPPFLAGS.${i}+= -I${LIBCSRCDIR}/include
 
 CPPFLAGS+= -D_LIBSYS
 
-.endif
+.include <bsd.lib.mk>
similarity index 100%
rename from lib/libsys/_stdfile.c
rename to lib/libminc/_stdfile.c
similarity index 100%
rename from lib/libsys/abort.c
rename to lib/libminc/abort.c
similarity index 100%
rename from lib/libsys/calloc.c
rename to lib/libminc/calloc.c
similarity index 100%
rename from lib/libsys/errlist.c
rename to lib/libminc/errlist.c
similarity index 100%
rename from lib/libsys/fputs.c
rename to lib/libminc/fputs.c
similarity index 100%
rename from lib/libsys/malloc.c
rename to lib/libminc/malloc.c
index f5bdc73bc77ec353af4e5958c6f9c7f8305458a3..4c9923d70a6a497ed343d3e6c86ee11970d8fa8e 100644 (file)
@@ -131,8 +131,8 @@ SRCS=  \
 
 CPPFLAGS.sched_start.c+=       -I${MINIXSRCDIR}
 
-.if (${NBSD_LIBC} != "no")
-.include "Makefile.libc.inc"
+.if (${CC} == "gcc") || (${CC} == "clang")
+LDADD+=        -lminc
 .endif
 
 .include <bsd.lib.mk>
index 52e47487a35b1cc445db1604e238083254ba875f..df50c11ef2b541fcccab4db0548a9d7d233017a2 100644 (file)
@@ -4,9 +4,9 @@
 .if ${COMPILER_TYPE} == "gnu"
 
 .if ${CC} == "gcc"
-LDADD+= -nodefaultlibs -lgcc -lsys -lgcc
+LDADD+= -nodefaultlibs -lgcc -lsys -lgcc -lminc
 .elif ${CC} == "clang"
-LDADD+= -nodefaultlibs -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
+LDADD+= -nodefaultlibs -L/usr/pkg/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc
 .endif
 
 .endif