Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/libhack Dedup and add the small jemalloc imple...



details:   https://anonhg.NetBSD.org/src/rev/757c1410147d
branches:  trunk
changeset: 840219:757c1410147d
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 28 15:04:41 2019 +0000

description:
Dedup and add the small jemalloc implementation so our install media has
a chance to fit again.

diffstat:

 distrib/utils/libhack/Makefile     |  27 +++++++++------------------
 distrib/utils/libhack/Makefile.inc |  15 +++++++++++----
 2 files changed, 20 insertions(+), 22 deletions(-)

diffs (94 lines):

diff -r 971ec4056970 -r 757c1410147d distrib/utils/libhack/Makefile
--- a/distrib/utils/libhack/Makefile    Thu Mar 28 12:34:36 2019 +0000
+++ b/distrib/utils/libhack/Makefile    Thu Mar 28 15:04:41 2019 +0000
@@ -1,32 +1,23 @@
-# $NetBSD: Makefile,v 1.25 2017/06/18 03:56:39 manu Exp $
+# $NetBSD: Makefile,v 1.26 2019/03/28 15:04:41 christos Exp $
 #
 # Stubs to kill off some things from libc:
 # This save space on a boot system.
 # (See Makefile.inc also.)
 
-.PATH.c: ${.CURDIR}/../../../lib/libc/gen ${.CURDIR}/../../../lib/libc/locale
-
-HACKSRC?=${.CURDIR}
-HACKOBJ?=${.OBJDIR}
-
-CPPFLAGS+=     -DSMALL
-CPPFLAGS+=     -DLIBHACK
-CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \
-                       -DALL_80_TO_FF_SW1
-CPPFLAGS.syslog.c+=    -I${HACKSRC}/../../../lib/libc/include
-CPPFLAGS.gethost.c+=   -I${HACKSRC}/../../../lib/libc/net
-
-LIB=           hack
-SRCS=          getcap.c getgrent.c getnet.c getnetgr.c getpwent.c \
-               localeconv.c multibyte.c perror.c runetable.c setlocale.c \
-               strerror.c strsignal.c syslog.c utmp.c yplib.c gethost.c
-
+LIB=   hack
 WARNS=         1
 NOLINKLIB=     # defined
 NOLINT=        # defined
 NOPIC=         # defined
 NOPROFILE=     # defined
 
+HACKSRC?=${.CURDIR}
+HACKOBJ?=${.OBJDIR}
+
+.include "Makefile.inc"
+
+OBJS=          ${HACKOBJS}
+
 realall: libhack.o
 
 libhack.o: libhack.a
diff -r 971ec4056970 -r 757c1410147d distrib/utils/libhack/Makefile.inc
--- a/distrib/utils/libhack/Makefile.inc        Thu Mar 28 12:34:36 2019 +0000
+++ b/distrib/utils/libhack/Makefile.inc        Thu Mar 28 15:04:41 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.27 2017/06/18 03:56:39 manu Exp $
+# $NetBSD: Makefile.inc,v 1.28 2019/03/28 15:04:41 christos Exp $
 #
 # Include this fragment to build libhack.o
 # It is .o and not .a to make sure these are the
@@ -18,7 +18,7 @@
 
 CPPFLAGS+=     -DSMALL
 CPPFLAGS+=     -DLIBHACK
-HACKOBJS+=     getcap.o getgrent.o getnet.o getnetgr.o getpwent.o \
+HACKOBJS+=     getcap.o getgrent.o getnet.o getnetgr.o getpwent.o jemalloc.o \
                localeconv.o multibyte.o perror.o runetable.o setlocale.o \
                strerror.o strsignal.o syslog.o utmp.o yplib.o
 
@@ -26,14 +26,20 @@
                        -DALL_80_TO_FF_SW1
 
 CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include
+CPPFLAGS.jemalloc.c+= -I${HACKSRC}/../../../lib/libc/include
 CPPFLAGS.gethost.c+= -I${HACKSRC}/../../../lib/libc/net
 
+.if !defined(LIB)
 libhack.o: ${HACKOBJS}
        ${LD} -r -o $@ ${.ALLSRC}
-
+.endif
 
 .if 1
-.PATH.c: ${HACKSRC} ${HACKSRC}/../../../lib/libc/gen ${HACKSRC}/../../../lib/libc/locale
+.PATH.c: \
+       ${HACKSRC} \
+       ${HACKSRC}/../../../lib/libc/gen \
+       ${HACKSRC}/../../../lib/libc/locale \
+       ${HACKSRC}/../../../lib/libc/stdlib
 .else
 # XXX .PATH won't work here, because of crunchgen used by various builds
 getcap.o:      ${HACKSRC}/../../../lib/libc/gen/getcap.c
@@ -45,6 +51,7 @@
 localeconv.o:  ${HACKSRC}/localeconv.c
 multibyte.o:   ${HACKSRC}/multibyte.c
 perror.o:      ${HACKSRC}/perror.c
+jemalloc.o:    ${HACKSRC}/../../../lib/libc/stdlib/jemalloc.c
 runetable.o:   ${HACKSRC}/../../../lib/libc/locale/runetable.c
 setlocale.o:   ${HACKSRC}/setlocale.c
 strerror.o:    ${HACKSRC}/strerror.c



Home | Main Index | Thread Index | Old Index