DragonFly bugs List (threaded) for 2007-02
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: [issue543] kern.post.mk patch - NO_KERNEL_OLD_STRIP
cp(1) should be fine.
(will close window with no /kernel somewhat)
-thomas
> Simon 'corecode' Schubert <corecode@fs.ei.tum.de> added the
> comment:
>
> Is there a particular reason why you use mv instead of cp
> (or ln)?
>
> Looks good else.
>
> ----------
> priority: -> feature
> status: unread -> chatting
>
> _____________________________________________________
> DragonFly issue tracker <bugs@lists.dragonflybsd.org>
> <http://bugs.dragonflybsd.org/issue543>
> _____________________________________________________
Index: kern.post.mk
===================================================================
RCS file: /home/dcvs/src/sys/conf/kern.post.mk,v
retrieving revision 1.8
diff -u -r1.8 kern.post.mk
--- kern.post.mk 19 Jan 2007 07:23:42 -0000 1.8
+++ kern.post.mk 4 Feb 2007 17:26:54 -0000
@@ -103,7 +103,7 @@
rm -f tags1
sed -e 's, ../, ,' tags > tags1
-# Note: when moving the existing kernel to .old, make sure it is stripped
+# Note: when moving the existing kernel to .old, it is by default stripped
# so we do not have two full debug environments sitting in / eating up space.
#
kernel-install:
@@ -112,16 +112,24 @@
exit 1 ; \
fi
.ifdef NOFSCHG
-.if exists(${DESTDIR}/${KERNEL})
+. if exists(${DESTDIR}/${KERNEL})
+. ifdef NO_KERNEL_OLD_STRIP
+ cp -p ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+. else
${OBJCOPY} --strip-debug ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
-.endif
+. endif
+. endif
${INSTALL} -m 555 -o root -g wheel \
${SELECTEDKERNEL} ${DESTDIR}/${KERNEL}
.else
-.if exists(${DESTDIR}/${KERNEL})
+. if exists(${DESTDIR}/${KERNEL})
-chflags noschg ${DESTDIR}/${KERNEL}
+. ifdef NO_KERNEL_OLD_STRIP
+ cp -p ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
+. else
${OBJCOPY} --strip-debug ${DESTDIR}/${KERNEL} ${DESTDIR}/${KERNEL}.old
-.endif
+. endif
+. endif
${INSTALL} -m 555 -o root -g wheel -fschg \
${SELECTEDKERNEL} ${DESTDIR}/${KERNEL}
.endif
@@ -172,11 +180,20 @@
modules-tags:
cd $S ; env ${MKMODULESENV} ${MAKE} -f Makefile.modules tags
-# Note: when moving the existing modules to .old, make sure they are stripped
+# Note: when moving the existing modules to .old, they are by default stripped
# so we do not have two full debug environments sitting in / eating up space.
#
modules-install:
.if !defined(NO_MODULES_OLD)
+. ifdef NO_KERNEL_OLD_STRIP
+ set -- ${DESTDIR}/modules/*; \
+ if [ -f "$$1" ]; then \
+ mkdir -p ${DESTDIR}/modules.old; \
+ for file; do \
+ cp -p $$file ${DESTDIR}/modules.old; \
+ done; \
+ fi
+. else
set -- ${DESTDIR}/modules/*; \
if [ -f "$$1" ]; then \
mkdir -p ${DESTDIR}/modules.old; \
@@ -184,6 +201,7 @@
${OBJCOPY} --strip-debug $$file ${DESTDIR}/modules.old/$${file##*/}; \
done; \
fi
+. endif
.endif
cd $S ; env ${MKMODULESENV} ${MAKE} -f Makefile.modules install
Index: make.conf.5
===================================================================
RCS file: /home/dcvs/src/share/man/man5/make.conf.5,v
retrieving revision 1.23
diff -u -r1.23 make.conf.5
--- make.conf.5 2 Feb 2007 06:33:17 -0000 1.23
+++ make.conf.5 4 Feb 2007 18:40:09 -0000
@@ -339,6 +339,11 @@
.Dq Li "${MAKE} depend"
during
.Dq Li "${MAKE} buildkernel" .
+.It Va NO_KERNEL_OLD_STRIP
+.Pq Vt bool
+Set this to skip stripping debugging symbols from old kernel and modules
+(kernel.old, modules.old) during
+.Dq Li "${MAKE} installkernel" .
.It Va NO_MODULES
.Pq Vt bool
Set to not build modules with the kernel.
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]