isofs: do not link against libc

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
This commit is contained in:
David van Moolenbroek 2015-06-06 12:58:46 +00:00
parent 44707c1900
commit af4345b097
3 changed files with 16 additions and 2 deletions

View file

@ -1706,6 +1706,7 @@ timesub(const timezone_t sp, const time_t *const timep,
return tmp; return tmp;
} }
#if !defined(__minix) || !defined(_LIBMINC)
char * char *
ctime(const time_t *const timep) 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 NULL;
return asctime_r(rtm, buf); return asctime_r(rtm, buf);
} }
#endif /* !defined(__minix) || !defined(_LIBMINC) */
/* /*
** Adapted from code provided by Robert Elz, who writes: ** Adapted from code provided by Robert Elz, who writes:

View 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 link.c utility.c path.c read.c susp.c susp_rock_ridge.c stadir.c
DPADD+= ${LIBFSDRIVER} ${LIBBDEV} ${LIBSYS} ${LIBMINIXFS} DPADD+= ${LIBFSDRIVER} ${LIBBDEV} ${LIBSYS} ${LIBMINIXFS}
LDADD+= -lfsdriver -lbdev -lsys -lc -lminixfs LDADD+= -lfsdriver -lbdev -lsys -lminixfs
CPPFLAGS+= -DNR_BUFS=100 CPPFLAGS+= -DNR_BUFS=100

View file

@ -248,7 +248,7 @@ CLEANFILES+= ${f:C/\.o/.bc/}
.for f in \ .for f in \
abort.o atexit.o _env.o exit.o getenv.o \ 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 _rand48.o lrand48.o srand48.o
${f} ${f:C/\.o/.bc/}: ${LIBCDIR}/stdlib/${f:C/\.o/.c/} ${f} ${f:C/\.o/.bc/}: ${LIBCDIR}/stdlib/${f:C/\.o/.c/}
OBJS+= ${f} OBJS+= ${f}
@ -308,6 +308,18 @@ CLEANFILES+= ${f:C/\.o/.bc/}
.endif # ${USE_BITCODE:Uno} == "yes" .endif # ${USE_BITCODE:Uno} == "yes"
.endfor .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} ARCHSUBDIR=${MACHINE_CPU}
.include "${NETBSDSRCDIR}/minix/lib/libc/arch/${MACHINE_CPU}/Makefile.inc" .include "${NETBSDSRCDIR}/minix/lib/libc/arch/${MACHINE_CPU}/Makefile.inc"