]> Zhao Yanbai Git Server - minix.git/commitdiff
isofs: do not link against libc 01/3001/2
authorDavid van Moolenbroek <david@minix3.org>
Sat, 6 Jun 2015 12:58:46 +0000 (12:58 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Sun, 7 Jun 2015 17:01:45 +0000 (17:01 +0000)
This change requires a small patch to libc, in order to avoid that
libminc has to pull in a large chunk of libc just for mktime(3).

Change-Id: I48e598b3716eff626cac461f78a41e32334e6b28

lib/libc/time/localtime.c
minix/fs/isofs/Makefile
minix/lib/libminc/Makefile

index ef48c93bf1a5dd529a4a8981f7d7b3ccd936eff0..c3824bb9cf68d888b546c9089551d5e6fc43e07c 100644 (file)
@@ -1706,6 +1706,7 @@ timesub(const timezone_t sp, const time_t *const timep,
        return tmp;
 }
 
+#if !defined(__minix) || !defined(_LIBMINC)
 char *
 ctime(const time_t *const timep)
 {
@@ -1742,6 +1743,7 @@ ctime_rz(const timezone_t sp, const time_t * timep, char *buf)
                return NULL;
        return asctime_r(rtm, buf);
 }
+#endif /* !defined(__minix) || !defined(_LIBMINC) */
 
 /*
 ** Adapted from code provided by Robert Elz, who writes:
index 17f1cc20bf486d063b082bf1e0d6e1c77c38cd02..0b66a7d5bf9185aa5927e52f9076dd02f321ad7d 100644 (file)
@@ -4,7 +4,7 @@ SRCS=   main.c table.c mount.c super.c inode.c \
        link.c utility.c path.c read.c susp.c susp_rock_ridge.c stadir.c
 
 DPADD+=        ${LIBFSDRIVER} ${LIBBDEV} ${LIBSYS} ${LIBMINIXFS}
-LDADD+=        -lfsdriver -lbdev -lsys -lc -lminixfs
+LDADD+=        -lfsdriver -lbdev -lsys -lminixfs
 
 CPPFLAGS+= -DNR_BUFS=100
 
index db8b093f4960ff483505707da868a057ff08e899..3239fa51733993702110b7070937266a8409e76c 100644 (file)
@@ -248,7 +248,7 @@ CLEANFILES+= ${f:C/\.o/.bc/}
 
 .for f in \
        abort.o atexit.o _env.o exit.o getenv.o \
-       ldiv.o malloc.o \
+       ldiv.o malloc.o setenv.o \
        _rand48.o lrand48.o srand48.o
 ${f} ${f:C/\.o/.bc/}:  ${LIBCDIR}/stdlib/${f:C/\.o/.c/}
 OBJS+= ${f}
@@ -308,6 +308,18 @@ CLEANFILES+= ${f:C/\.o/.bc/}
 .endif # ${USE_BITCODE:Uno} == "yes"
 .endfor
 
+.for f in \
+       localtime.o
+${f} ${f:C/\.o/.bc/}:  ${LIBCDIR}/time/${f:C/\.o/.c/}
+OBJS+= ${f}
+CLEANFILES+= ${f}
+
+.if ${USE_BITCODE:Uno} == "yes"
+OBJS+= ${f:C/\.o/.bc/}
+CLEANFILES+= ${f:C/\.o/.bc/}
+.endif # ${USE_BITCODE:Uno} == "yes"
+.endfor
+
 ARCHSUBDIR=${MACHINE_CPU}
 .include "${NETBSDSRCDIR}/minix/lib/libc/arch/${MACHINE_CPU}/Makefile.inc"