debian/0000755000000000000000000000000013364634536007203 5ustar debian/dietlibc-doc.README.Debian0000644000000000000000000000154512744621604013563 0ustar dietlibc for Debian ------------------- See /usr/share/doc/dietlibc-doc/README on how to use the diet libc to compile programs. Static libraries are installed in /usr/lib/diet/lib/. Include files are installed in /usr/include/diet/, and additionally available through /usr/lib/diet/include/. The diet gcc wrapper is installed in /usr/bin/, and additionally available through /usr/lib/diet/bin/. If you want to build Debian packages with the diet libc, try to set the environment variable DEB_BUILD_OPTIONS=diet when building the package; some Debian packages recognize this, and build a diet package then. Debian packages that provide diet compiled libraries should install them into /usr/lib/diet/lib/, or optionally in /usr/lib/diet//. Include files should be made available through /usr/include/diet//, or optionally installed in /usr/include/diet/. debian/dietlibc-dev.postinst.in0000644000000000000000000000146112744621604013743 0ustar #!/bin/sh set -e test "$1" = 'configure' || exit 0 test ! -h /usr/lib/diet/lib-|ARCH| || exit 0 err() { >&2 cat <<-EOT $1 exists in /usr/lib/diet/lib/ and /usr/lib/diet/lib-|ARCH|/. Debian installs diet compiled libraries in /usr/lib/diet/lib/. Please remove /usr/lib/diet/lib-|ARCH|/$1, and reinstall the package. EOT exit 1 } if test -d /usr/lib/diet/lib-|ARCH|; then for i in `ls -1a /usr/lib/diet/lib-|ARCH|/`; do test "$i" != '.' || continue; test "$i" != '..' || continue test ! -e /usr/lib/diet/lib/"$i" || err "$i" done for i in `ls -1a /usr/lib/diet/lib-|ARCH|/`; do test "$i" != '.' || continue; test "$i" != '..' || continue mv /usr/lib/diet/lib-|ARCH|/"$i" /usr/lib/diet/lib/"$i" || exit 1 done rmdir /usr/lib/diet/lib-|ARCH| fi ln -s lib /usr/lib/diet/lib-|ARCH| debian/changelog0000644000000000000000000011200113364634536011050 0ustar dietlibc (0.33~cvs20120325-4+deb7u1build0.14.04.1) trusty-security; urgency=medium * fake sync from Debian -- Mike Salvatore Fri, 26 Oct 2018 11:57:18 -0400 dietlibc (0.33~cvs20120325-4+deb7u1) wheezy-security; urgency=high * Security: fix insecure default PATH. Thanks to Thorsten Glaser for discovering this -- Christian Seiler Wed, 20 Jul 2016 08:38:13 +0200 dietlibc (0.33~cvs20120325-4) unstable; urgency=low [ Peter Michael Green ] * Tweak arm assembler patch so it works with armv6 vfp too. [ Thorsten Glaser ] * Fix jmp_buf size for armhf (Closes: #689222) -- Thorsten Glaser Sun, 30 Sep 2012 14:15:34 +0000 dietlibc (0.33~cvs20120325-3) unstable; urgency=low * Make the select testcase we run at build-time actually useful * Fix #394928 on ppc64, too (same patch, different directory) -- Thorsten Glaser Tue, 27 Mar 2012 20:18:03 +0000 dietlibc (0.33~cvs20120325-2) unstable; urgency=low * Upstream added a real mipsel port, use it instead of saying mips -- Thorsten Glaser Mon, 26 Mar 2012 19:01:10 +0000 dietlibc (0.33~cvs20120325-1) unstable; urgency=low * Fix compile time warning (utimes undeclared) on armel, armhf, ia64 * Policy 3.9.3 (no relevant changes) * Add VCS-* fields to debian/control * Take new upstream CVS snapshot (CVE-2012-1577) * Add -fno-strict-aliasing to files that emit a warning otherwise * Drop patches merged upstream -- Thorsten Glaser Sun, 25 Mar 2012 15:52:21 +0000 dietlibc (0.33~cvs20111108-5) unstable; urgency=low * Really fix s390 (Probably Closes: #523110) -- Thorsten Glaser Sun, 20 Nov 2011 16:52:41 +0000 dietlibc (0.33~cvs20111108-4) unstable; urgency=low [ Thorsten Glaser ] * “Schlösser Alt” upload * Patch to fix the ssize_t definition, for -Wformat benefit * Testcase to catch a specifically aligned strlen bug, from mtest-ascii1 of the Debian mksh package * Patch for string functions to not read past end of allocation * Patch to make strtod not use 'long double' on alpha, sparc (and sparc64) to make it link again (Closes: #547404) [ Bastian Blank ] * Patch to fix sigsetjmp on s390 (Closes: #523110) -- Thorsten Glaser Sat, 19 Nov 2011 21:15:46 +0000 dietlibc (0.33~cvs20111108-3) unstable; urgency=low * The team of Héctor and me seems to have taken over well enough to close the ITA and drop Gerrit from Uploaders (Closes: #544060) * Upload to unstable * Enable s390x and sparc64 architectures, which are supported upstream, and see what happens -- Thorsten Glaser Fri, 11 Nov 2011 18:06:11 +0000 dietlibc (0.33~cvs20111108-2) experimental; urgency=low * Remove parisc/strstr.S again (Closes: #523086) * Next attempt: use = instead of .equ or .set -- Thorsten Glaser Thu, 10 Nov 2011 18:06:15 +0000 dietlibc (0.33~cvs20111108-1) experimental; urgency=low * debian/rules: New target "get-orig-source" to automate the process of exporting a CVS snapshot, without the CVS dirs, replace CR-LF line endings with LF ones, and tar it up * Update to cvs20111108 * Use .equ instead of .set so it compiles on alpha * Honour nostrip for the diet* binaries, too (Closes: #436767) * Fix "debian/rules clean" not removing a ttt (test) binary * Make "lintian -vIiE --pedantic" clean * Repair ARM mmap syscall (Paul Brook, Timo Juhani Lindfors) -- Thorsten Glaser Tue, 08 Nov 2011 22:36:48 +0000 dietlibc (0.33~cvs20110918-5) experimental; urgency=low * Remove more mentions of the gone dynamic linking support * quilt refresh all patches * Pass -fno-stack-protector from diet to gcc when dietlibc is compiled without SSP support because otherwise programs will segfault, as dietlibc does not set up the registers needed * Re-enable tc523086, as I believe the testcase is right, and if an armhf buildd fails, the buildd is bad (Closes: #644646) * Fix all lintian warnings except CVS in orig.tar.gz - debian/copyright Format URI, fix format (spurious newline) - add comment to d/patches/0014-sparc_v9-does-not-imply-arch64 - remove the .comment section when stripping binaries * Honour DEB_BUILD_OPTIONS=nostrip as well -- Thorsten Glaser Thu, 03 Nov 2011 21:33:39 +0000 dietlibc (0.33~cvs20110918-4) unstable; urgency=low * d/rules: disable tc523086.c test on ARM (segfaults on armhf) -- Hector Oron Fri, 07 Oct 2011 17:33:34 +0100 dietlibc (0.33~cvs20110918-3) unstable; urgency=low [ Thorsten Glaser ] * d/control: do not Recommend or Suggest the dietlibc package which is currently not built for any architecture * d/control: move homepage link from Description into its header -- Hector Oron Thu, 06 Oct 2011 13:51:39 +0100 dietlibc (0.33~cvs20110918-2) unstable; urgency=low * d/patches/fix-ppc64-ftbfs.diff: Fix FTBFS (Closes: #644405) - Thanks Hiroyuki Yamamoto for the fix -- Hector Oron Thu, 06 Oct 2011 13:17:24 +0100 dietlibc (0.33~cvs20110918-1) experimental; urgency=low [ Hector Oron ] * Update to cvs20110918. - Fixes memchr('\0') (Closes: #582654) [ Thorsten Glaser ] * d/control: mention dynamic linking is currently disabled -- Hector Oron Sun, 18 Sep 2011 10:33:12 +0200 dietlibc (0.33~cvs20110710-2) experimental; urgency=low [ Hector Oron ] * Fix build for ARMv7 arches. * Fix FTBFS on s390. * Drop 0015-arm-soft-and-hard-support.diff [ Thorsten Glaser ] * d/diff/0017-disable-propolice: fix FTBFS on SSP-by-default gcc * d/diff/0018-manpage: fix manpage -- Hector Oron Sat, 17 Sep 2011 13:09:44 +0100 dietlibc (0.33~cvs20110710-1) experimental; urgency=low * New upstream pre-release * Bump Standards-Version * Use DEP5 as copyright format * Don't build arm* with DEBUG flag * Use debian source format 3.0 (quilt) * Move tc523086.c into debian/test directory * Add local-options file * Refresh debian patchset * parisc/strstr.S: remove local removal * strip elftrunc and dnsd resulting binaries -- Hector Oron Sun, 10 Jul 2011 23:48:50 +0100 dietlibc (0.32-5.2exp1) experimental; urgency=low [ Thorsten Glaser ] * Make Héctor Orón the new Maintainer (keeping Gerrit as Uploader) * Add myself to Uploaders * d/rules: run tests only if not cross compiling * d/tc523086.c: add reduced testcase from pa-risc strstr bug * d/rules: compile and try to execute tc523086 during build * parisc/strstr.S: remove broken asm implementation (use generic) * d/source/format, d/watch: add to please lintian -- Thorsten Glaser Tue, 08 Mar 2011 20:47:55 +0000 dietlibc (0.32-5.2) unstable; urgency=low * Non-maintainer upload. * Add ARM (armel and armhf) support. (Closes: #459482) -- Hector Oron Fri, 25 Feb 2011 00:35:53 +0000 dietlibc (0.32-5.1) unstable; urgency=high * Non-maintainer upload. * Fix sparc64 detection, based on a patch by Ivan Jager (closes: #604717). Don't use defined(__sparc_v9__) to detect 64bit sparc, use defined(__sparcv9) || defined(__arch64__) instead. -- Julien Cristau Mon, 27 Dec 2010 13:09:27 +0100 dietlibc (0.32-5) unstable; urgency=medium * debian/diff/0013-mips-divdi3.c-fix-include-path-to-longlong.h.diff: remove; obsolete. * debian/diff/0013-sparc-use-mcpu-v9-instead-of-mcpu-supersparc.diff: new; sparc: use -mcpu=v9 instead of -mcpu=supersparc (fixes libowfat build failure on sparc). -- Gerrit Pape Tue, 20 Apr 2010 19:38:47 +0000 dietlibc (0.32-4) unstable; urgency=low * debian/diff/0001-cvs-snapshot-20100209.diff: replace with debian/diff/0001-cvs-snapshot-20100320.diff: cvs snapshot 20100320 (should fix build failure on mips[el]). -- Gerrit Pape Sat, 20 Mar 2010 13:36:20 +0000 dietlibc (0.32-3) unstable; urgency=low * debian/rules: add MYARCH var to make clean to not rely on the output of uname -m (fixes build failure on mips). * debian/diff/0013-mips-divdi3.c-fix-include-path-to-longlong.h.diff: new; mips/divdi3.c: fix include path to "longlong.h" (fixed build failure on mipsel). * debian/rules, debian/control: no longer build the i386 dietlibc package (shared libraries) (see also #544060, closes: #569816). -- Gerrit Pape Mon, 15 Feb 2010 22:25:03 +0000 dietlibc (0.32-2) unstable; urgency=low * debian/diff/0001-cvs-snapshot-20100209.diff: new; cvs snapshot 20100209. * debian/implicit: update to revision a09db2e (thx Daniel Schepler, closes: #445819). * debian/control: Standards-Version: 3.8.3.0. * debian/rules: do not ignore-make-clean-error. -- Gerrit Pape Wed, 10 Feb 2010 10:12:22 +0000 dietlibc (0.32-1) unstable; urgency=low * Thanks Micah Anderson, Simon McVittie for NUMs. * debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff: rename to debian/diff/0011-Add-new-defines-to-indicate-which-...diff. * new upstream version (closes: #532897). * add %Z to strptime, make stdarg work with gcc 4.4 (closes: #530861). -- Gerrit Pape Tue, 22 Sep 2009 11:47:27 +0000 dietlibc (0.31-1.2) unstable; urgency=medium * Non-maintainer upload from the Cambridge BSP. * debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff: treat __NR_umount as the 2-argument version on ia64 (really closes: #508397) * debian/diff/0012-Add-an-implementation-of-umount-3-for-ia64.diff: supply a 1-argument version of umount on ia64 * Verified to pass MNT_DETACH to the kernel in the expected way on ia64 * Verified with strace to do the same thing as glibc on architectures representing the other three families mentioned in 0011-*.diff (i386, x86_64 and alpha) -- Simon McVittie Sat, 03 Jan 2009 17:11:00 +0000 dietlibc (0.31-1.1) unstable; urgency=high * Non-maintainer upload. * debian/diff/0011-undefined-symbol-umount2-alpha-ia64.diff: new; util-vserver: fails to compile on alpha and ia64 due to unresolved umount2 symbols, thanks to Daniel Hokka Zakrisson and Herbert Poetzel, closes: #508397) -- Micah Anderson Thu, 11 Dec 2008 11:28:17 -0500 dietlibc (0.31-1) unstable; urgency=low * new upstream version. * debian/control: Recommends: dietlibc (= ${source:Version}) instead of ${Source-Version}. * debian/diff/????-cvs-snapshot-200705030800.diff: remove; obsolete. * debian/diff/????-arm-syscalls.h-fix-__ARGS_-according-to-comment.diff, debian/diff/????-arm-syscalls.h-add-__ARGS_mbind-__ARGS_get_mempolic.diff: remove; fixed upstream. * debian/diff/0010-util-vserver-vsched-fails-to-read-config-directory.diff: new; util-vserver: vsched fails to read config directory (patch from http://people.linux-vserver.org/~dhozac/p/m/delta-dietdirent-fix01.diff, thx Daniel Hokka Zakrisson, closes: #435538). -- Gerrit Pape Sun, 26 Aug 2007 10:02:26 +0000 dietlibc (0.30-7) unstable; urgency=low * debian/diff/0012-workaround-Bug-428814-powerpc-error-initializer-e.diff: new; workaround Bug#428814: [powerpc] error: initializer element is not constant (fixes build failure on powerpc). -- Gerrit Pape Mon, 02 Jul 2007 09:59:03 +0000 dietlibc (0.30-6) unstable; urgency=low * debian/diff/ia64-no-fno-omit-frame-pointer.diff: remove; obsolete (see #286840). * debian/diff/*: redo diffs with git. * debian/diff/0010-arm-syscalls.h-fix-__ARGS_-according-to-comment.diff: new; arm/syscalls.h: fix __ARGS_* according to comment. * debian/diff/0011-arm-syscalls.h-add-__ARGS_mbind-__ARGS_get_mempolic.diff: new; arm/syscalls.h: add __ARGS_mbind, __ARGS_get_mempolicy, __ARGS_set_mempolicy (fixes build failure on arm). * debian/rules: apply diffs with patch -p1, not -p0. -- Gerrit Pape Thu, 03 May 2007 10:12:39 +0000 dietlibc (0.30-5) unstable; urgency=low * debian/diff/cvs-20070411.diff: new; cvs snapshot 20070411. -- Gerrit Pape Wed, 11 Apr 2007 08:27:19 +0000 dietlibc (0.30-4) unstable; urgency=high * debian/diff/select.diff: remove again; doesn't work for all archs. * debian/diff/ppc-select.diff: new; use syscall _newselect instead of select on ppc (closes: #394928). -- Gerrit Pape Tue, 31 Oct 2006 07:53:57 +0000 dietlibc (0.30-3) unstable; urgency=high * debian/diff/select.diff: new; use syscall _newselect on all archs (thx Bastian Blank, closes: #394928). * debian/rules: run select selftest after building. -- Gerrit Pape Mon, 30 Oct 2006 20:57:45 +0000 dietlibc (0.30-2) unstable; urgency=low * debian/diff/parisc-sem.diff: new; parisc has the semctl, semop, semget syscalls (closes: #393678). * debian/diff/no-clobber-home.diff: new; don't clobber the HOME environment variable for the duration of the build (closes: #393682, thx Ted Percival). -- Gerrit Pape Tue, 17 Oct 2006 19:11:27 +0000 dietlibc (0.30-1) unstable; urgency=low * new upstream version. * debian/diff/cvs-20060609.diff: remove; obsolete. * debian/diff/ia64-proc-endp.diff, debian/diff/xarm-comment-char.diff: remove; fixed upstream. * debian/diff/arm-waitpid.diff: remove; possibly out of date, and we stopped building dynamic lib on arm anyway. * debian/diff/mips-pic.diff: adapt. * debian/diff/parisc-iitlbp.diff: minor. -- Gerrit Pape Sat, 8 Jul 2006 13:34:24 +0000 dietlibc (0.29-15) unstable; urgency=low * debian/diff/no-ssp.diff: don't WANT_SSP; it causes similar problems as WANT_STACKGAP back in Dec 2004 (closes: #374349). * debian/diff/xgcc-4.1-ssp.diff: remove, ssp is disabled. -- Gerrit Pape Mon, 19 Jun 2006 18:02:34 +0000 dietlibc (0.29-14) unstable; urgency=low * debian/diff/xarm-comment-char.diff: new: s/@/%/ for arm assembler (fixes build failure on arm). * debian/diff/xgcc-4.1-ssp.diff: new: ssp with gcc 4.1 needs __guard.o in libc.so (fixes build failure on i386). -- Gerrit Pape Wed, 14 Jun 2006 16:17:05 +0000 dietlibc (0.29-13) unstable; urgency=low * debian/diff/cvs-20060609.diff: new: cvs snapshot from 200606090800. * debian/diff/cvs-20060416.diff: remove; obsolete. * debian/diff/fflush-null.diff: don't skip flushing streams with flags&BUFINPUT (closes: #370274). * debian/rules: fix sed script for parsing debian/dietlibc-dev.*.in (closes: #372178). -- Gerrit Pape Sat, 10 Jun 2006 10:37:12 +0000 dietlibc (0.29-12) unstable; urgency=low * debian/diff/fflush-null.diff: new; fflush(NULL): don't flush input streams (stdin) (closes: #346437). * debian/control: Standards-Version: 3.7.2.0. * debian/dietlibc-dev.prerm.in: minor. -- Gerrit Pape Fri, 26 May 2006 18:29:49 +0000 dietlibc (0.29-11) unstable; urgency=low * debian/diff/cvs-20060416.diff: new: cvs snapshot from 200604161700. * debian/diff/cvs-20051012.diff: remove; obsolete. * debian/diff/patch-diet-parisc-fix06.diff, debian/diff/s390-mmap.diff: remove; applied upstream cvs. * debian/implicit: update to revision 1.11. -- Gerrit Pape Sun, 16 Apr 2006 17:55:52 +0000 dietlibc (0.29-10) unstable; urgency=low * debian/diff/patch-diet-parisc-fix06.diff: new; fixes issues with the parisc syscalls that all contain 5 or 6 arguments (thx Herbert Poetzwl, Micah Anderson, closes: #351875, #360007). * debian/diff/parisc-sendto-recvfrom.diff: remove; obsolete. -- Gerrit Pape Sat, 1 Apr 2006 10:31:30 +0000 dietlibc (0.29-9) unstable; urgency=low * debian/diff/s390-mmap.diff: new; fix mmap and missing mmap64 implementation for s390 (thx Bastian Blank, closes: #356557). -- Gerrit Pape Mon, 20 Mar 2006 20:27:13 +0000 dietlibc (0.29-8) unstable; urgency=low * debian/rules: binary-arch: set MYARCH on make install also (fixes build failure on sparc). -- Gerrit Pape Thu, 22 Dec 2005 16:30:02 +0000 dietlibc (0.29-7) unstable; urgency=low * debian/diff/parisc-sendto-recvfrom.diff: new: fix sendto(), recvfrom() on hppa. -- Gerrit Pape Tue, 20 Dec 2005 13:14:04 +0000 dietlibc (0.29-6) unstable; urgency=low * debian/diff/parisc-iitlbp.diff: new; from glibc: Update hppa assembly for current CVS binutils (fixes build failure on hppa). -- Gerrit Pape Sun, 16 Oct 2005 18:29:25 +0000 dietlibc (0.29-5) unstable; urgency=low * debian/dietlibc-dev.prerm.in: new; remove /usr/lib/diet/lib-|ARCH| on 'remove'. * debian/rules: create debian/dietlibc-dev.prerm from debian/dietlibc-dev.prerm.in (closes: #328283). * debian/diff/cvs-20051012.diff: new; cvs snapshot from 200510120900. * debian/diff/cvs-20050731.diff, debian/diff/rpc_svcauth_.diff: remove; obsolete. -- Gerrit Pape Wed, 12 Oct 2005 09:12:58 +0000 dietlibc (0.29-4) unstable; urgency=low * ia64-proc-endp.diff: new; ia64 asm: A2124 previous proedure not yet ended (fixes build failure on ia64). * debian/control, debian/rules: no longer build dynamic library on arm, it's not really usable anyway (fixes build failure on arm). -- Gerrit Pape Sat, 13 Aug 2005 13:59:57 +0000 dietlibc (0.29-3) unstable; urgency=low * debian/diff/cvs-20050731.diff: new; cvs snapshot from 200507311100. -- Gerrit Pape Sun, 31 Jul 2005 11:25:07 +0000 dietlibc (0.29-2) unstable; urgency=low * debian/diff/arm-waitpid.diff: new; re-add #define __NR_waitpid for arm (works around build failure of dynamic lib on arm; still not really usable though). -- Gerrit Pape Sun, 29 May 2005 10:51:51 +0000 dietlibc (0.29-1) unstable; urgency=low * new upstream version. - switches gcc option -malign-functions to -falign-functions in diet on i386 (no longer supports gcc 2, closes: #234961). * debian/diff/LD_RUN_PATH.diff, debian/diff/__powerpc__.diff, debian/diff/dns-decoding.diff, debian/diff/fcntl.h.diff, debian/diff/s390-select.diff, debian/diff/siginfo-64bit.diff: remove; obsolete. -- Gerrit Pape Wed, 25 May 2005 19:33:41 +0000 dietlibc (0.28-3) unstable; urgency=medium * debian/diff/s390-select.diff: new; add select for s390 (using _newselect) (see #297806). -- Gerrit Pape Mon, 28 Mar 2005 12:28:30 +0000 dietlibc (0.28-2) unstable; urgency=low * debian/control: add Architecture: ppc64 (thx Andreas Jochens, closes: #299226). * debian/diff/LD_RUN_PATH.diff: new; from upstream cvs: oops, fix LD_RUN_PATH unsetting (Enrico Scholz). * debian/diff/__powerpc__.diff: new; from upstream cvs: #ifdef powerpc -> #ifdef __powerpc__ (Enrico Scholz) (closes: #300917). * debian/diff/dns-decoding.diff: new; from upstream cvs: fix stupid dns decoding bug (Gernot Tenchio) (plus undocumented __NO_STAT64 fix). * debian/diff/siginfo-64bit.diff: new; from upstream cvs: struct siginfo was wrong for 64-bit platforms. * debian/diff/fcntl.h.diff: new; update to include/fcntl.h from cvs 20050325 (don't include readahead(2)). -- Gerrit Pape Fri, 25 Mar 2005 13:22:38 +0000 dietlibc (0.28-1) unstable; urgency=low * new upstream version (.orig.tar.gz re-packaged without CVS/ directories). * debian/diff/cvs-20041219.diff: remove; obsolete. * debian/diff/nice.diff: adapt; still set errno=EPERM on error. * debian/dietlibc-doc.docs: add README.security. * debian/rules: minor. -- Gerrit Pape Mon, 31 Jan 2005 22:21:06 +0000 dietlibc (0.27-7) unstable; urgency=low * debian/diff/ia64-no-fno-omit-frame-pointer.diff: new; don't use -fno-omit-frame-pointer on ia64 (works around #286840). * debian/rules: get VERSION from debian/changelog. * debian/diff/nice.diff: update; set errno=EPERM on error. -- Gerrit Pape Thu, 23 Dec 2004 14:18:36 +0000 dietlibc (0.27-6) unstable; urgency=low * debian/diff/nice.diff: new; fixes nice() on alpha, ia64 (closes: #286603). -- Gerrit Pape Tue, 21 Dec 2004 11:06:32 +0000 dietlibc (0.27-5) unstable; urgency=low * debian/diff/cvs-20041219.diff: new; cvs snapshot (closes: #285631). * debian/diff/mmap64.diff, debian/diff/strcat-compliant.diff, debian/diff/cvs-20041207.diff: remove; included upstream. -- Gerrit Pape Mon, 20 Dec 2004 19:57:06 +0000 dietlibc (0.27-4) unstable; urgency=low * debian/rules: announce VERSION='0.27-4' (also in dynlib package). * debian/diff/make-clean.diff: remove; unneeded. * debian/diff/mmap64.diff: new; (fixes build failure on arm; fixes build failure of fnord on parisc, ppc). * debian/diff/mips-pic.diff: re-add: still don't use -fno-pic on mips/el (fixes build failure of cvm on mips/el). -- Gerrit Pape Fri, 10 Dec 2004 11:55:59 +0000 dietlibc (0.27-3) unstable; urgency=low * debian/diff/arm-waitpid.diff, debian/diff/mips-pic.diff: remove; fixed in debian/diff/cvs-20041207.diff. * debian/diff/64bitenviron.diff, debian/diff/64bitfixes.diff, debian/diff/memleak.diff, debian/diff/setlocale.diff: remove; included in debian/diff/cvs-20041207.diff. * debian/diff/cvs-20041207.diff: new; cvs snapshot. * debian/diff/rpc_svcauth_.diff: new; make _svcauth_unix, _svcauth_short non-static. * debian/rules: apply diffs in order; announce VERSION='0.27-3'. * debian/dietlibc-dev.postinst.in: minor. * debian/diff/strcat-compliant.diff: new; don't WANT_NON_COMPLIANT_STRNCAT. -- Gerrit Pape Tue, 7 Dec 2004 18:15:08 +0000 dietlibc (0.27-2) unstable; urgency=medium * debian/diff/64bitenviron.diff: new; from upstream cvs: #include in syscalls.s/environ.S to make sure environ is actually large enough (Enrico Scholz) (closes: #273748). * debian/diff/64bitfixes.diff: new; from upstream cvs: several fixes from Gwenole Beauchesne, AMD64 and otherwise. * debian/diff/memleak.diff: new; from upstream cvs: fix memory leak in regfree (thanks, Valgrind!). * debian/diff/setlocale.diff: new; from upstream cvs: setlocale now accepts setting the locale to "C". -- Gerrit Pape Tue, 28 Sep 2004 17:25:12 +0000 dietlibc (0.27-1) unstable; urgency=low * new upstream version. * debian/copyright: minor. * debian/implicit: update to revision 1.10. * debian/dietlibc-dev.postinst.in: typo. * debian/rules: minor cleanup. * debian/diff/cvs-20040620.diff: remove; obsolete. -- Gerrit Pape Sat, 31 Jul 2004 20:03:44 +0000 dietlibc (0.26-3) unstable; urgency=low * debian/diff/cvs-20040609.diff: remove. * debian/diff/ppc-redefinition.diff: remove; fixed upstream. * debian/diff/cvs-20040620.diff: new; cvs snapshot: o PowerPC build fix (Gerrit Pape) o Olaf: added missing settimeofday o add netinet/ether.h and netinet/if_ether.h * debian/rules: install diet compiled libraries in /usr/lib/diet/lib/ (static and shared); process dietlibc-dev.postinst.in; minor. * debian/dietlibc-dev.postinst.in: make sure /usr/lib/diet/lib-$(ARCH) -> lib is a symlink, move libraries if necessary. * debian/dietlibc-doc.README.Debian: new; document DEB_BUILD_OPTIONS=diet and where to put libraries, include files. -- Gerrit Pape Sun, 20 Jun 2004 18:14:51 +0000 dietlibc (0.26-2) unstable; urgency=low * debian/diff/ppc-redefinition.diff: new; remove duplicate definition from include/asm/ppc-sigcontext.h (fixes build failure on ppc). -- Gerrit Pape Thu, 10 Jun 2004 09:28:58 +0000 dietlibc (0.26-1) unstable; urgency=low * new upstream version. * debian/rules: remove ia64/waitpid.S workaround, fixed by upstream. * debian/diff/make-clean.diff, debian/diff/mips-pic.diff: adapt to new upstream version. * debian/diff/cvs-20040609.diff: new; cvs snapshot: o change DNS routines to look for ip6.arpa instead of ip6.int o WANT_FREAD_OPTIMIZATION was broken on sockets (Johannes Stezenbach) o added fix for getgrouplist (Nikola Vladov) o fix the fd leak on error path (Denis Vlasenko) o the regparm attribute in typedefinition generats error with gcc-2.95 on non-x86 arch... (reported: Johannes Stezenbach) -- Gerrit Pape Thu, 10 Jun 2004 07:15:35 +0000 dietlibc (0.25-3) unstable; urgency=low * debian/rules: remove erroneous ia64/waitpid.S before build. -- Gerrit Pape Fri, 28 May 2004 20:13:03 +0000 dietlibc (0.25-2) unstable; urgency=low * debian/control, debian/rules: dietlibc-dev package for amd64 (thx Andreas Jochens; closes: #245292). -- Gerrit Pape Sun, 25 Apr 2004 05:15:48 +0000 dietlibc (0.25-1) unstable; urgency=low * new upstream version. * debian/diff/cvs-20040325.diff: remove; obsolete. * debian/implicit: update to revision 1.8. -- Gerrit Pape Sun, 28 Mar 2004 08:14:10 +0000 dietlibc (0.24-5cvs20040325) unstable; urgency=low * debian/diff/cvs-20040325.diff: new; cvs snapshot while waiting for 0.25; (fixes #232200). * debian/diff/arm-waitpid.diff: new; (fixes build problem with runit package on arm). * debian/diff/mips-pic.diff: adapt. * debian/implicit: update to revision 1.7. * debian/rules: typo. -- Gerrit Pape Thu, 25 Mar 2004 13:28:44 +0000 dietlibc (0.24-4) unstable; urgency=medium * debian/rules: set MYARCH=parisc on hppa, MYARCH=mips on mipsel (fixes build failure on hppa, mipsel). -- Gerrit Pape Mon, 9 Feb 2004 10:35:12 +0000 dietlibc (0.24-3) unstable; urgency=low * debian/implicit: update to revision 1.5. * debian/rules: override upstream's Makefile test for MYARCH with dpkg-architecture -qDEB_HOST_ARCH; minor. -- Gerrit Pape Wed, 28 Jan 2004 10:51:46 +0000 dietlibc (0.24-2) unstable; urgency=low * debian/control: Standards-Version: 3.6.1.0; no longer Build-Depends: debhelper. * debian/copyright: quote license header. * debian/rules: stop using debhelper, use implicit Makefile rules; use dpkg-architecture instead of uname -m. * debian/implicit: new; implicit rules. * debian/dietlibc.conffiles: new. * debian/dietlibc-dev.files, debian/dietlibc.files: remove; obsolete. -- Gerrit Pape Wed, 17 Dec 2003 20:04:54 +0000 dietlibc (0.24-1) unstable; urgency=low * new upstream version. * debian/diff/cvs-20031119.diff: remove. * debian/diff/make-clean.diff: new; make clean in libpthread. -- Gerrit Pape Tue, 25 Nov 2003 19:58:51 +0000 dietlibc (0.23-4) unstable; urgency=low * debian/diff/cvs-20031119.diff: new; snapshot from upstream cvs. * debian/diff/ia64-assembly.diff, debian/diff/ia64-pipe.diff, debian/diff/parisc-assembly.diff: remove; obsolete. * debian/control: add s390 to Architectures: field of dietlibc-dev; add arm to Architectures: field of dietlibc; adapt long descriptions. * debian/rules: build dynamic diet libc library on arm (additionally to i386); don't dh_fixperms of libdl.so only. -- Gerrit Pape Wed, 19 Nov 2003 10:36:41 +0000 dietlibc (0.23-3) unstable; urgency=low * debian/diff/ia64-assembly.diff: new; taken from upstream cvs; fixes fork() on ia64. * debian/diff/ia64-pipe.diff: new; fixes pipe() (thx Thomas Ogrisegg). * debian/diff/parisc-assembly.diff: new; taken from upstream cvs; fixes typo in setjmp.S; fixes str*.S assembly routines. * debian/rules: re-enable building parisc/str*.S assembly routines. -- Gerrit Pape Mon, 3 Nov 2003 10:07:41 +0000 dietlibc (0.23-2) unstable; urgency=medium * force package re-build on arm (bug #215913, #216958). -- Gerrit Pape Thu, 23 Oct 2003 10:55:03 +0000 dietlibc (0.23-1) unstable; urgency=low * new upstream version. * debian/diff/cvs-20030904.diff: remove. * debian/rules: still don't build parisc/str*.S for now. -- Gerrit Pape Sat, 13 Sep 2003 09:02:31 +0000 dietlibc (0.22-3cvs20030904.1) unstable; urgency=low * debian/rules: don't build new parisc assembly routines for now (fixes build failure on hppa). * new cvs snapshot provides vasprintf() (closes: #192233). -- Gerrit Pape Fri, 5 Sep 2003 10:19:57 +0200 dietlibc (0.22-3cvs20030904) unstable; urgency=low * debian/diff/cvs-20030714.diff: remove. * debian/diff/cvs-20030904.diff: new; new cvs snapshot. * debian/diff/parisc-stat-struct.diff: remove; applied upstream. -- Gerrit Pape Thu, 4 Sep 2003 16:50:20 +0200 dietlibc (0.22-3cvs20030714.1) unstable; urgency=low * debian/diff/parisc-stat-struct.diff: new; fix 'stat struct' on parisc (closes: #200619). * debian/control: Standards-Version: 3.6.0. -- Gerrit Pape Tue, 19 Aug 2003 10:40:51 +0200 dietlibc (0.22-3cvs20030714) unstable; urgency=low * debian/control: package dietlibc-dev: Section: libdevel. * debian/diff/cvs-20030714.diff: new; upstream cvs snapshot. * fixes linker failure on sparc (closes: #200756). * removes unmotivated gcc3 workaround (closes: #192936). * debian/diff/rpc-int-overflow.diff: remove; included in cvs snapshot. * debian/diff/mips-pic.diff: adapt to cvs snapshot changes. * debian/rules: use ls -t and ls -tr when applying patches. -- Gerrit Pape Mon, 14 Jul 2003 14:26:08 +0200 dietlibc (0.22-2) unstable; urgency=high * debian/diff/rpc-int-overflow.diff: new; fix integer overflow in sun rpc code (taken from upstream: taken from glibc; CA-2003-10) -- Gerrit Pape Sat, 22 Mar 2003 22:37:29 +0100 dietlibc (0.22-1) unstable; urgency=low * new upstream version. * debian/diff/64bit-lseek64.diff: remove; applied upstream. * debian/diff/parisc64-build.diff: remove; applied upstream. * debian/diff/sparc32-sysdep.diff: remove; fixed/partly applied upstream. -- Gerrit Pape Thu, 20 Feb 2003 10:29:20 +0100 dietlibc (0.22-0cvs20021128.3) unstable; urgency=low * debian/rules: build architecture independent package in target binary-indep (closes: #179403); do not install undocumented.7 symlink. * debian/diff/sparc32-sysdep.diff: new; include udiv, umel, urem objects in libc.a (fixes fnord build failure on sparc); libc6 also does this, but generally '-msupersparc' should make this obsolete, hmm; I'm not completely sure about this fix. * debian/control: Standards-Version: 3.5.8 * debian/copyright: typo. -- Gerrit Pape Wed, 5 Feb 2003 13:00:37 +0100 dietlibc (0.22-0cvs20021128.2) unstable; urgency=low * debian/diff/64bit-lseek64.diff: new: fix lseek64 on 64-bit architectures (fixes fnord build failure on ia64). -- Gerrit Pape Tue, 28 Jan 2003 11:21:43 +0100 dietlibc (0.22-0cvs20021128.1) unstable; urgency=low * i386/mmap64.S, i386/dyn_syscalls.S: from upstream cvs; fixes dynamic library pic problem (thx Frank Bennett). * include/signal.h: from upstream cvs. * debian/diff/sparc-signal.h.diff: remove; patch is applied upstream. -- Gerrit Pape Thu, 9 Jan 2003 10:29:08 +0100 dietlibc (0.22-0cvs20021128) unstable; urgency=low * debian/diff/sparc-signal.h.diff: new; fix typo in upstream CVS (fixes build failure on sparc). * debian/rules: support 'debug' in DEB_BUILD_OPTIONS; minor cleanup. -- Gerrit Pape Thu, 28 Nov 2002 13:21:22 +0100 dietlibc (0.22-0cvs20021127) unstable; urgency=low * debian/control: dietlibc-doc is Section: doc. * upstream cvs snapshot 20021127. * debian/diff/parisc64-build.diff: new; build on parisc64. * available for ia64 (please test). -- Gerrit Pape Wed, 27 Nov 2002 10:57:32 +0100 dietlibc (0.21-4) unstable; urgency=low * debian/rules: don't 'dh_fixperms' of .so libraries (closes: #167846). -- Gerrit Pape Tue, 5 Nov 2002 10:58:39 +0100 dietlibc (0.21-3) unstable; urgency=low * debian/rules: add target patch, patch-stamp: apply diffs from debian/diff/; apply reverse diffs in clean target. * debian/diff/mips-pic.diff: new; * avoid -fno-pic on mips/mipsel, libgcc.a is compiled with -fPIC on Debian (thx Johannes Stezenbach). -- Gerrit Pape Wed, 30 Oct 2002 13:34:07 +0100 dietlibc (0.21-2) unstable; urgency=medium * libshell/realpath.c: include fix from upstream cvs (closes: #165802). * alpha/__alarm.c, syscalls.s/alarm.S, alpha/Makefile.add: include fix for alarm() on alpha from upstream cvs (fixes fnord build failure). * include/signal.h: from upstream cvs. -- Gerrit Pape Sat, 26 Oct 2002 12:26:37 +0200 dietlibc (0.21-1) unstable; urgency=low * new upstream version. * Makefile: minor patch to build the parisc port on ARCH=parisc64. * available for hppa (please test). * dietlibc-dev: add lintian override: statically-linked-binary. -- Gerrit Pape Wed, 9 Oct 2002 12:53:39 +0200 dietlibc (0.20-0cvs20020808) unstable; urgency=medium * new cvs snapshot: includes fix for integer overflow checks: * lib/alloc.c, libstdio/fwrite.c: remove division by zero chance in integer overflow check. -- Gerrit Pape Thu, 8 Aug 2002 21:46:01 +0200 dietlibc (0.20-0cvs20020806) unstable; urgency=high * new upstream version 0.19 plus security fix: add several integer overflow checks from upstream cvs: * lib/alloc.c, include/limits.h: fix calloc integer overflow (notified by RUS-CERT). -- Gerrit Pape Wed, 7 Aug 2002 00:38:50 +0200 dietlibc (0.18-1) unstable; urgency=low * new upstream version. * lib/sscanf.c: fix "%d%n" handling (closes: #147315). -- Gerrit Pape Sat, 20 Jul 2002 15:26:31 +0200 dietlibc (0.17-2) unstable; urgency=low * bugfix taken from upstream cvs (closes: #143668): * libstdio/ftell.c: ftell did not take ungetc into account (Kevin Ryde through Debian). -- Gerrit Pape Mon, 13 May 2002 11:14:07 +0200 dietlibc (0.17-1) unstable; urgency=low * new maintainer. * new upstream version. * installs into /usr/lib/diet. * builds successfully on powerpc (closes: #143397). -- Gerrit Pape Mon, 6 May 2002 09:52:21 +0200 dietlibc (0.16-2) unstable; urgency=low * Changed rules script to only compile the dynamic library if if it is i386 only (Closes: #141795) -- Abraham vd Merwe Mon, 8 Apr 2002 18:22:15 +0200 dietlibc (0.16-1) unstable; urgency=low * New version. Sorry about this (Closes: #132315, #138338, #139223) * Dynamic linking support - shaky of course * S/390 (s390) support * Removed README.Debian (all the questions is now covered in the main FAQ) * Use a slightly modified version of Felix's diet binaries instead of my shell script. * Probably other things which I can't remember :P -- Abraham vd Merwe Fri, 22 Mar 2002 19:19:19 +0200 dietlibc (0.12-2) unstable; urgency=low * Fixed mipsel bug in Makefile.add (Closes: #125781) * Changed debian rules file so that copyright can be installed for architecture dependant files as well (Closes: #124152) -- Abraham vd Merwe Wed, 19 Dec 2001 22:17:51 +0200 dietlibc (0.12-1) unstable; urgency=low * New upstream version * I've changed debian/rules to make diet executable after replacing the default diet wrappers (Closes: #120297) * Added the new documents to debian/docs * Added Russel Nelson's patch (posted on dietlibc-dev). Dietlibc should build on ARM now (Closes: #120396) * The fputc('\n',stderr) bug seems to be fixed in 0.12 (Closes: #122164) * I've split the package up into three seperate packages. -- Abraham vd Merwe Thu, 4 Dec 2001 22:19:07 +0200 dietlibc (0.11-4) unstable; urgency=low * Changed Makefile and debian/rules to use 'uname -m' again in order to determine the architecture (Closes: #119715) -- Abraham vd Merwe Thu, 15 Nov 2001 19:50:32 +0200 dietlibc (0.11-3) unstable; urgency=low * Removed the -EB flag from mips/Makefile.add. The mipsel bug should hopefully now be fixed. (Closes: #109209) -- Abraham vd Merwe Sat, 10 Nov 2001 11:11:09 +0200 dietlibc (0.11-2) unstable; urgency=low * Changed Makefile and debian/rules to use 'dpkg --print-architecture' in order to determine the host architecture (Closes: #109209) * Added a rule in debian/rules to remove backup files (Closes: #117273) -- Abraham vd Merwe Mon, 29 Oct 2001 18:29:15 +0200 dietlibc (0.11-1) unstable; urgency=low * Updated README.Debian * Dietlibc will now only build for all the officially supported platforms (Closes: #104688) * Removed preinst kernel header compatibility hack. Since the new dietlibc doesn't depend on the kernel headers, this is not necessary anymore. -- Abraham vd Merwe Thu, 2 Aug 2001 00:16:23 +0200 dietlibc (0.10-1) unstable; urgency=low * Initial Release. (Closes: #99955) -- Abraham vd Merwe Sat, 16 Jun 2001 01:06:56 +0200 Local variables: mode: debian-changelog End: debian/dietlibc-doc.docs0000644000000000000000000000031412744621604012366 0ustar AUTHOR BUGS CAVEAT FAQ PORTING README README.security SECURITY THANKS TODO dynlinker.README libdl.README libpthread.CHANGES libpthread.README profiling.PORTING profiling.README sparc64.README ia64.README debian/rules0000755000000000000000000001331712744621604010261 0ustar #!/usr/bin/make -f # for "debian/rules get-orig-source" ORIGTGZ_SOURCE:= -D'2012/03/25 15:00' ORIGTGZ_DESTINATION:= 0.33~cvs20120325 # determine whether we are cross-compiling DEB_BUILD_GNU_TYPE:=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE:=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ifeq (${DEB_BUILD_GNU_TYPE},${DEB_HOST_GNU_TYPE}) CROSS:=0 else CROSS:=1 endif ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) DEBUG =DEBUG=1 else DEBUG = endif ARCH ?=$(shell dpkg-architecture -qDEB_HOST_ARCH) ifeq ($(ARCH),amd64) ARCH =x86_64 else ifeq ($(ARCH),powerpc) ARCH =ppc else ifeq ($(ARCH),hppa) ARCH =parisc else ifneq (,$(findstring arm,$(ARCH))) ARCH =arm # DEBUG =DEBUG=1 endif endif endif endif DYN =0 ifneq ($(ARCH),i386) DYN =0 endif DIR =$(shell pwd)/debian/dietlibc VERSION =$(shell head -n1 debian/changelog |sed -e 's/.*(\(.*\)).*/\1/') build: deb-checkdir build-stamp build-stamp: rm -f parisc/strstr.S $(MAKE) prefix=/usr/lib/diet \ MYARCH='$(ARCH)' VERSION='$(VERSION)' $(DEBUG) ifeq (${CROSS},0) bin-'$(ARCH)'/diet -v -Os gcc -nostdinc -o ttt test/select.c ./ttt rm -f ttt bin-'$(ARCH)'/diet -v -Os gcc -nostdinc -static -o ttt debian/test/tc523086.c ./ttt rm -f ttt bin-'$(ARCH)'/diet -v -Os gcc -nostdinc -static -o ttt debian/test/t-ascii1.c ./ttt rm -f ttt endif test '$(DYN)' -eq 0 || \ $(MAKE) dyn prefix=/usr/lib/diet \ MYARCH='$(ARCH)' VERSION='$(VERSION)' $(DEBUG) touch build-stamp clean: deb-checkdir deb-checkuid $(MAKE) clean MYARCH='$(ARCH)' rm -f build-stamp install-stamp ttt rm -f dynlinker.README libdl.README libpthread.CHANGES \ libpthread.README profiling.PORTING profiling.README \ sparc64.README ia64.README changelog rm -rf '$(DIR)' '$(DIR)'-dev '$(DIR)'-doc rm -f debian/files debian/substvars debian/dietlibc-dev.postinst \ debian/dietlibc-dev.prerm install: deb-checkdir deb-checkuid install-stamp install-stamp: build-stamp rm -rf '$(DIR)' '$(DIR)'-dev '$(DIR)'-doc install -d -m0755 '$(DIR)'/etc $(MAKE) install prefix=/usr/lib/diet DESTDIR='$(DIR)' \ MYARCH='$(ARCH)' VERSION='$(VERSION)' $(DEBUG) # dietlibc dietlibc-dev dietlibc-doc echo '/usr/lib/diet/lib' >'$(DIR)'/etc/diet.ld.conf install -d -m0755 '$(DIR)'-dev/usr/include mv '$(DIR)'/usr/lib/diet/include '$(DIR)'-dev/usr/include/diet install -d -m0755 '$(DIR)'-dev/usr/lib/diet ln -s ../../include/diet '$(DIR)'-dev/usr/lib/diet/include mv '$(DIR)'/usr/lib/diet/lib-'$(ARCH)' '$(DIR)'/usr/lib/diet/lib cp -pr '$(DIR)'/usr/lib/diet/lib '$(DIR)'-dev/usr/lib/diet/ rm -f '$(DIR)'/usr/lib/diet/lib/*.[ao] rm -f '$(DIR)'-dev/usr/lib/diet/lib/*.so #ln -s lib '$(DIR)'-dev/usr/lib/diet/lib-'$(ARCH)' mv '$(DIR)'/usr/lib/diet/bin '$(DIR)'-dev/usr/lib/diet/ install -d -m0755 '$(DIR)'-dev/usr/bin mv '$(DIR)'-dev/usr/lib/diet/bin/diet* '$(DIR)'-dev/usr/bin/ ln -s ../../../bin/diet '$(DIR)'-dev/usr/lib/diet/bin/ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) strip -s -R .comment '$(DIR)'-dev/usr/bin/diet if test '$(DYN)' -eq 1; then \ strip -s -R .comment '$(DIR)'-dev/usr/bin/diet-dyn; \ fi strip -s -R .comment '$(DIR)'-dev/usr/lib/diet/bin/dnsd strip -s -R .comment '$(DIR)'-dev/usr/lib/diet/bin/elftrunc endif if test '$(DYN)' -eq 1; then \ ln -s ../../../bin/diet-dyn '$(DIR)'-dev/usr/lib/diet/bin/ && \ chmod 0644 '$(DIR)'/usr/lib/diet/lib/*.so && \ chmod 0755 '$(DIR)'/usr/lib/diet/lib/libdl.so; \ fi install -d -m0755 $(DIR)-dev/usr/share/man mv $(DIR)/usr/lib/diet/man/man? $(DIR)-dev/usr/share/man/ gzip -9 $(DIR)-dev/usr/share/man/man?/* rmdir $(DIR)/usr/lib/diet/man install -d -m0755 $(DIR)-doc # .in sed -e 's/|ARCH|/$(ARCH)/g' debian/dietlibc-dev.postinst sed -e 's/|ARCH|/$(ARCH)/g' debian/dietlibc-dev.prerm # lintian overrides install -d -m0755 '$(DIR)'-dev/usr/share/lintian/overrides install -m0644 debian/dietlibc-dev.lintian \ '$(DIR)'-dev/usr/share/lintian/overrides/dietlibc-dev # doc rm -f dynlinker.README libdl.README libpthread.CHANGES \ libpthread.README profiling.PORTING profiling.README \ sparc64.README ia64.README changelog ln -s dynlinker/README dynlinker.README ln -s libdl/README libdl.README ln -s libpthread/CHANGES libpthread.CHANGES ln -s libpthread/README libpthread.README ln -s profiling/PORTING profiling.PORTING ln -s profiling/README profiling.README ln -s sparc64/README sparc64.README ln -s ia64/README ia64.README ln -s CHANGES changelog touch install-stamp binary-indep: deb-checkdir deb-checkuid install dietlibc-doc.deb dpkg-gencontrol -isp -pdietlibc-doc -P'$(DIR)'-doc dpkg -b '$(DIR)'-doc .. binary-arch: deb-checkdir deb-checkuid install dietlibc-dev.deb dietlibc.deb dpkg-gencontrol -isp -pdietlibc-dev -P'$(DIR)'-dev dpkg -b '$(DIR)'-dev .. if test '$(DYN)' -eq 1; then \ dpkg-gencontrol -isp -pdietlibc -P'$(DIR)'; \ dpkg -b '$(DIR)' ..; \ fi binary: binary-indep binary-arch .PHONY: build clean install binary-indep binary-arch binary include debian/implicit _ANONCVSROOT:= :pserver:cvs@cvs.fefe.de:/cvs _CVSEXPORT:= env CVS_RSH=ssh TZ=UTC cvs -qd ${_ANONCVSROOT} -z9 export _PACK:= find dietlibc-${ORIGTGZ_DESTINATION} -type f | sort | \ paxcpio -oC512 -Hustar -Mdist get-orig-source: rm -rf $@.tmp mkdir $@.tmp # to get a Debian .orig.tar.gz we need to pull the source from CVS cd $@.tmp; ${_CVSEXPORT} ${ORIGTGZ_SOURCE} dietlibc # fixup files with CR-LF line endings cd $@.tmp; find dietlibc -type f -print0 | \ xargs -0 perl -pi -e 's/\r$$//' -- # then rename and pack it up mv $@.tmp/dietlibc $@.tmp/dietlibc-${ORIGTGZ_DESTINATION} cd $@.tmp; ${_PACK} | gzip -n9 >../dietlibc_${ORIGTGZ_DESTINATION}.orig.tar.gz rm -rf $@.tmp # there we are... ls -l dietlibc_${ORIGTGZ_DESTINATION}.orig.tar.gz debian/patches/0000755000000000000000000000000012744621604010623 5ustar debian/patches/0028-fix-ssize_t.diff0000644000000000000000000000361212744621604014312 0ustar From: Thorsten Glaser Date: Sat, 19 Nov 2011 17:43:18 +0000 Subject: [PATCH] fix ssize_t definition gcc -Wformat likes to warn if '%zd' is used and ssize_t is not a signed size_t (several architectures have 'unsigned int' as their __SIZE_TYPE__ definition); use __SIZE_TYPE__ in the same way for defining ssize_t as size_t uses (in stddef.h), except it must, of course, be signed; this actual kludge comes from $MirOS: src/sys/sys/types.h,v 1.8 2007/05/18 00:47:58 tg Exp $ and is incorporated here with permission of its creator example build log (mipsel, too) exhibiting this warning: https://buildd.debian.org/status/fetch.php?pkg=mksh&arch=powerpc&ver=40.2-4&stamp=1321055433 Index: pkg-dietlibc/include/sys/types.h =================================================================== --- pkg-dietlibc.orig/include/sys/types.h 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/include/sys/types.h 2012-03-25 15:14:03.000000000 +0000 @@ -82,11 +82,20 @@ typedef unsigned long ino_t; /* Used for file serial numbers. */ typedef int32_t key_t; /* Used for interprocess communication. */ typedef int32_t pid_t; /* Used for process IDs and process group IDs. */ -typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ typedef signed long suseconds_t; /* Used for time in microseconds. */ typedef signed long time_t; /* Used for time in seconds. */ typedef signed long useconds_t; /* Used for time in microseconds. */ +/* make this match size_t definition from stddef.h */ +#ifdef __GNUC__ +/* e-eeeevil kludge, but apparently works */ +#define unsigned signed +typedef __SIZE_TYPE__ ssize_t; /* Used for a count of bytes or an error indication. */ +#undef unsigned +#else +typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ +#endif + /* non-susv2 types: */ __extension__ typedef signed long long loff_t; /* 64-bit offset */ debian/patches/0027-fix-arm-mmap.diff0000644000000000000000000000347312744621604014345 0ustar From: Thorsten Glaser Date: Tue, 8 Nov 2011 22:33:12 +0000 Subject: [PATCH] fix mmap syscall on ARM several issues found while debugging on the Debian armhf porterbox on #debian-arm with pbrook (Paul Brook) and lindi- (Timo Juhani Lindfors) - the comment only applies to the non-EABI part of the function - "This is ARM code. But you've not maked mmap as a function symbol." => use the arm-features.h macros Index: pkg-dietlibc/arm/mmap.S =================================================================== --- pkg-dietlibc.orig/arm/mmap.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/mmap.S 2012-03-25 15:14:00.000000000 +0000 @@ -1,22 +1,13 @@ #include #include "syscalls.h" +#include "dietfeatures.h" +#include "arm-features.h" .text -@ -@ mmap takes 6 parameters - ie more than can be passed in registers via the -@ regular syscall interface. Instead, parameters are passed on the stack. -@ -@ On entry, the compiler will have already placed the fifth and sixth -@ parameters on the stack - all we need do here is push the first four and -@ call the syscall. -@ - -.global mmap +FUNC_START mmap #ifdef __ARM_EABI__ - -mmap: str r5, [sp, #-4]! ldr r5, [sp, #8] str r4, [sp, #-4]! @@ -28,11 +19,19 @@ ldr r4, [sp], #4 ldr r5, [sp], #4 cmn r0, #4096 - mov pc, lr @ return + RET + +#else + +@ +@ mmap takes 6 parameters - ie more than can be passed in registers via the +@ regular syscall interface. Instead, parameters are passed on the stack. +@ +@ On entry, the compiler will have already placed the fifth and sixth +@ parameters on the stack - all we need do here is push the first four and +@ call the syscall. +@ -#else - -mmap: stmdb sp!, {r0, r1, r2, r3} mov r0, sp swi __NR_mmap @@ -40,3 +39,5 @@ b __unified_syscall #endif + +FUNC_END mmap debian/patches/0006-Don-t-define-WANT_SSP.diff0000644000000000000000000000152212744621604015545 0ustar From 2485ded64158b4949815f81753aa53594538bb75 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Thu, 3 May 2007 09:21:13 +0000 Subject: [PATCH 06/13] Don't define WANT_SSP. It causes similar problems as WANT_STACKGAP back in Dec 2004, see http://bug.debian.org/374349 --- dietfeatures.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Index: pkg-dietlibc/dietfeatures.h =================================================================== --- pkg-dietlibc.orig/dietfeatures.h 2012-03-25 15:11:10.000000000 +0000 +++ pkg-dietlibc/dietfeatures.h 2012-03-25 15:12:24.000000000 +0000 @@ -139,7 +139,7 @@ * compiled with -fstack-protector against it, the binary will segfault * when calling that code. */ #if (__GNUC__>4) || ((__GNUC__==4) && (__GNUC_MINOR__>=1)) -#define WANT_SSP +/* #define WANT_SSP */ #endif debian/patches/0009-workaround-Bug-428814-powerpc-error-initializer-eleme.diff0000644000000000000000000000505412744621604023737 0ustar From 0daab8c97868bffc6cebf974ccba9cc465522fe7 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Mon, 2 Jul 2007 09:58:14 +0000 Subject: [PATCH 09/13] workaround Bug#428814: [powerpc] error: initializer element is not constant On Sat, Jun 30, 2007 at 11:24:15AM +0200, Matthias Klose wrote: > Gerrit Pape writes: > > On Thu, Jun 14, 2007 at 02:27:49PM +0200, Falk Hueffner wrote: > > > Gerrit Pape writes: > > > > On a current Debian/powerpc sid system: > > > > > > > > $ cat >ttt.c < > > > static const double d[] = { 1.0l/6/1/2, -1.0l/30/3/4 }; > > > > int main() { return 0; } > > > > EOT > > > > $ gcc-4.1 ttt.c > > > > ttt.c:1: error: initializer element is not constant > > > > ttt.c:1: error: (near initialization for 'd[0]') > > > > ttt.c:1: error: initializer element is not constant > > > > ttt.c:1: error: (near initialization for 'd[1]') > > > > > > This is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26374 > > > > The dietlibc FTBFS because of this. > > > > gcc-4.2 4.2-20070627-1 has the same problem, is there a workaround? > > make the initializer double precision for now? --- libm/gamma.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) Index: pkg-dietlibc/libm/gamma.c =================================================================== --- pkg-dietlibc.orig/libm/gamma.c 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/libm/gamma.c 2012-03-25 15:12:33.000000000 +0000 @@ -33,6 +33,22 @@ #include #include +#if defined(__powerpc__) +/* workaround #428814 */ +#define B0 + 1.0/ 6/ 1/ 2 +#define B1 - 1.0/ 30/ 3/ 4 +#define B2 + 1.0/ 42/ 5/ 6 +#define B3 - 1.0/ 30/ 7/ 8 +#define B4 + 5.0/ 66/ 9/10 +#define B5 - 691.0/2730/11/12 +#define B6 + 7.0/ 6/13/14 +#define B7 - 3617.0/ 510/15/16 +#define B8 + 43867.0/ 798/17/18 +#define B9 - 174611.0/ 330/19/20 +#define B10 + 854513.0/ 138/21/22 +#define B11 - 236364091.0/2730/23/24 +#define B12 + 8553103.0/ 6/25/26 +#else #define B0 + 1.0l/ 6/ 1/ 2 #define B1 - 1.0l/ 30/ 3/ 4 #define B2 + 1.0l/ 42/ 5/ 6 @@ -46,6 +62,7 @@ #define B10 + 854513.0l/ 138/21/22 #define B11 - 236364091.0l/2730/23/24 #define B12 + 8553103.0l/ 6/25/26 +#endif static const double coeff[] = { B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 }; int signgam; debian/patches/0005-Do-not-clobber-HOME-environment-variable.diff0000644000000000000000000000611512744621604021463 0ustar From d96303b3334db08d3107f498c52379515cb73107 Mon Sep 17 00:00:00 2001 From: Ted Percival Date: Thu, 3 May 2007 09:19:07 +0000 Subject: [PATCH 05/13] Do not clobber HOME environment variable. To: Debian Bug Tracking System Date: Tue, 17 Oct 2006 21:57:23 +1000 During the build of dietlibc the Makefile clobbers the HOME environment variable for the duration of the build. The HOME environment variable is used by ccontrol to find its configuration file, but when building dietlibc it can't find its configuration and fails to execute properly. Here is a snippet of the build output when using ccontrol: > /usr/bin/make prefix=/usr/lib/diet \ > MYARCH='i386' VERSION='0.30-1' > make[1]: Entering directory `/tmp/dietlibc-0.30' > mkdir bin-i386 > gcc -I. -isystem include -pipe -nostdinc -Os -fomit-frame-pointer > -falign-functions=1 -falign-jumps=1 -falign-loops=1 > -mpreferred-stack-boundary=2 -Wall -W -Wchar-subscripts > -Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wno-unused > -Wredundant-decls -c i386/start.S -o bin-i386/start.o > ccontrol error: reading /tmp/dietlibc-0.30/.ccontrol/config: 2 > make[1]: *** [bin-i386/start.o] Error 1 I propose changing the variable name in the Makefile to "DIETHOME" in order to fix this. A patch to do so is attached. -Ted --- Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: pkg-dietlibc/Makefile =================================================================== --- pkg-dietlibc.orig/Makefile 2012-03-25 15:11:10.000000000 +0000 +++ pkg-dietlibc/Makefile 2012-03-25 15:12:21.000000000 +0000 @@ -86,7 +86,7 @@ OBJDIR=bin-$(ARCH) ILIBDIR=$(LIBDIR)-$(ARCH) -HOME=$(shell pwd) +DIETHOME=$(shell pwd) WHAT= $(OBJDIR) $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o $(OBJDIR)/dyn_stop.o \ $(OBJDIR)/dietlibc.a $(OBJDIR)/liblatin1.a \ @@ -309,7 +309,7 @@ CURNAME=$(notdir $(shell pwd)) $(OBJDIR)/diet: $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o diet.c $(OBJDIR)/dietlibc.a $(OBJDIR)/dyn_stop.o - $(CROSS)$(CC) -isystem include $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -DVERSION=\"$(VERSION)\" -lgcc + $(CROSS)$(CC) -isystem include $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(DIETHOME)\" -DVERSION=\"$(VERSION)\" -lgcc $(CROSS)strip -R .comment -R .note $@ $(OBJDIR)/diet-i: $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o diet.c $(OBJDIR)/dietlibc.a $(OBJDIR)/dyn_stop.o @@ -317,7 +317,7 @@ $(CROSS)strip -R .comment -R .note $@ $(PICODIR)/diet-dyn: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c - $(LD_UNSET) $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(HOME)/$(PICODIR)/libdl.so + $(LD_UNSET) $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(DIETHOME)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(DIETHOME)/$(PICODIR)/libdl.so $(CROSS)strip -R .command -R .note $@ $(PICODIR)/diet-dyn-i: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c debian/patches/0002-fflush-NULL-don-t-flush-input-streams-stdin.diff0000644000000000000000000000140412744621604022160 0ustar From 9a84aa890b2f00aae28cf8adaf62e6acddf8773a Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Thu, 3 May 2007 09:08:02 +0000 Subject: [PATCH 02/13] fflush(NULL): don't flush input streams (stdin). See http://bugs.debian.org/346437 --- libstdio/fflush.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) Index: pkg-dietlibc/libstdio/fflush.c =================================================================== --- pkg-dietlibc.orig/libstdio/fflush.c 2012-03-25 15:07:36.000000000 +0000 +++ pkg-dietlibc/libstdio/fflush.c 2012-03-25 15:12:13.000000000 +0000 @@ -17,7 +17,6 @@ if (stream==0) { int res; FILE *f; - __fflush_stdin(); __fflush_stdout(); __fflush_stderr(); for (res=0, f=__stdio_root; f; f=f->next) debian/patches/0030-strtod-long-double-optional.diff0000644000000000000000000000661212744621604017411 0ustar From: Thorsten Glaser Date: Sat, 19 Nov 2011 19:23:37 +0000 Subject: [PATCH] avoid use of 'long double' in strtod Use of 'long double' on alpha and sparc is now no longer possible in Debian since they switched to 128 bits, which needs supporting functions that weirdly enough are not in libgcc. Use 'double' on these platforms, since that's what 'long double' was on them before (no change) and allows us to link code calling strtod() again. http://thread.gmane.org/gmane.linux.lib.dietlibc/1166 Keep strtold() as-is; users must ensure the supporting code is there. (Or submit it to dietlibc inclusion.) Other functions may or may not need patching, unsure. Index: pkg-dietlibc/alpha/Makefile.add =================================================================== --- pkg-dietlibc.orig/alpha/Makefile.add 2012-03-25 15:11:10.000000000 +0000 +++ pkg-dietlibc/alpha/Makefile.add 2012-03-25 15:14:09.000000000 +0000 @@ -1,5 +1,6 @@ CFLAGS+=-Os -Iinclude -fomit-frame-pointer -fstrict-aliasing +CFLAGS+=-DWANT_STRTOD_WITHOUT_LONG_DOUBLE VPATH:=alpha:syscalls.s:$(VPATH) LIBOBJ+=$(patsubst %,$(OBJDIR)/%,divq.o divl.o remq.o reml.o __time.o __alarm.o __CAS.o) Index: pkg-dietlibc/lib/strtod.c =================================================================== --- pkg-dietlibc.orig/lib/strtod.c 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/lib/strtod.c 2012-03-25 15:14:09.000000000 +0000 @@ -2,11 +2,17 @@ #include #include +#ifndef WANT_STRTOD_WITHOUT_LONG_DOUBLE +#define ldbltype long double +#else +#define ldbltype double +#endif + double strtod(const char* s, char** endptr) { register const char* p = s; - register long double value = 0.L; + register ldbltype value = 0.; int sign = +1; - long double factor; + ldbltype factor; unsigned int expo; while ( isspace(*p) ) @@ -33,7 +39,7 @@ if ( (*p | 32) == 'e' ) { expo = 0; - factor = 10.L; + factor = 10.; switch (*++p) { // ja hier wei ich nicht, was mindestens nach einem 'E' folgenden MUSS. case '-': factor = 0.1; @@ -41,7 +47,7 @@ break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': break; - default : value = 0.L; + default : value = 0.; p = s; goto done; } Index: pkg-dietlibc/sparc/Makefile.add =================================================================== --- pkg-dietlibc.orig/sparc/Makefile.add 2012-03-25 15:12:44.000000000 +0000 +++ pkg-dietlibc/sparc/Makefile.add 2012-03-25 15:14:09.000000000 +0000 @@ -1,5 +1,6 @@ CFLAGS+=-mcpu=v9 -Os +CFLAGS+=-DWANT_STRTOD_WITHOUT_LONG_DOUBLE VPATH:=sparc:syscalls.s:$(VPATH) LIBOBJ+=$(OBJDIR)/udiv.o $(OBJDIR)/umul.o $(OBJDIR)/urem.o LIBOBJ+=$(OBJDIR)/rem.o $(OBJDIR)/sdiv.o Index: pkg-dietlibc/sparc64/Makefile.add =================================================================== --- pkg-dietlibc.orig/sparc64/Makefile.add 2012-03-25 15:07:46.000000000 +0000 +++ pkg-dietlibc/sparc64/Makefile.add 2012-03-25 15:14:09.000000000 +0000 @@ -1,3 +1,5 @@ CFLAGS+=-m64 -Os +#XXX unclear whether this is needed here but very probable +CFLAGS+=-DWANT_STRTOD_WITHOUT_LONG_DOUBLE VPATH:=sparc64:syscalls.s:$(VPATH) LIBOBJ+=$(patsubst %,$(OBJDIR)/%,__time.o) debian/patches/0024-fno-stack-protector.diff0000644000000000000000000000240612744621604015746 0ustar From 30fd50935d87cffee75b21ef87792723286f8c66 Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Thu, 3 Nov 2011 20:45:47 +0000 Subject: [PATCH] Explicitly disable SSP if dietlibc is defined without support for it dietfeatures.h says that the code will segfault; *buntu adds this to their gcc unconditionally (and diet eats -fno-stack-protector up when passed manually!), plus some code probes for -fstack-protector{,-all} and uses it if it compiles. So passing -fno-stack-protector from diet as last argument is probably the proper fix. Signed-off-by: Thorsten Glaser --- diet.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) Index: pkg-dietlibc/diet.c =================================================================== --- pkg-dietlibc.orig/diet.c 2012-03-25 15:12:44.000000000 +0000 +++ pkg-dietlibc/diet.c 2012-03-25 15:13:49.000000000 +0000 @@ -413,6 +413,12 @@ *dest++=f; } #endif +#ifndef WANT_SSP + /* dietfeatures.h says: If you compile dietlibc without WANT_SSP + * and then try to link code compiled with -fstack-protector + * against it, the binary will segfault when calling that code. */ + *dest++=(char*)"-fno-stack-protector"; +#endif *dest=0; if (verbose) { int i; debian/patches/0031-s390-sigsetjmp.diff0000644000000000000000000000310112744621604014532 0ustar From: Bastian Blank Date: Sat, 19 Nov 2011 19:23:37 +0000 Subject: [PATCH] fix sigsetjmp on s390 (via IRC, thanks); integrated by tg Update 20.11.2011: align more closely with eglibc Index: pkg-dietlibc/s390/setjmp.S =================================================================== --- pkg-dietlibc.orig/s390/setjmp.S 2012-03-25 15:12:59.000000000 +0000 +++ pkg-dietlibc/s390/setjmp.S 2012-03-25 15:14:13.000000000 +0000 @@ -27,15 +27,18 @@ std %f6,48(%r2) /* Make a tail call to __sigjmp_save; it takes the same args. */ - basr %r1,%r0 + basr %r1,0 #ifdef PIC -.L0: la %r1,.L1-.L0(0,%r1) +.L0: al %r1,.L1-.L0(0,%r1) l %r1,__sigjmp_save@GOT12(0,%r1) +#else +.L0: l %r1,.L1-.L0(0,%r1) +#endif br %r1 + .p2align 3 +#ifdef PIC .L1: .long _GLOBAL_OFFSET_TABLE_-.L0 #else - l %r1,.L1(0,%r1) - br %r1 .L1: .long __sigjmp_save #endif .size __sigsetjmp,.-__sigsetjmp; Index: pkg-dietlibc/s390x/setjmp.S =================================================================== --- pkg-dietlibc.orig/s390x/setjmp.S 2012-03-25 15:12:59.000000000 +0000 +++ pkg-dietlibc/s390x/setjmp.S 2012-03-25 15:14:13.000000000 +0000 @@ -27,15 +27,18 @@ std %f6,48(%r2) /* Make a tail call to __sigjmp_save; it takes the same args. */ - basr %r1,%r0 + basr %r1,0 #ifdef PIC -.L0: la %r1,.L1-.L0(0,%r1) +.L0: al %r1,.L1-.L0(0,%r1) l %r1,__sigjmp_save@GOT12(0,%r1) +#else +.L0: l %r1,.L1-.L0(0,%r1) +#endif br %r1 + .p2align 3 +#ifdef PIC .L1: .long _GLOBAL_OFFSET_TABLE_-.L0 #else - l %r1,.L1(0,%r1) - br %r1 .L1: .long __sigjmp_save #endif .size __sigsetjmp,.-__sigsetjmp; debian/patches/0034-make-select-testcase-useful.diff0000644000000000000000000000123212744621604017343 0ustar From: Thorsten Glaser Date: Tue, 27 Mar 2012 20:14:22 +0000 Subject: make select testcase actually useful What's the use of a testcase run at build if it always returns 0, even in the face of an error? Index: pkg-dietlibc/test/select.c =================================================================== --- pkg-dietlibc.orig/test/select.c 2012-03-25 15:07:46.000000000 +0000 +++ pkg-dietlibc/test/select.c 2012-03-27 20:08:53.000000000 +0000 @@ -8,6 +8,9 @@ struct timeval tv; FD_ZERO(&f); tv.tv_sec=3; tv.tv_usec=0; - select(1,&f,0,0,&tv); + if (select(1,&f,0,0,&tv) == -1) { + perror("select"); + return 1; + } return 0; } debian/patches/0033-aliasing.diff0000644000000000000000000000345312744621604013634 0ustar From: Thorsten Glaser Date: Sun, 25 Mar 2012 15:50:09 +0000 Subject: add -fno-strict-aliasing to some files abusing pointer casts Fixing the whole mess is non-trivial, e.g. making DIR->buf into a union of the char buffer and the dirent struct, for seekdir.c, is not sufficient since other code does pointer arithmetics and cast afterwards. This must be fixed upstream. Index: pkg-dietlibc/Makefile =================================================================== --- pkg-dietlibc.orig/Makefile 2012-03-25 15:44:59.000000000 +0000 +++ pkg-dietlibc/Makefile 2012-03-25 15:49:43.000000000 +0000 @@ -528,3 +528,29 @@ # WANT_MALLOC_ZERO $(OBJDIR)/strndup.o: dietfeatures.h + +# work around aliasing rules abuse; fixing the code is nontrivial + +$(OBJDIR)/seekdir.o: lib/seekdir.c + $(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@ -D__dietlibc__ -fno-strict-aliasing + $(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@ + +$(OBJDIR)/clnt_raw.o: librpc/clnt_raw.c + $(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@ -D__dietlibc__ -fno-strict-aliasing + $(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@ + +$(OBJDIR)/clnt_udp.o: librpc/clnt_udp.c + $(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@ -D__dietlibc__ -fno-strict-aliasing + $(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@ + +$(PICODIR)/seekdir.o: lib/seekdir.c + $(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@ -fno-strict-aliasing + $(COMMENT) $(CROSS)strip -x -R .comment -R .note $@ + +$(PICODIR)/clnt_raw.o: librpc/clnt_raw.c + $(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@ -fno-strict-aliasing + $(COMMENT) $(CROSS)strip -x -R .comment -R .note $@ + +$(PICODIR)/clnt_udp.o: librpc/clnt_udp.c + $(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@ -fno-strict-aliasing + $(COMMENT) $(CROSS)strip -x -R .comment -R .note $@ debian/patches/0014-sparc_v9-does-not-imply-arch64.diff0000644000000000000000000000133012744621604017525 0ustar From Ivan Jager (#604717) Index: pkg-dietlibc/include/endian.h =================================================================== --- pkg-dietlibc.orig/include/endian.h 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/include/endian.h 2012-03-25 15:12:47.000000000 +0000 @@ -39,7 +39,7 @@ # define __LONG_LONG_PAIR(HI, LO) HI, LO #endif -#if defined(__alpha__) || defined(__mips64__) || defined(__sparc_v9__) || defined(__x86_64__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) +#if defined(__alpha__) || defined(__mips64__) || defined(__sparcv9) || defined(__x86_64__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || defined(__arch64__) #define __WORDSIZE 64 #endif debian/patches/series0000644000000000000000000000221412744621604012037 0ustar 0002-fflush-NULL-don-t-flush-input-streams-stdin.diff 0004-nice-set-errno-EPERM-on-error.diff 0005-Do-not-clobber-HOME-environment-variable.diff 0006-Don-t-define-WANT_SSP.diff 0007-semctl.S-semget.S-semop.s-for-parisc.diff 0008-Use-syscall-_newselect-instead-of-select-on-ppc.diff 0009-workaround-Bug-428814-powerpc-error-initializer-eleme.diff 0010-util-vserver-vsched-fails-to-read-config-directory.diff 0011-Add-new-defines-to-indicate-which-syscall-is-umount-3.diff 0012-Add-an-implementation-of-umount-3-for-ia64.diff 0013-sparc-use-mcpu-v9-instead-of-mcpu-supersparc.diff 0014-sparc_v9-does-not-imply-arch64.diff 0017-disable-propolice.diff 0018-manpage.diff 0020-fixes-for-ARMv7.diff 0021-fix-ftbfs-s390.diff 0024-fno-stack-protector.diff 0025-fix-alpha-as-syntax.diff 0026-dont-strip-bins.diff 0027-fix-arm-mmap.diff 0028-fix-ssize_t.diff 0029-secure-string-functions.diff 0030-strtod-long-double-optional.diff 0031-s390-sigsetjmp.diff 0032-utimes-warning.diff 0033-aliasing.diff 0034-make-select-testcase-useful.diff 0035-Use-syscall-_newselect-instead-of-select-on-ppc64.diff 0036-fix-jmp_buf-size-on-armhf.diff 0100-security-insecure-default-PATH.diff debian/patches/0010-util-vserver-vsched-fails-to-read-config-directory.diff0000644000000000000000000000302212744621604023643 0ustar From 929100972c1137d09743cfa56ac82c8b8a615140 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Sun, 26 Aug 2007 09:37:32 +0000 Subject: [PATCH 10/13] util-vserver: vsched fails to read config directory Jan H Eringa wrote: > Use of /etc/vservers//sched/.... causes vsched to blow up > |my-server# vsched --xid 40000 --dir /etc/vservers/test-1/sched > |vsched: readdir(): Bad address > > > Which I suspect is the cause of.... > |my-server# /etc/init.d/util-vserver start > |Fixing visibility of /proc entries for Linux-VServer guests...readdir(): > Bad > address > |readdir(): Bad address [...] This is due to dietlibc not properly aligning the buffer it's handing to sys_readdir. Check your dmesg output, and it should say something like Kernel unaligned access at TPC[4b7268] filldir64+0x70/0x134 http://people.linux-vserver.org/~dhozac/p/m/delta-dietdirent-fix01.diff fixes it, but you'll have to rebuild util-vserver as well after applying that patch to dietlibc. -- Daniel Hokka Zakrisson --- dietdirent.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Index: pkg-dietlibc/dietdirent.h =================================================================== --- pkg-dietlibc.orig/dietdirent.h 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/dietdirent.h 2012-03-25 15:12:36.000000000 +0000 @@ -1,8 +1,8 @@ #include struct __dirstream { - int fd; char buf[PAGE_SIZE-(sizeof (int)*3)]; + int fd; unsigned int num; unsigned int cur; }; /* stream data from opendir() */ debian/patches/0029-secure-string-functions.diff0000644000000000000000000001715612744621604016657 0ustar From: Thorsten Glaser Date: Sat, 19 Nov 2011 17:43:18 +0000 Subject: [PATCH] make string functions OOB secure Several !defined(WANT_SMALL_STRING_ROUTINES) string function implementations read up to 7 chars past the end of the string. This is forbidden, enforced by several memory allocators (such as omalloc) and valgrind, and causes trouble in general (e.g. t-ascii1.c to fail). This patch *removes* the faster string functions where they are unsafe, i.e. do not operate either on an explicit length argument (such as memcpy, strncpy) or merely are "faster" by loop unrolling (such as strncat). Sorry, guys. There is no way to speed up these functions if you need to avoid reading past the end of the allocated memory. Index: pkg-dietlibc/arm/strcpy.S =================================================================== --- pkg-dietlibc.orig/arm/strcpy.S 2012-03-25 15:12:55.000000000 +0000 +++ pkg-dietlibc/arm/strcpy.S 2012-03-25 15:14:06.000000000 +0000 @@ -2,61 +2,12 @@ #include "arm-features.h" FUNC_START strcpy -#ifndef WANT_SMALL_STRING_ROUTINES - mov ip, r0 - ands r2, r1, #3 - ldr r3, [r1, -r2]! - movne r2, r2, lsl #3 -#ifdef __ARMEB__ - movne r3, r3, lsl r2 -#else - movne r3, r3, lsr r2 -#endif - addne pc, pc, r2, lsl #1 - mov r0, r0 @ nop -.Lloop: -#ifdef __ARMEB__ - mov r3, r3, ror #24 - tst r3, #255 - strb r3, [ip], #1 - moveq pc, lr - mov r3, r3, ror #24 - tst r3, #255 - strb r3, [ip], #1 - moveq pc, lr - mov r3, r3, ror #24 - tst r3, #255 - strb r3, [ip], #1 - moveq pc, lr - mov r3, r3, ror #24 - tst r3, #255 - strb r3, [ip], #1 - ldrne r3, [r1, #4]! -#else - tst r3, #255 - strb r3, [ip], #1 - moveq pc, lr - mov r3, r3, lsr #8 - tst r3, #255 - strb r3, [ip], #1 - moveq pc, lr - mov r3, r3, lsr #8 - tst r3, #255 - strb r3, [ip], #1 - moveq pc, lr - mov r3, r3, lsr #8 - tst r3, #255 - strb r3, [ip], #1 - ldrne r3, [r1, #4]! -#endif -#else ldrb r2, [r1], #1 mov r3, r0 .Lloop: strb r2, [r3], #1 tst r2, #255 ldrneb r2, [r1], #1 -#endif bne .Lloop RET FUNC_END strcpy Index: pkg-dietlibc/arm/strlen.S =================================================================== --- pkg-dietlibc.orig/arm/strlen.S 2012-03-25 15:12:55.000000000 +0000 +++ pkg-dietlibc/arm/strlen.S 2012-03-25 15:14:06.000000000 +0000 @@ -7,46 +7,6 @@ moveq pc, lr @ if so, return 0 #endif -#ifndef WANT_SMALL_STRING_ROUTINES - ands a3, a1, #3 - ldr ip, .Lmagic - mov a2, a1 - ldr a4, [a1, -a3]! - - /* ensure junk bytes aren't nulls */ - - rsbne a3, a3, #4 - movne a3, a3, lsl #3 -#ifdef __ARMEB__ - orrne a4, a4, ip, lsl a3 -#else - orrne a4, a4, ip, lsr a3 -#endif - -.Lloop: - sub a3, a4, ip - bic a3, a3, a4 - ands a3, a3, ip, lsl #7 - ldreq a4, [a1, #4]! - beq .Lloop - - /* a3 & 0x80808080 == a3 */ - -#ifdef __ARMEB__ - tst a3, ip, lsl #16 + 7 - moveq a3, a3, lsl #16 - addeq a1, a1, #2 - tst a3, #0x80000000 - addeq a1, a1, #1 -#else - tst a3, ip, lsr #16 - 7 - moveq a3, a3, lsr #16 - addeq a1, a1, #2 - tst a3, #0x80 - addeq a1, a1, #1 -#endif - sub a1, a1, a2 -#else ldrb a3, [a1], #1 mov a2, a1 .Lloop: @@ -54,12 +14,7 @@ ldrneb a3, [a1], #1 bne .Lloop sub a1, a1, a2 -#endif RET -#ifndef WANT_SMALL_STRING_ROUTINES -.Lmagic: - .word 0x01010101 -#endif FUNC_END strlen Index: pkg-dietlibc/lib/strcmp.c =================================================================== --- pkg-dietlibc.orig/lib/strcmp.c 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/lib/strcmp.c 2012-03-25 15:14:06.000000000 +0000 @@ -6,45 +6,9 @@ int strcmp (const char *s1, const char *s2) { -#ifdef WANT_SMALL_STRING_ROUTINES while (*s1 && *s1 == *s2) s1++, s2++; return (*s1 - *s2); -#else - const unsigned long *lx1, *lx2; - unsigned long l1, l2; - int tmp; - - if (UNALIGNED(s1, s2)) { - while (*s1 && *s1 == *s2) s1++, s2++; - return (*s1 - *s2); - } - - if ((tmp = STRALIGN(s1))) - for (; tmp--; s1++, s2++) - if (!*s1 || *s1 != *s2) - return (*s1 - *s2); - - lx1 = (unsigned long *) s1; - lx2 = (unsigned long *) s2; - - while (1) { - l1 = *lx1++; - l2 = *lx2++; - if ((((l1 - MKW(0x1ul)) & ~l1) & MKW(0x80ul)) || - ((((l2 - MKW(0x1ul)) & ~l2) & MKW(0x80ul))) || l1 != l2) { - unsigned char c1, c2; - while (1) { - c1 = GFC(l1); - c2 = GFC(l2); - if (!c1 || c1 != c2) - return (c1 - c2); - INCSTR(l1); - INCSTR(l2); - } - } - } -#endif } int strcoll(const char *s,const char* t) __attribute__((weak,alias("strcmp"))); Index: pkg-dietlibc/lib/strcpy.c =================================================================== --- pkg-dietlibc.orig/lib/strcpy.c 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/lib/strcpy.c 2012-03-25 15:14:06.000000000 +0000 @@ -7,31 +7,6 @@ strcpy (char *s1, const char *s2) { char *res = s1; -#ifdef WANT_SMALL_STRING_ROUTINES while ((*s1++ = *s2++)); return (res); -#else - int tmp; - unsigned long l; - - if (UNALIGNED(s1, s2)) { - while ((*s1++ = *s2++)); - return (res); - } - if ((tmp = STRALIGN(s1))) { - while (tmp-- && (*s1++ = *s2++)); - if (tmp != -1) return (res); - } - - while (1) { - l = *(const unsigned long *) s2; - if (((l - MKW(0x1ul)) & ~l) & MKW(0x80ul)) { - while ((*s1++ = GFC(l))) INCSTR(l); - return (res); - } - *(unsigned long *) s1 = l; - s2 += sizeof(unsigned long); - s1 += sizeof(unsigned long); - } -#endif } Index: pkg-dietlibc/lib/strlen.c =================================================================== --- pkg-dietlibc.orig/lib/strlen.c 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/lib/strlen.c 2012-03-25 15:14:06.000000000 +0000 @@ -3,96 +3,9 @@ #include #include -#ifdef WANT_SMALL_STRING_ROUTINES size_t strlen(const char *s) { register size_t i; if (__unlikely(!s)) return 0; for (i=0; __likely(*s); ++s) ++i; return i; } -#else - -#if __WORDSIZE == 64 -typedef uint64_t word_t; -#elif __WORDSIZE == 32 -typedef uint32_t word_t; -#else -#error unsupported __WORDSIZE -#endif - -static word_t const magic = (word_t)(0x0101010101010101ull); - -size_t strlen(const char *s) -{ - const char *t = s; - word_t word; - word_t mask; - - if (__unlikely(!s)) return 0; - - /* Byte compare up until word boundary */ - for (; ((unsigned long) t & (sizeof(magic)-1)); t++) - if (!*t) return t - s; - - /* Word compare */ - do { - word = *((word_t const *) t); t += sizeof word; - word = (word - magic) &~ word; - word &= (magic << 7); - } while (__likely(word == 0)); - -#if __BYTE_ORDER == __LITTLE_ENDIAN - (void)mask; - switch (sizeof(word)) { - case 8: - /* word & 0x8080808080808080 == word */ - word = (word - 1) & (magic << 8); - word += (word << 32); - word += (word << 16); - word += (word << 8); - t += word >> 56; - break; - - case 4: - /* word & 0x80808080 == word */ - word = (word - 1) & (magic << 10); - word += (word << 8) + (word << 16); - t += word >> 26; - break; - - default: { char exc[sizeof(word)==8]; (void)exc; } - } -#else - mask = (magic << 7); - - switch (sizeof(word)) { - case 8: - mask <<= 4*8; - if ((word & mask) == 0) { - t += 4; - word <<= 4*8; - } - /* fallthrough */ - - case 4: - mask <<= 2*8; - if ((word & mask) == 0) { - t += 2; - word <<= 2*8; - } - /* fallthrough */ - - case 2: - mask <<= 1*8; - if ((word & mask) == 0) { - t += 1; - word <<= 1*8; - } - break; - - default: { char exc[sizeof(word)==8]; (void)exc; } - } -#endif - return t - sizeof(word) - s; -} -#endif debian/patches/0100-security-insecure-default-PATH.diff0000644000000000000000000000122012744621604017664 0ustar Description: Fix insecure default PATH Throsten Glaser discovered that the default PATH (absent the environment variable) contains the local directory. Author: Christian Seiler Bug: http://news.gmane.org/find-root.php?message_id=alpine.DEB.2.20.1607181048300.24083%40tglase.lan.tarent.de Last-Update: 2016-07-20 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/include/paths.h +++ b/include/paths.h @@ -2,7 +2,7 @@ #define _PATHS_H #define _PATH_BSHELL "/bin/sh" -#define _PATH_DEFPATH "/bin:/usr/bin:" +#define _PATH_DEFPATH "/bin:/usr/bin" #define _PATH_DEVNULL "/dev/null" debian/patches/0018-manpage.diff0000644000000000000000000000326612744621604013462 0ustar Description: fix errors in the manpage Author: Thorsten Glaser Index: pkg-dietlibc/diet.1 =================================================================== --- pkg-dietlibc.orig/diet.1 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/diet.1 2012-03-25 15:12:52.000000000 +0000 @@ -4,7 +4,7 @@ diet \- mangle gcc command line arguments .SH SYNOPSIS .PP -.B diet [-v] [-Os] +.B diet [\-v] [\-Os] [\fInormal gcc command line\fP] .SH DESCRIPTION .PP @@ -13,19 +13,19 @@ the diet libc header files and link against the diet libc itself. diet tries to be smart for cross compiling. If the first argument is -not gcc but sparc-linux-gcc, diet will guess that you want to cross -compile for sparc and use bin-sparc/dietlibc.a instead of the dietlibc.a +not gcc but sparc\-linux\-gcc, diet will guess that you want to cross +compile for sparc and use bin\-sparc/dietlibc.a instead of the dietlibc.a for your default architecture. -The -v option will make diet print the modified gcc command line before +The \-v option will make diet print the modified gcc command line before executing it. -When passed the -Os option before the gcc argument, diet will mangle the +When passed the \-Os option before the gcc argument, diet will mangle the gcc options to include the best known for-size optimization settings for the platform. .SH FILES ~/.diet/\fIcompiler\fR may contain compiler options as you would specify them on the command line, i.e. separated by spaces. Those will -then be used instead of the built-in defaults for diet -Os. +then be used instead of the built-in defaults for diet \-Os. .SH AUTHOR -Felix von Leitner +Felix von Leitner debian/patches/0017-disable-propolice.diff0000644000000000000000000000104112744621604015433 0ustar Description: disable ProPolice SSP, which may be enabled by default Author: Thorsten Glaser Index: pkg-dietlibc/Makefile =================================================================== --- pkg-dietlibc.orig/Makefile 2012-03-25 15:12:21.000000000 +0000 +++ pkg-dietlibc/Makefile 2012-03-25 15:12:50.000000000 +0000 @@ -141,6 +141,7 @@ COMMENT = : endif CFLAGS += -W -Wall -Wextra -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wno-unused -Wredundant-decls +CFLAGS += -fno-stack-protector PWD=$(shell pwd) debian/patches/0026-dont-strip-bins.diff0000644000000000000000000000326712744621604015106 0ustar From: Thorsten Glaser Date: Tue, 8 Nov 2011 21:35:43 +0000 Subject: [PATCH] do not strip binaries leave that to the debian/rules code Index: pkg-dietlibc/Makefile =================================================================== --- pkg-dietlibc.orig/Makefile 2012-03-25 15:12:50.000000000 +0000 +++ pkg-dietlibc/Makefile 2012-03-25 15:13:58.000000000 +0000 @@ -311,19 +311,15 @@ $(OBJDIR)/diet: $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o diet.c $(OBJDIR)/dietlibc.a $(OBJDIR)/dyn_stop.o $(CROSS)$(CC) -isystem include $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(DIETHOME)\" -DVERSION=\"$(VERSION)\" -lgcc - $(CROSS)strip -R .comment -R .note $@ $(OBJDIR)/diet-i: $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o diet.c $(OBJDIR)/dietlibc.a $(OBJDIR)/dyn_stop.o $(CROSS)$(CC) -isystem include $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -DVERSION=\"$(VERSION)\" -DINSTALLVERSION -lgcc - $(CROSS)strip -R .comment -R .note $@ $(PICODIR)/diet-dyn: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c $(LD_UNSET) $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(DIETHOME)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(DIETHOME)/$(PICODIR)/libdl.so - $(CROSS)strip -R .command -R .note $@ $(PICODIR)/diet-dyn-i: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c $(LD_UNSET) $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(ILIBDIR)/libdl.so -DINSTALLVERSION - $(CROSS)strip -R .command -R .note $@ $(OBJDIR)/djb: $(OBJDIR)/compile $(OBJDIR)/load debian/patches/0012-Add-an-implementation-of-umount-3-for-ia64.diff0000644000000000000000000000267112744621604021566 0ustar From 4510d9f53bd77bc8b97d37c78b499d85d0a97d4f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Jan 2009 12:11:42 +0000 Subject: [PATCH 12/13] Add an implementation of umount(3) for ia64 Like x86_64 and parisc, ia64 lacks a single-argument umount syscall, so we need to provide a stub implementation that just calls umount2(path, 0). I don't know ia64 assembler, so this one is in C. --- ia64/Makefile.add | 2 +- ia64/umount-wrapper.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) create mode 100644 ia64/umount-wrapper.c Index: pkg-dietlibc/ia64/Makefile.add =================================================================== --- pkg-dietlibc.orig/ia64/Makefile.add 2012-03-25 15:11:10.000000000 +0000 +++ pkg-dietlibc/ia64/Makefile.add 2012-03-25 15:12:41.000000000 +0000 @@ -1,2 +1,2 @@ VPATH:=ia64:syscalls.s:$(VPATH) -LIBOBJ+=$(OBJDIR)/__time.o $(OBJDIR)/__waitpid.o $(OBJDIR)/__nice.o $(OBJDIR)/__alarm.o $(OBJDIR)/__CAS.o +LIBOBJ+=$(OBJDIR)/__time.o $(OBJDIR)/__waitpid.o $(OBJDIR)/__nice.o $(OBJDIR)/__alarm.o $(OBJDIR)/__CAS.o $(OBJDIR)/umount-wrapper.o Index: pkg-dietlibc/ia64/umount-wrapper.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ pkg-dietlibc/ia64/umount-wrapper.c 2012-03-25 15:12:41.000000000 +0000 @@ -0,0 +1,5 @@ +#include + +int umount(const char *target) { + return umount2(target, 0); +} debian/patches/0008-Use-syscall-_newselect-instead-of-select-on-ppc.diff0000644000000000000000000000121312744621604023067 0ustar From 9476c9e78caa4635e1e5135b38c677fbea84acc0 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Thu, 3 May 2007 09:26:55 +0000 Subject: [PATCH 08/13] Use syscall _newselect instead of select on ppc. See http://bugs.debian.org/394928 --- ppc/select.S | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) create mode 100644 ppc/select.S Index: pkg-dietlibc/ppc/select.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ pkg-dietlibc/ppc/select.S 2012-03-25 15:12:30.000000000 +0000 @@ -0,0 +1,3 @@ +#include "syscalls.h" + +syscall(_newselect,select) debian/patches/0036-fix-jmp_buf-size-on-armhf.diff0000644000000000000000000000117612744621604016733 0ustar From: Thorsten Glaser Date: Sun, 30 Sep 2012 13:56:52 +0000 Subject: fix jmp_buf size on armhf On armhf (!__SOFTFP__) with __ARM_ARCH__ >= 6 and __ARM_NEON__, sigsetjmp() can store as much as 42 registers: * d0 - d15 (armhf) => 16 * d16 - d31 (NEON) => 16 * r4 - r11, sp, lr => 10 Make appropriate space for that in jmp_buf and remove an unused define at the same time. --- a/include/setjmp.h +++ b/include/setjmp.h @@ -164,9 +164,8 @@ typedef int __jmp_buf[3]; #endif #ifdef __arm__ -#define __JMP_BUF_SP 8 #ifndef __ASSEMBLER__ -typedef int __jmp_buf[24]; +typedef int __jmp_buf[42]; #endif #endif debian/patches/0011-Add-new-defines-to-indicate-which-syscall-is-umount-3.diff0000644000000000000000000000573412744621604024003 0ustar From a35138d49e022dd94fd91974fa2ed2ef6dd58a90 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Jan 2009 12:04:48 +0000 Subject: [PATCH 11/13] Add new #defines to indicate which syscall is umount(3) and which is umount2(3). * on architectures where __NR_umount is umount(3) and __NR_umount2 is umount2(3), don't do anything special * on architectures where this is not the case, define __NR_umount_with_flags so that it's umount2(3) * define __NR_umount_without_flags to be umount(3) on architectures where such a syscall exists In the currently-supported architectures there are four families: * on i386, arm etc., __NR_umount takes one argument and __NR_umount2 takes two * on x86_64 and parisc __NR_umount2 takes two arguments and there is no 1-argument umount * on alpha, __NR_oldumount takes one argument and __NR_umount takes two * on ia64, __NR_umount takes two arguments and there is no 1-argument umount --- alpha/syscalls.h | 2 ++ ia64/syscalls.h | 2 ++ syscalls.s/umount.S | 4 ++++ syscalls.s/umount2.S | 4 +++- 4 files changed, 11 insertions(+), 1 deletions(-) Index: pkg-dietlibc/alpha/syscalls.h =================================================================== --- pkg-dietlibc.orig/alpha/syscalls.h 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/alpha/syscalls.h 2012-03-25 15:12:38.000000000 +0000 @@ -413,6 +413,8 @@ #define __NR_timerfd 477 #define __NR_eventfd 478 +#define __NR_umount_without_flags __NR_oldumount +#define __NR_umount_with_flags __NR_umount #define syscall_weak(name,wsym,sym) \ .text ; \ Index: pkg-dietlibc/ia64/syscalls.h =================================================================== --- pkg-dietlibc.orig/ia64/syscalls.h 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/ia64/syscalls.h 2012-03-25 15:12:38.000000000 +0000 @@ -290,6 +290,8 @@ #define __NR_timerfd_settime 1311 #define __NR_timerfd_gettime 1312 +#define __NR_umount_with_flags __NR_umount + #define syscall(name, sym) \ .text; \ .globl sym; \ Index: pkg-dietlibc/syscalls.s/umount.S =================================================================== --- pkg-dietlibc.orig/syscalls.s/umount.S 2012-03-25 15:07:46.000000000 +0000 +++ pkg-dietlibc/syscalls.s/umount.S 2012-03-25 15:12:38.000000000 +0000 @@ -1,5 +1,9 @@ #include "syscalls.h" #ifdef __NR_umount +#if defined(__NR_umount_without_flags) +syscall(umount_without_flags,umount) +#elif !defined(__NR_umount_with_flags) || (__NR_umount != __NR_umount_with_flags) syscall(umount,umount) #endif +#endif Index: pkg-dietlibc/syscalls.s/umount2.S =================================================================== --- pkg-dietlibc.orig/syscalls.s/umount2.S 2012-03-25 15:07:46.000000000 +0000 +++ pkg-dietlibc/syscalls.s/umount2.S 2012-03-25 15:12:38.000000000 +0000 @@ -1,5 +1,7 @@ #include "syscalls.h" -#ifdef __NR_umount2 +#if defined(__NR_umount_with_flags) +syscall(umount_with_flags,umount2) +#elif defined(__NR_umount2) syscall(umount2,umount2) #endif debian/patches/0035-Use-syscall-_newselect-instead-of-select-on-ppc64.diff0000644000000000000000000000112012744621604023236 0ustar From: Thorsten Glaser Date: Tue, 27 Mar 2012 20:16:13 +0000 Subject: Use syscall _newselect instead of select on ppc64 Same as 0008-Use-syscall-_newselect-instead-of-select-on-ppc.diff as #394928 applies to the kernel, not the userspace, and these are but chroots on the same kernel. Index: pkg-dietlibc/ppc64/select.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ pkg-dietlibc/ppc64/select.S 2012-03-27 19:53:25.000000000 +0000 @@ -0,0 +1,3 @@ +#include "syscalls.h" + +syscall(_newselect,select) debian/patches/0007-semctl.S-semget.S-semop.s-for-parisc.diff0000644000000000000000000000310312744621604020636 0ustar From 590497d611c407170bdade315230fd0bc89de554 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Thu, 3 May 2007 09:25:24 +0000 Subject: [PATCH 07/13] semctl.S, semget.S, semop.s for parisc. On hppa, the semctl, semget, and semop functions were unavailable. Trying to use them results in > undefined reference to `__ipc' when linking. This can be seen in the ccontrol build log: --- parisc/semctl.S | 3 +++ parisc/semget.S | 3 +++ parisc/semop.S | 3 +++ 3 files changed, 9 insertions(+), 0 deletions(-) create mode 100644 parisc/semctl.S create mode 100644 parisc/semget.S create mode 100644 parisc/semop.S Index: pkg-dietlibc/parisc/semctl.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ pkg-dietlibc/parisc/semctl.S 2012-03-25 15:12:27.000000000 +0000 @@ -0,0 +1,3 @@ +#include "syscalls.h" + +syscall(semctl,semctl) Index: pkg-dietlibc/parisc/semget.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ pkg-dietlibc/parisc/semget.S 2012-03-25 15:12:27.000000000 +0000 @@ -0,0 +1,3 @@ +#include "syscalls.h" + +syscall(semget,semget) Index: pkg-dietlibc/parisc/semop.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ pkg-dietlibc/parisc/semop.S 2012-03-25 15:12:27.000000000 +0000 @@ -0,0 +1,3 @@ +#include "syscalls.h" + +syscall(semop,semop) debian/patches/0004-nice-set-errno-EPERM-on-error.diff0000644000000000000000000000165512744621604017306 0ustar From 70c0929e68f0380f1003598eb9de25f229f465bf Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Thu, 3 May 2007 09:17:24 +0000 Subject: [PATCH 04/13] nice(): set errno=EPERM on error. See http://bugs.debian.org/286825 --- lib/__nice.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) Index: pkg-dietlibc/lib/__nice.c =================================================================== --- pkg-dietlibc.orig/lib/__nice.c 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/lib/__nice.c 2012-03-25 15:12:18.000000000 +0000 @@ -1,9 +1,14 @@ #include "syscalls.h" #include #include +#include #ifndef __NR_nice int nice(int i) { - return setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i); + if (setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i) == -1) { + errno=EPERM; + return -1; + } + return getpriority(PRIO_PROCESS,0); } #endif debian/patches/0021-fix-ftbfs-s390.diff0000644000000000000000000000230712744621604014423 0ustar Description: Upstream changes introduced in version 0.33~cvs20110710-2 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . dietlibc (0.33~cvs20110710-2) experimental; urgency=low . * Fix build for ARMv7 arches. * Fix FTBFS on s390. * Drop 0015-arm-soft-and-hard-support.diff . The person named in the Author field signed this changelog entry. Author: Hector Oron --- Index: pkg-dietlibc/s390/setjmp.S =================================================================== --- pkg-dietlibc.orig/s390/setjmp.S 2012-03-25 15:07:46.000000000 +0000 +++ pkg-dietlibc/s390/setjmp.S 2012-03-25 15:12:59.000000000 +0000 @@ -14,6 +14,7 @@ .global _setjmp .type _setjmp,@function +_setjmp: lhi %r3,0 .size _setjmp,.-_setjmp Index: pkg-dietlibc/s390x/setjmp.S =================================================================== --- pkg-dietlibc.orig/s390x/setjmp.S 2012-03-25 15:07:46.000000000 +0000 +++ pkg-dietlibc/s390x/setjmp.S 2012-03-25 15:12:59.000000000 +0000 @@ -14,6 +14,7 @@ .global _setjmp .type _setjmp,@function +_setjmp: lhi %r3,0 .size _setjmp,.-_setjmp debian/patches/0032-utimes-warning.diff0000644000000000000000000000133212744621604015007 0ustar From: Thorsten Glaser Date: Sat, 28 Jan 2012 16:14:18 +0000 Subject: fix compile time warning on armel, armhf, ia64 utimes is defined in only if Fefe’s variant of _BSD_SOURCE is set, which we don’t do in dietlibc it‐ self, so pull in the declaration Index: pkg-dietlibc/lib/__utime.c =================================================================== --- pkg-dietlibc.orig/lib/__utime.c 2012-03-25 15:07:33.000000000 +0000 +++ pkg-dietlibc/lib/__utime.c 2012-03-25 15:14:16.000000000 +0000 @@ -2,6 +2,8 @@ #include #ifndef __NR_utime +extern int utimes(const char *, struct timeval *); + int utime(const char *filename, const struct utimbuf *times) { if (times == NULL) debian/patches/0020-fixes-for-ARMv7.diff0000644000000000000000000005450012744621604014634 0ustar Description: Upstream changes introduced in version 0.33~cvs20110710-1 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . dietlibc (0.33~cvs20110710-1) experimental; urgency=low . * New upstream pre-release * Bump Standards-Version * Use DEP5 as copyright format * Don't build arm* with DEBUG flag * Use debian source format 3.0 (quilt) * Move tc523086.c into debian/test directory * Add local-options file * Refresh debian patchset * parisc/strstr.S: remove local removal * strip elftrunc and dnsd resulting binaries . The person named in the Author field signed this changelog entry. Author: Hector Oron --- Index: pkg-dietlibc/syscalls.s/fadvise64.S =================================================================== --- pkg-dietlibc.orig/syscalls.s/fadvise64.S 2012-03-25 15:11:10.000000000 +0000 +++ pkg-dietlibc/syscalls.s/fadvise64.S 2012-03-25 15:12:55.000000000 +0000 @@ -3,15 +3,14 @@ #include "syscalls.h" +#ifdef __NR_fadvise64 +syscall(fadvise64,fadvise64) + #ifndef __NR_fadvise64_64 +.set posix_fadvise, fadvise64 .globl posix_fadvise -.type posix_fadvise,@function -posix_fadvise: #endif -#ifdef __NR_fadvise64 -syscall(fadvise64,fadvise64) - #endif #endif Index: pkg-dietlibc/arm/__aeabi_unwind_cpp.S =================================================================== --- pkg-dietlibc.orig/arm/__aeabi_unwind_cpp.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/__aeabi_unwind_cpp.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,21 +1,14 @@ -.text -.global __aeabi_unwind_cpp_pr0 -.hidden __aeabi_unwind_cpp_pr0 -.type __aeabi_unwind_cpp_pr0, %function +#include "arm-features.h" -.global __aeabi_unwind_cpp_pr1 +FUNC_START __aeabi_unwind_cpp_pr0 +FUNC_START __aeabi_unwind_cpp_pr1 +FUNC_START __aeabi_unwind_cpp_pr2 +.hidden __aeabi_unwind_cpp_pr0 .hidden __aeabi_unwind_cpp_pr1 -.type __aeabi_unwind_cpp_pr1, %function - -.global __aeabi_unwind_cpp_pr2 .hidden __aeabi_unwind_cpp_pr2 -.type __aeabi_unwind_cpp_pr2, %function -__aeabi_unwind_cpp_pr0: -__aeabi_unwind_cpp_pr1: -__aeabi_unwind_cpp_pr2: - mov pc, lr @ return from subroutine + RET -.size __aeabi_unwind_cpp_pr0,.-__aeabi_unwind_cpp_pr0 -.size __aeabi_unwind_cpp_pr1,.-__aeabi_unwind_cpp_pr1 -.size __aeabi_unwind_cpp_pr2,.-__aeabi_unwind_cpp_pr2 +FUNC_END __aeabi_unwind_cpp_pr2 +FUNC_END __aeabi_unwind_cpp_pr1 +FUNC_END __aeabi_unwind_cpp_pr0 Index: pkg-dietlibc/arm/__fadvise.c =================================================================== --- pkg-dietlibc.orig/arm/__fadvise.c 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/__fadvise.c 2012-03-25 15:12:55.000000000 +0000 @@ -1,7 +1,10 @@ -#include #include "syscalls.h" #ifndef __NR_fadvise64 +#define _LINUX_SOURCE +#include +#include + long fadvise64_64(int fd, off64_t offset, off64_t len, int advice) { extern long __arm_fadvise64_64(int fd, int advice, off64_t offset, off64_t len); Index: pkg-dietlibc/arm/__guard.S =================================================================== --- pkg-dietlibc.orig/arm/__guard.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/__guard.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,4 +1,5 @@ .data +.align 2 .type __guard,#object .global __guard .type __stack_chk_guard,#object @@ -7,3 +8,5 @@ __stack_chk_guard: .long 0xaff00 +.size __guard, . - __guard +.size __stack_chk_guard, . - __stack_chk_guard Index: pkg-dietlibc/arm/__longjmp.S =================================================================== --- pkg-dietlibc.orig/arm/__longjmp.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/__longjmp.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,11 +1,24 @@ -.text -.global __longjmp -.type __longjmp,function -__longjmp: +#include "arm-features.h" + +FUNC_START __longjmp mov ip, r0 movs r0, r1 moveq r0, #1 -#ifndef __SOFTFP__ - lfm f4, 4, [ip], #48 + +#ifndef __SOFTFP__ +# if __ARM_ARCH__ >= 6 + vldm ip!, {d0-d15} +# ifdef __ARM_NEON__ + vldm ip!, {d16-d31} +# endif +# else + lfm f4, 4, [ip]! +# endif #endif - ldmia ip, {r4-r11, sp, pc} + +#ifdef __IWMMXT__ +# warning "sigjmp will not restore iwmmxt coprocessor registers" +#endif + + ldmia ip!, {r4-r11, sp, pc} +FUNC_END __longjmp Index: pkg-dietlibc/arm/__testandset.S =================================================================== --- pkg-dietlibc.orig/arm/__testandset.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/__testandset.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,7 +1,15 @@ -.text -.global __testandset -__testandset: +#include "arm-features.h" + +FUNC_START __testandset mov r2, r0 mov r1, #1 +# if __ARM_ARCH__ < 6 swp r0, r1, [r2] - mov pc, lr +# else +1: ldrex r0, [r2] + strex r3, r1, [r2] + cmp r3, #0 + bne 1b +# endif + RET +FUNC_END __testandset Index: pkg-dietlibc/arm/arm-features.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ pkg-dietlibc/arm/arm-features.h 2012-03-25 15:12:55.000000000 +0000 @@ -0,0 +1,110 @@ +/* --*- asm -*-- */ + +#ifndef H_DIETLIBC_ARM_FEATURES_H +#define H_DIETLIBC_ARM_FEATURES_H + +/* Stolen from gcc (gcc/config/arm/lib1funcs.asm) */ +#if defined(__ARM_ARCH_2__) +# define __ARM_ARCH__ 2 +#endif + +#if defined(__ARM_ARCH_3__) +# define __ARM_ARCH__ 3 +#endif + +#if defined(__ARM_ARCH_3M__) || defined(__ARM_ARCH_4__) \ + || defined(__ARM_ARCH_4T__) +# define __ARM_ARCH__ 4 +#endif + +#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \ + || defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \ + || defined(__ARM_ARCH_5TEJ__) +# define __ARM_ARCH__ 5 +#endif + +#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ + || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \ + || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \ + || defined(__ARM_ARCH_6M__) +# define __ARM_ARCH__ 6 +#endif + +#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ + || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) +# define __ARM_ARCH__ 7 +#endif + +#ifndef __ARM_ARCH__ +#error Unable to determine architecture. +#endif + +#define DIET_JMPBUFSZ_REGS_REGULAR 10*32/8 /* r4-r11, sp, pc */ +#define DIET_JMPBUFSZ_REGS_FPv4 16*64/8 /* d0-d15 */ + +#if !defined(__SOFTFP__) || defined(__IWMMXT__) +# define DIET_HAVE_COPROC_REGS 1 +#else +# undef DIET_HAVE_COPROC_REGS +#endif + +#ifdef __ASSEMBLER__ + +.macro FUNC_START name + .text + .align 0 + .global \name + .type \name, %function +\name: +.endm + +.macro FUNC_START_WEAK name + .text + .align 0 + .weak \name + .type \name, %function +\name: +.endm + +.macro FUNC_END name + .size \name, . - \name +.endm + +.macro RET +#if (__ARM_ARCH__ > 4) || defined(__ARM_ARCH_4T__) + bx lr +#else + mov pc, lr +#endif +.endm + +.macro SWI_UNIFIED name +#ifdef __ARM_EABI__ + b __unified_syscall_swi +#else + swi \name + b __unified_syscall +#endif +.endm + +.macro SWI_UNIFIED4 +#ifdef __ARM_EABI__ + b __unified_syscall_swi +#else + swi \name + b __unified_syscall4 +#endif +.endm + +.macro LOAD_ARG4_5 +#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || defined(__ARM_ARCH_5T__) + ldr r4, [sp,#16] + ldr r5, [sp,#20] +#else + ldrd r4, [sp,#16] +#endif +.endm + +#endif /* __ASSEMBLER__ */ + +#endif /* H_DIETLIBC_ARM_FEATURES_H */ Index: pkg-dietlibc/arm/clone.S =================================================================== --- pkg-dietlibc.orig/arm/clone.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/clone.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,11 +1,8 @@ #include #include "syscalls.h" +#include "arm-features.h" - .text - .weak clone - .global __clone - @ @ Some slightly tricky stuff here... edit with care :-) @ @@ -19,9 +16,8 @@ @ ; don't do this yet @#define RESET_PID - -clone: -__clone: +FUNC_START_WEAK clone +FUNC_START __clone @ ; start with a sanity check cmp r0, #0 cmpne r1, #0 @@ -51,7 +47,8 @@ beq 1f ldmfd sp!, {r4, r7} blt __unified_syscall @ (return code < 0): handle as an error - bx lr + RET + 1: #ifdef RESET_PID tst ip, #CLONE_THREAD @@ -76,12 +73,13 @@ @ ; and we're done, passing return value through r0 b _exit @ branch to _exit (PIC safe) +FUNC_END __clone +FUNC_END clone - #else -clone: -__clone: +FUNC_START_WEAK clone +FUNC_START __clone movs r12, r0 @ check function pointer cmpne r1, #0 @ if function check for stack pointer moveq r0, #-EINVAL @ if one is not available set errno value @@ -101,5 +99,7 @@ ldmia sp!, { r0, pc } @ load function param and jump to thread function 1: b _exit @ branch to _exit (PIC safe) +FUNC_END __clone +FUNC_END clone #endif Index: pkg-dietlibc/arm/dyn_syscalls.S =================================================================== --- pkg-dietlibc.orig/arm/dyn_syscalls.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/dyn_syscalls.S 2012-03-25 15:12:55.000000000 +0000 @@ -8,11 +8,15 @@ #include #include "syscalls.h" +#include "arm-features.h" -.text -__unified_syscall4: +#ifdef __ARM_EABI__ +# error "dyn_syscall.S not ported for EABI yet" +#endif + +FUNC_START __unified_syscall4 ldmfd sp!, {r4, r5, r6} -__unified_syscall: +FUNC_START __unified_syscall cmn r0, #4096 movcc pc, lr rsb r1, r0, #0 @@ -25,7 +29,9 @@ mvn r0, #0 #include "dietuglyweaks.h" - mov pc, lr + RET +FUNC_END __unified_syscall +FUNC_END __unified_syscall4 /* ok now include all syscalls.s (*.S) and sysdep *.S */ #include "mmap.S" @@ -104,7 +110,6 @@ #include "../syscalls.s/n_sigprocmask.S" #include "../syscalls.s/n_sigsuspend.S" #include "../syscalls.s/nanosleep.S" -#include "../syscalls.s/nice.S" #include "../syscalls.s/open.S" #include "../syscalls.s/pause.S" #include "../syscalls.s/personality.S" @@ -280,9 +285,11 @@ #include "../syscalls.s/fgetxattr.S" /* other asm-files w.o. changes ... */ -__exit: +FUNC_START __exit swi $__NR_exit eor pc,lr,lr +FUNC_END __exit + #define _exit __exit #include "clone.S" #undef _exit Index: pkg-dietlibc/arm/mcount.S =================================================================== --- pkg-dietlibc.orig/arm/mcount.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/mcount.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,4 +1,4 @@ - +#include "arm-features.h" @ @ mcount.S: ARM assembler implementation of mcount @ @@ -27,11 +27,7 @@ @ @ -.text - -.global mcount - -mcount: +FUNC_START mcount mov ip, sp stmdb sp!, { r0 - r3, fp, ip, lr, pc } @ build stack frame sub fp, ip, #4 @ setup new fp @@ -43,4 +39,4 @@ bl __mcount @ call __mcount ldmdb fp, { r0 - r3, fp, sp, pc } @ restore context from stack frame and return. - +FUNC_END mcount Index: pkg-dietlibc/arm/md5asm.S =================================================================== --- pkg-dietlibc.orig/arm/md5asm.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/md5asm.S 2012-03-25 15:12:55.000000000 +0000 @@ -50,45 +50,35 @@ *****************************************************************************/ #include +#include "arm-features.h" #if (__BYTE_ORDER == __LITTLE_ENDIAN) - .global MD5Init - .global MD5Update - - .text -#ifdef __ARM_EABI__ - .align 4 -#else - .align 2 -#endif - @ -- @ void MD5Init (MD5_CTX* context); @ -- -MD5Init: - +FUNC_START MD5Init adr r1, 1f @ r1 = base address of MD5InitData array ldmia r1, { r1 - r3, r12 } @ load 4 elements from MD5InitData array stmia r0, { r1 - r3, r12 } @ store into MD5 context->state[0..3] mov r1, #0 str r1, [r0, #0x10] @ initial count[0] = 0 str r1, [r0, #0x14] @ initial count[1] = 0 - mov pc, lr @ return + RET + .align 3 1: .word 0x67452301 @ initial MD5 context->state[0] .word 0xefcdab89 @ initial MD5 context->state[1] .word 0x98badcfe @ initial MD5 context->state[2] .word 0x10325476 @ initial MD5 context->state[3] - +FUNC_END MD5Init @ -- @ void MD5Update (MD5_CTX* context, const uint8_t* buf, signed int len); @ -- -MD5Update: - +FUNC_START MD5Update stmdb sp!, { r4 - r8, lr } add r4, r0, #(6 * 4) @ r4 = &context->buffer[0] ldmdb r4, { r0, r3 } @ r0 = count[0], r3 = count[1] @@ -122,12 +112,13 @@ sub r2, r8, r2 2: ldmia sp!, { r4 - r8, lr } b memcpy @ classic tail-call optimisation... - +FUNC_END MD5Update @ -- @ static void __MD5Transform (uint32_t *buf, const uint32_t *in, int repeat); @ -- + .align 3 MD5MagicData: 1: .word 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee @@ -148,6 +139,7 @@ .word 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391, (17f-19f-4) .word 0x6e4120A9, 0x20657264, 0x7543634d, 0x00796472, (19f-19f-4) + .align 2 __MD5Transform: cmp r2, #0 Index: pkg-dietlibc/arm/setjmp.S =================================================================== --- pkg-dietlibc.orig/arm/setjmp.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/setjmp.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,17 +1,40 @@ -.text -.weak setjmp -setjmp: -.global __setjmp -__setjmp: +#include "arm-features.h" + +FUNC_START_WEAK setjmp +FUNC_START __setjmp mov r1, #0 -.global __sigsetjmp -__sigsetjmp: -.weak sigsetjmp -sigsetjmp: -#ifndef __SOFTFP__ - sfm f4, 4, [r0], #48 +FUNC_END __setjmp +FUNC_END setjmp + +FUNC_START_WEAK sigsetjmp +FUNC_START __sigsetjmp + +#ifdef DIET_HAVE_COPROC_REGS + /* we have to work on a copy of 'r0' (jmpbuf *) */ + mov ip, r0 #endif + +#ifndef __SOFTFP__ +# if __ARM_ARCH__ >= 6 + vstmia ip!, {d0-d15} +# ifdef __ARM_NEON__ + vstmia ip!, {d16-d31} +# endif +# else + sfm f4, 4, [ip]! +# endif +#endif + +#ifdef __IWMMXT__ +# warning "setjmp will not save iwmmxt coprocessor registers" +#endif + +#ifndef DIET_HAVE_COPROC_REGS stmia r0, {r4-r11, sp, lr} - sub r0, r0, #48 - b __sigjmp_save +#else + stmia ip!, {r4-r11, sp, lr} +#endif + b __sigjmp_save +FUNC_END __sigsetjmp +FUNC_END sigsetjmp Index: pkg-dietlibc/arm/start.S =================================================================== --- pkg-dietlibc.orig/arm/start.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/start.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,23 +1,11 @@ #include "dietfeatures.h" #include "syscalls.h" +#include "arm-features.h" - .text #ifdef __ARM_EABI__ - .align 4 -#else - .align 2 -#endif - - .global _start - .weak exit - .global _exit - - -#ifdef __ARM_EABI__ - -_start: +FUNC_START _start mov fp, #0 @ clear the frame pointer ldr a1, [sp] @ argc add a2, sp, #4 @ argv @@ -25,6 +13,17 @@ add a3, a2, a1, lsl #2 @ &argv[argc] add a3, a3, #4 @ envp str a3, [ip, #0] @ environ = envp + +#ifdef WANT_ELFINFO + mov r6, a3 @ work on a copy of a3 so that common + @ 'main(argc, argv, envp)' function + @ stays valid +1: ldr r5, [r6], #4 @ load *envp and increment it + cmp r5, #0 @ read value==0? + bne 1b + str r6, [ip, #4] @ __elfinfo = envp +#endif + bl main @ @@ -32,21 +31,22 @@ @ We need to branch to 'exit' in case we have linked with 'atexit'. @ bl exit +FUNC_END _start -exit: -_exit: - +FUNC_START _exit +FUNC_START_WEAK exit mov r7, #__NR_exit swi 0 @ never returns. + .align 2 .L3: .word environ - +FUNC_END exit +FUNC_END _exit #else -_start: - +FUNC_START _start #ifdef WANT_DYNAMIC mov a4, a1 @ save dynamic ld.so _fini #endif @@ -59,11 +59,25 @@ #ifdef __DYN_LIB ldr sl, .L4 1: add sl, pc, sl - str a3, [sl, ip] @ environ = envp + str a3, [ip, sl]! @ environ = envp; ip = GOT(environ) #else str a3, [ip, #0] @ environ = envp #endif +#ifdef WANT_ELFINFO + mov r6, a3 @ work on a copy of a3 so that common + @ 'main(argc, argv, envp)' function + @ stays valid +1: ldr r5, [r6], #4 @ load *envp and increment it + cmp r5, #0 @ read value==0? + bne 1b +#ifdef __DYN_LIB + str r6, [ip, sl] @ __elfinfo = envp +#else + str r6, [ip, #4] @ __elfinfo = envp +#endif +#endif + #ifdef PROFILING stmdb sp!, { r0 - r3 } ldr r0, .L5 @@ -83,18 +97,21 @@ @ We need to branch to 'exit' in case we have linked with 'atexit'. @ bl exit +FUNC_END _start -exit: -_exit: - +FUNC_START _exit +FUNC_START_WEAK exit #ifdef PROFILING mov r4, r0 @ save a copy of exit status bl _stop_monitor mov r0, r4 #endif swi $__NR_exit @ never returns. +FUNC_END exit +FUNC_END _exit + .align 2 #ifdef __DYN_LIB .L3: .word environ(GOT) .L4: .word _GLOBAL_OFFSET_TABLE_-(1b+8) Index: pkg-dietlibc/arm/strcpy.S =================================================================== --- pkg-dietlibc.orig/arm/strcpy.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/strcpy.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,10 +1,7 @@ #include "dietfeatures.h" +#include "arm-features.h" -.text - .align 2 - .global strcpy - -strcpy: +FUNC_START strcpy #ifndef WANT_SMALL_STRING_ROUTINES mov ip, r0 ands r2, r1, #3 @@ -61,6 +58,5 @@ ldrneb r2, [r1], #1 #endif bne .Lloop - mov pc, lr -.Lfe1: - .size strcpy,.Lfe1-strcpy + RET +FUNC_END strcpy Index: pkg-dietlibc/arm/strlen.S =================================================================== --- pkg-dietlibc.orig/arm/strlen.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/strlen.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,12 +1,7 @@ #include "dietfeatures.h" +#include "arm-features.h" - .text - .align 2 - - .global strlen - -strlen: - +FUNC_START strlen #if 0 teq a1, #0 @ is string pointer NULL ?? moveq pc, lr @ if so, return 0 @@ -61,12 +56,10 @@ sub a1, a1, a2 #endif - mov pc, lr + RET #ifndef WANT_SMALL_STRING_ROUTINES .Lmagic: .word 0x01010101 #endif - -.Lstrlen: - .size strlen,.Lstrlen-strlen +FUNC_END strlen Index: pkg-dietlibc/arm/syscalls.h =================================================================== --- pkg-dietlibc.orig/arm/syscalls.h 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/syscalls.h 2012-03-25 15:12:55.000000000 +0000 @@ -700,9 +700,9 @@ #define __ARGS_getpeername 0 #define __ARGS_socketpair 0 #define __ARGS_send 0 -#define __ARGS_sendto 0 +#define __ARGS_sendto 6 #define __ARGS_recv 0 -#define __ARGS_recvfrom 0 +#define __ARGS_recvfrom 6 #define __ARGS_shutdown 0 #define __ARGS_setsockopt 0 #define __ARGS_getsockopt 0 @@ -771,70 +771,30 @@ #ifdef __ASSEMBLER__ -#ifdef __ARM_EABI__ +#include "arm-features.h" #define syscall_weak(name,wsym,sym) __syscall_weak __NR_##name, wsym, sym, __ARGS_##name .macro __syscall_weak name wsym sym typ -.text -.type \wsym,function -.weak \wsym -\wsym: -.type \sym,function -.global \sym -\sym: - stmfd sp!,{r4,r5,r7,lr} - ldr r4, [sp,#16] - ldr r5, [sp,#20] - ldr r7, =\name - swi 0 - b __unified_syscall +FUNC_START_WEAK \wsym +__syscall \name, \sym, \typ +FUNC_END \wsym .endm +#ifdef __ARM_EABI__ #define syscall(name,sym) __syscall __NR_##name, sym, __ARGS_##name .macro __syscall name sym typ -.text -.type \sym,function -.global \sym -\sym: - stmfd sp!,{r4,r5,r7,lr} - ldr r4, [sp,#16] - ldr r5, [sp,#20] - ldr r7, =\name - swi 0 - b __unified_syscall +FUNC_START \sym + ldr ip, =\name + b __unified_syscall_swi +FUNC_END \sym .endm #else -#define syscall_weak(name,wsym,sym) __syscall_weak $__NR_##name, wsym, sym, __ARGS_##name -.macro __syscall_weak name wsym sym typ -.text -.type \wsym,function -.weak \wsym -\wsym: -.type \sym,function -.global \sym -\sym: -.ifgt \typ - mov ip, sp - stmfd sp!,{r4, r5, r6} - ldmia ip, {r4, r5, r6} -.endif - swi \name -.ifgt \typ - b __unified_syscall4 -.else - b __unified_syscall -.endif -.endm - #define syscall(name,sym) __syscall $__NR_##name, sym, __ARGS_##name .macro __syscall name sym typ -.text -.type \sym,function -.global \sym -\sym: +FUNC_START \sym .ifgt \typ mov ip, sp stmfd sp!,{r4, r5, r6} @@ -846,6 +806,7 @@ .else b __unified_syscall .endif +FUNC_END \sym .endm #endif Index: pkg-dietlibc/arm/unified.S =================================================================== --- pkg-dietlibc.orig/arm/unified.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/unified.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,21 +1,28 @@ #include - - .text -#ifdef __ARM_EABI__ - .align 4 -#else - .align 2 -#endif - .global __unified_syscall - .global __unified_syscall4 - +#include "arm-features.h" #ifdef __ARM_EABI__ -__unified_syscall4: -__unified_syscall: - +/* expects: + * r0-r3 ... syscall arguments 0-3 + * ip ... syscall number + */ +FUNC_START __unified_syscall_swi + .hidden __unified_syscall_swi + stmfd sp!,{r4,r5,r7,lr} + mov r7, ip + LOAD_ARG4_5 + swi 0 + /* fallthrough to __unified4_syscall */ +FUNC_END __unified_syscall_swi + +/* expects: + * r0 ... syscall return value + * original r4-r7 + lr on stack + */ +FUNC_START __unified_syscall + .hidden __unified_syscall cmn r0, #4096 rsbcs r2, r0, #0 ldrcs r3, 1f @@ -25,17 +32,18 @@ .balign 4 1: .word errno +FUNC_END __unified_syscall -/* here we go and "reuse" the return for weak-void functions */ #include "dietuglyweaks.h" - mov pc, lr @ return + RET #else -__unified_syscall4: +FUNC_START __unified_syscall4 ldmia sp!, {r4, r5, r6} -__unified_syscall: + +FUNC_START __unified_syscall cmn r0, #4096 movcc pc, lr @ return value comes direct from kernel. @@ -53,10 +61,13 @@ /* here we go and "reuse" the return for weak-void functions */ #include "dietuglyweaks.h" - mov pc, lr @ return + RET #ifndef WANT_THREAD_SAFE + .align 2 .L0: .long errno #endif +FUNC_END __unified_syscall +FUNC_END __unified_syscall4 #endif Index: pkg-dietlibc/arm/waitpid.S =================================================================== --- pkg-dietlibc.orig/arm/waitpid.S 2012-03-25 15:07:28.000000000 +0000 +++ pkg-dietlibc/arm/waitpid.S 2012-03-25 15:12:55.000000000 +0000 @@ -1,15 +1,8 @@ -.text -#ifdef __ARM_EABI__ -.align 4 -#else -.align 2 -#endif -.weak waitpid -.type waitpid, %function -waitpid: -.global __libc_waitpid -.type __libc_waitpid, %function -__libc_waitpid: +#include "arm-features.h" + +FUNC_START_WEAK waitpid +FUNC_START __libc_waitpid mov r3, #0 b wait4 - .size waitpid, .-waitpid +FUNC_END __libc_waitpid +FUNC_END waitpid debian/patches/0013-sparc-use-mcpu-v9-instead-of-mcpu-supersparc.diff0000644000000000000000000000447512744621604022426 0ustar From c1ee013288501b3d366833062aea71311d6cff8f Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Tue, 20 Apr 2010 19:31:23 +0000 Subject: [PATCH 13/13] sparc: use -mcpu=v9 instead of -mcpu=supersparc This fixes a build failure of libowfat on sparc: diet -v -Os gcc -g -o t t.o libowfat.a `cat libsocket` -lpthread gcc -nostdlib -static -L/usr/lib/diet/lib-sparc /usr/lib/diet/lib-sparc/start.o -g -o t t.o libowfat.a -lpthread -isystem /usr/lib/diet/include -D__dietlibc__ -Os -mcpu=supersparc /usr/lib/diet/lib-sparc/libc.a -lgcc /usr/lib/diet/lib-sparc/libc.a /usr/lib/diet/lib-sparc/libc.a(vprintf.o): In function `vprintf': vprintf.c:(.text+0x1c): warning: warning: the printf functions add several kilobytes of bloat. t.o: In function `main': t.c:(.text+0x30): undefined reference to `__sync_add_and_fetch_4' t.c:(.text+0x48): undefined reference to `__sync_add_and_fetch_4' t.c:(.text+0x64): undefined reference to `__sync_bool_compare_and_swap_4' t.c:(.text+0x80): undefined reference to `__sync_bool_compare_and_swap_4' collect2: ld returned 1 exit status According to http://www.debian.org/releases/stable/sparc/ch02s01.html.en supersparc isn't supported anymore anyway, and multisparc and niagara are v9. --- diet.c | 2 +- sparc/Makefile.add | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: pkg-dietlibc/diet.c =================================================================== --- pkg-dietlibc.orig/diet.c 2012-03-25 15:11:10.000000000 +0000 +++ pkg-dietlibc/diet.c 2012-03-25 15:12:44.000000000 +0000 @@ -29,7 +29,7 @@ "-falign-functions=1","-falign-jumps=1", "-falign-loops=1","-fomit-frame-pointer",0, "x86_64","-Os",0, - "sparc","-Os","-mcpu=supersparc",0, + "sparc","-Os","-mcpu=v9",0, "sparc64","-Os","-m64","-mhard-quad-float",0, "alpha","-Os","-fomit-frame-pointer",0, "arm","-Os","-fomit-frame-pointer",0, Index: pkg-dietlibc/sparc/Makefile.add =================================================================== --- pkg-dietlibc.orig/sparc/Makefile.add 2012-03-25 15:07:46.000000000 +0000 +++ pkg-dietlibc/sparc/Makefile.add 2012-03-25 15:12:44.000000000 +0000 @@ -1,5 +1,5 @@ -CFLAGS+=-mcpu=supersparc -Os +CFLAGS+=-mcpu=v9 -Os VPATH:=sparc:syscalls.s:$(VPATH) LIBOBJ+=$(OBJDIR)/udiv.o $(OBJDIR)/umul.o $(OBJDIR)/urem.o LIBOBJ+=$(OBJDIR)/rem.o $(OBJDIR)/sdiv.o debian/patches/0025-fix-alpha-as-syntax.diff0000644000000000000000000000205512744621604015641 0ustar From: Thorsten Glaser Date: Thu, 10 Nov 2011 18:04:24 +0000 Subject: [PATCH] fix alpha as syntax .set cannot be used on alpha, .equ cannot be used on hppa, *sigh* Index: pkg-dietlibc/syscalls.s/fadvise64.S =================================================================== --- pkg-dietlibc.orig/syscalls.s/fadvise64.S 2012-03-25 15:12:55.000000000 +0000 +++ pkg-dietlibc/syscalls.s/fadvise64.S 2012-03-25 15:13:54.000000000 +0000 @@ -7,7 +7,7 @@ syscall(fadvise64,fadvise64) #ifndef __NR_fadvise64_64 -.set posix_fadvise, fadvise64 +posix_fadvise = fadvise64 .globl posix_fadvise #endif Index: pkg-dietlibc/syscalls.s/fadvise64_64.S =================================================================== --- pkg-dietlibc.orig/syscalls.s/fadvise64_64.S 2012-03-25 15:07:46.000000000 +0000 +++ pkg-dietlibc/syscalls.s/fadvise64_64.S 2012-03-25 15:13:54.000000000 +0000 @@ -3,6 +3,6 @@ #ifdef __NR_fadvise64_64 syscall(fadvise64_64,fadvise64_64) -.set posix_fadvise, fadvise64_64 +posix_fadvise = fadvise64_64 .globl posix_fadvise #endif debian/test/0000755000000000000000000000000012744621604010153 5ustar debian/test/tc523086.c0000644000000000000000000000065112744621604011417 0ustar #include #include #include #include char Heuhaufen[] = "mad"; int main(void) { char *s, *buf, *cp; if ((buf = malloc(32)) == NULL) return (255); /* align */ s = (void *)((((ptrdiff_t)buf + 15) & ~15) + 12); s[0] = 'a'; s[1] = '\0'; cp = strstr(Heuhaufen, s); free(buf); if (cp) printf("ok: <%s>\n", cp); else printf("broken\n"); return (cp == NULL ? 1 : 0); } debian/test/t-ascii1.c0000644000000000000000000000061212744621604011730 0ustar #include #include #include #include int main(void) { char *s, *buf; size_t n; if ((buf = malloc(32)) == NULL) return (255); /* align */ s = (void *)((((ptrdiff_t)buf + 15) & ~15) + 12); s[0] = '\001'; s[1] = '\0'; n = strlen(s); free(buf); if (n == 1) { printf("ok\n"); return (0); } printf("broken: <%zu>\n", n); return (1); } debian/control0000644000000000000000000000252612744621604010604 0ustar Source: dietlibc Section: devel Priority: optional Homepage: http://www.fefe.de/dietlibc/ Maintainer: Hector Oron Uploaders: Thorsten Glaser Standards-Version: 3.9.3 Vcs-git: git://git.debian.org/collab-maint/dietlibc.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/dietlibc.git Package: dietlibc-dev Section: libdevel Architecture: alpha amd64 arm armeb armel armhf hppa i386 ia64 mips mipsel powerpc ppc64 s390 s390x sparc sparc64 Suggests: dietlibc-doc Description: diet libc - a libc optimized for small size The diet libc is a C library that is optimized for small size. It can be used to create small statically linked binaries for Linux on alpha, arm, ia64, mips, mipsel, ppc, parisc, s390, sparc and x86. . This package is used to compile programs with the diet libc. . The diet libc also supports dynamic linking, but this has been temporarily disabled because of problems with it. Package: dietlibc-doc Architecture: all Section: doc Suggests: dietlibc-dev Description: diet libc documentation - a libc optimized for small size The diet libc is a C library that is optimized for small size. It can be used to create small statically linked binaries for Linux on alpha, arm, ia64, mips, mipsel, ppc, parisc, s390, sparc and x86. . This package contains the documentation for the diet libc. debian/source/0000755000000000000000000000000012744621604010474 5ustar debian/source/format0000644000000000000000000000001412744621604011702 0ustar 3.0 (quilt) debian/dietlibc.conffiles0000644000000000000000000000002212744621604012637 0ustar /etc/diet.ld.conf debian/copyright0000644000000000000000000000416112744621604011131 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 Upstream-Name: dietlibc Upstream-Contact: dietlibc@fefe.de Upstream-Author: Felix von Leitner Source: http://www.kernel.org/pub/linux/libs/dietlibc/ Files: * Copyright: Copyright 2011 Felix von Leitner License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. Files: debian/* Copyright: Copyright 2002-2011 Gerrit Pape Copyright 2011 Hector Oron License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/dietlibc-dev.prerm.in0000644000000000000000000000016612744621604013206 0ustar #!/bin/sh set -e test "$1" = 'remove' || exit 0 test ! -h /usr/lib/diet/lib-|ARCH| || rm -f /usr/lib/diet/lib-|ARCH| debian/watch0000644000000000000000000000012012744621604010216 0ustar version=3 http://www.kernel.org/pub/linux/libs/dietlibc/ dietlibc-(.*)\.tar\.gz debian/dietlibc-dev.lintian0000644000000000000000000000013512744621604013106 0ustar # this is by design, dietlibc always links statically dietlibc-dev: statically-linked-binary debian/implicit0000644000000000000000000000672712744621604010745 0ustar # $Id: a09db2e42c8b6a2d820754d741558e5894944746 $ .PHONY: deb-checkdir deb-checkuid deb-checkdir: @test -e debian/control || sh -cx '! : wrong directory' deb-checkuid: @test "`id -u`" -eq 0 || sh -cx '! : need root privileges' %.deb: %.deb-docs %.deb-DEBIAN @rm -f $*.deb $*.deb-checkdir $*.deb-docs $*.deb-docs-base \ $*.deb-docs-docs $*.deb-docs-examples $*.deb-DEBIAN \ $*.deb-DEBIAN-dir $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums %.udeb: %.deb-DEBIAN @rm -f $*.deb $*.deb-checkdir $*.deb-DEBIAN $*.deb-DEBIAN-dir \ $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums %.deb-checkdir: install @test -d debian/$* || sh -cx '! : directory debian/$* missing' @test "`id -u`" -eq 0 || sh -cx '! : need root privileges' %.deb-docs-base: install : implicit @rm -f debian/$*/usr/share/doc/$*/* || : @install -d -m0755 debian/$*/usr/share/doc/$* : debian/$*/usr/share/doc/$*/ @sh -cx 'install -m0644 debian/copyright debian/$*/usr/share/doc/$*/' @sh -cx 'install -m0644 debian/changelog \ debian/$*/usr/share/doc/$*/changelog.Debian' @test ! -r changelog || \ sh -cx 'install -m0644 changelog debian/$*/usr/share/doc/$*/' @test -r debian/$*/usr/share/doc/$*/changelog || \ sh -cx 'mv debian/$*/usr/share/doc/$*/changelog.Debian \ debian/$*/usr/share/doc/$*/changelog' @test -s debian/$*/usr/share/doc/$*/changelog || \ sh -cx 'rm -f debian/$*/usr/share/doc/$*/changelog' @gzip -9 debian/$*/usr/share/doc/$*/changelog* %.deb-docs-docs: %.deb-docs-base @for i in `cat debian/$*.docs 2>/dev/null || :`; do \ if test -d $$i; then \ sh -cx "install -d -m0755 debian/$*/usr/share/doc/$*/$${i##*/}" && \ for j in $$i/*; do \ sh -cx "install -m0644 $$j \ debian/$*/usr/share/doc/$*/$${i##*/}/" || exit 1; \ done || exit 1; \ continue; \ fi; \ sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/" || exit 1; \ done @test ! -r debian/$*.README.Debian || \ sh -cx 'install -m0644 debian/$*.README.Debian \ debian/$*/usr/share/doc/$*/README.Debian' @if test -r debian/$*.NEWS.Debian; then \ sh -cx 'install -m0644 debian/$*.NEWS.Debian \ debian/$*/usr/share/doc/$*/NEWS.Debian && \ gzip -9 debian/$*/usr/share/doc/$*/NEWS.Debian'; \ fi %.deb-docs-examples: %.deb-docs-docs @rm -rf debian/$*/usr/share/doc/$*/examples : debian/$*/usr/share/doc/$*/examples/ @test ! -r debian/$*.examples || \ install -d -m0755 debian/$*/usr/share/doc/$*/examples @for i in `cat debian/$*.examples 2>/dev/null || :`; do \ sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/examples/" \ || exit 1; \ done %.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-docs %.deb-docs-examples : debian/$*/usr/share/doc/$*/ ok %.deb-DEBIAN-base: install @rm -rf debian/$*/DEBIAN : debian/$*/DEBIAN/ @install -d -m0755 debian/$*/DEBIAN @for i in conffiles shlibs templates; do \ test ! -r debian/$*.$$i || \ sh -cx "install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i" \ || exit 1; \ done %.deb-DEBIAN-scripts: %.deb-DEBIAN-base @for i in preinst prerm postinst postrm config; do \ test ! -r debian/$*.$$i || \ sh -cx "install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i" \ || exit 1; \ done %.deb-DEBIAN-md5sums: %.deb-DEBIAN-base %.deb-docs : debian/$*/DEBIAN/md5sums @rm -f debian/$*/DEBIAN/md5sums @cd debian/$* && find * -path 'DEBIAN' -prune -o \ -type f -exec md5sum {} >>DEBIAN/md5sums \; %.deb-DEBIAN: %.deb-checkdir %.deb-DEBIAN-base %.deb-DEBIAN-scripts \ %.deb-DEBIAN-md5sums : debian/$*/DEBIAN/ ok