glibc_2.1.1-0pre1.3: patches for Hurd port
Hi!
Here's the latest batch of patches for the Hurd port of glibc. As
always, if you have any questions or comments, please don't hesitate
to contact me.
This is the roadmap, by hunk:
1) Only package nscd if we have pthreads.
2) Don't change the timestamps on files while installing.
3) Only strip profiled libs if they aren't linker scripts. Also,
avoid --strip-unneeded because it causes a segfault with my
binutils (strange... I will investigate).
Thanks,
--
Gordon Matzigkeit <gord@fig.org> //\ I'm a FIG (http://www.fig.org/)
Committed to freedom and diversity \// I use GNU (http://www.gnu.org/)
--- debian/rules Sun Mar 21 16:07:02 1999
+++ ../rules Sun Mar 21 16:01:56 1999
@@ -117,15 +117,22 @@
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name core -o -name '.*.rej' -o -size 0 \) -print`
+pkgs := $(libc) $(libc)-dev locales nscd $(libc)-prof $(libc)-dbg $(libc)-pic
+
+ifneq ($(threads),yes)
+# nscd requires pthreads
+pkgs := $(filter-out nscd,$(pkgs))
+nonscd := -e '/^Package: nscd$$/,/^$$/d' -e 's/nscd, //'
+endif
+
debian/control: debian/control.in
sed -e 's%@libc@%$(libc)%g' -e 's%@glibc@%$(glibc)%g' \
- -e 's%@source@%$(glibc)%g' < debian/control.in > debian/control
+ -e 's%@source@%$(glibc)%g' $(nonscd) < debian/control.in > debian/control
binary: binary-indep binary-arch
binary-indep: binary-$(glibc)-doc
-binary-arch: $(addprefix binary-,$(libc) $(libc)-dev \
- locales nscd $(libc)-prof $(libc)-dbg $(libc)-pic)
+binary-arch: $(addprefix binary-,$(pkgs))
debian/libc-doc.doc-base: debian/libc-doc.doc-base.in
sed -e 's%@glibc@%$(glibc)%g' -e 's%@infodir@%$(infodir)%g' \
@@ -477,11 +484,11 @@
ln -sf $$linksrc $$link; \
done
endif
- cp -R $(install_root)$(includedir) $(tmpdir)/$(libc)-dev/usr
+ cp -a $(install_root)$(includedir) $(tmpdir)/$(libc)-dev/usr/
ifeq ($(kernel),linux)
- cp -R $(KERNEL_SOURCE)/include/asm/* \
+ cp -a $(KERNEL_SOURCE)/include/asm/* \
$(tmpdir)/$(libc)-dev$(includedir)/asm
- cp -R $(KERNEL_SOURCE)/include/linux/* \
+ cp -a $(KERNEL_SOURCE)/include/linux/* \
$(tmpdir)/$(libc)-dev$(includedir)/linux
rm -rf $(tmpdir)/$(libc)-dev$(includedir)/linux/modules
rm -f $(tmpdir)/$(libc)-dev$(includedir)/linux/modversions.h
@@ -617,7 +624,18 @@
$(INSTALL_DATA) debian/manpages/sprof.1 \
$(tmpdir)/$(libc)-prof$(mandir)/man1/sprof.1
- strip --strip-debug $(tmpdir)/$(libc)-prof$(libdir)/*_p.a
+# Don't strip linker scripts.
+# FIXME: `strip --unneeded' causes a segfault in binutils-2.9.1.0.19a-2.
+ @tostrip=; for file in \
+ `find $(tmpdir)/$(libc)-prof$(libdir) \
+ -type f -name '*.o' -o -name '*.a'`; do \
+ case `file $$file` in \
+ *text) ;; \
+ *) tostrip="$$tostrip $$file" ;; \
+ esac; \
+ done; \
+ echo "strip --strip-debug $$tostrip"; \
+ strip --strip-debug $$tostrip
strip --strip-unneeded $(tmpdir)/$(libc)-prof$(bindir)/sprof
-gzip -f9 $(tmpdir)/$(libc)-prof$(mandir)/man1/sprof.1
Reply to: