r6518 - in glibc-package/trunk/debian: . control.in rules.d

2015-09-02 Thread Samuel Thibault
Author: sthibault
Date: 2015-09-03 00:42:25 + (Thu, 03 Sep 2015)
New Revision: 6518

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/control
   glibc-package/trunk/debian/control.in/main
   glibc-package/trunk/debian/rules
   glibc-package/trunk/debian/rules.d/build.mk
Log:
Fix mig detection for cross-stage1

  * rules, rules.d/build.mk: Set MIG to gnu-type alias of mig, to fix
cross-stage1.
  * control, control.d/main: Bump mig dependency to get the gnu-type alias in
non-cross case too.


Modified: glibc-package/trunk/debian/changelog
===
--- glibc-package/trunk/debian/changelog2015-09-03 00:25:45 UTC (rev 
6517)
+++ glibc-package/trunk/debian/changelog2015-09-03 00:42:25 UTC (rev 
6518)
@@ -20,6 +20,10 @@
 advertise _POSIX_CLOCK_SELECTION for vlc
   * patches/hurd-i386/submitted-bootstrap.diff: New patch to fix crt*.o build
 in stage1.
+  * rules, rules.d/build.mk: Set MIG to gnu-type alias of mig, to fix
+cross-stage1.
+  * control, control.d/main: Bump mig dependency to get the gnu-type alias in
+non-cross case too.
 
   [ Aurelien Jarno ]
   * Update from upstream stable branch:

Modified: glibc-package/trunk/debian/control
===
--- glibc-package/trunk/debian/control  2015-09-03 00:25:45 UTC (rev 6517)
+++ glibc-package/trunk/debian/control  2015-09-03 00:42:25 UTC (rev 6518)
@@ -5,7 +5,7 @@
  autoconf, gawk, debhelper (>= 9.20141010), rdfind, symlinks, netbase,
  linux-libc-dev (>= 3.9) [linux-any],
  libaudit-dev [linux-any], libcap-dev [linux-any], libselinux-dev [linux-any],
- mig (>= 1.4-2) [hurd-i386], hurd-dev (>= 1:0.5.git20140320~) [hurd-i386], 
gnumach-dev (>= 2:1.4+git20141109-1) [hurd-i386],
+ mig (>= 1.5-3) [hurd-i386], hurd-dev (>= 1:0.5.git20140320~) [hurd-i386], 
gnumach-dev (>= 2:1.4+git20141109-1) [hurd-i386],
  kfreebsd-kernel-headers [kfreebsd-any],
  binutils (>= 2.21),
  g++-4.8 (>= 4.8.3-8), g++-4.8-multilib [amd64 i386 kfreebsd-amd64 mips mipsel 
mipsn32 mipsn32el mips64 mips64el powerpc ppc64 s390x sparc sparc64 x32]

Modified: glibc-package/trunk/debian/control.in/main
===
--- glibc-package/trunk/debian/control.in/main  2015-09-03 00:25:45 UTC (rev 
6517)
+++ glibc-package/trunk/debian/control.in/main  2015-09-03 00:42:25 UTC (rev 
6518)
@@ -5,7 +5,7 @@
  autoconf, gawk, debhelper (>= 9.20141010), rdfind, symlinks, netbase,
  linux-libc-dev (>= 3.9) [linux-any],
  libaudit-dev [linux-any], libcap-dev [linux-any], libselinux-dev [linux-any],
- mig (>= 1.4-2) [hurd-i386], hurd-dev (>= 1:0.5.git20140320~) [hurd-i386], 
gnumach-dev (>= 2:1.4+git20141109-1) [hurd-i386],
+ mig (>= 1.5-3) [hurd-i386], hurd-dev (>= 1:0.5.git20140320~) [hurd-i386], 
gnumach-dev (>= 2:1.4+git20141109-1) [hurd-i386],
  kfreebsd-kernel-headers [kfreebsd-any],
  binutils (>= 2.21),
  g++-4.8 (>= 4.8.3-8), g++-4.8-multilib [amd64 i386 kfreebsd-amd64 mips mipsel 
mipsn32 mipsn32el mips64 mips64el powerpc ppc64 s390x sparc sparc64 x32]

Modified: glibc-package/trunk/debian/rules
===
--- glibc-package/trunk/debian/rules2015-09-03 00:25:45 UTC (rev 6517)
+++ glibc-package/trunk/debian/rules2015-09-03 00:42:25 UTC (rev 6518)
@@ -101,6 +101,7 @@
 
 BASE_CC = gcc
 BASE_CXX = g++
+BASE_MIG = mig
 DEB_GCC_VERSION ?= -4.8
 
 RUN_TESTSUITE = yes
@@ -109,6 +110,7 @@
 # change the GNU triplet as it doesn't match the compiler name.
 CC = $(DEB_HOST_GNU_TYPE)-$(BASE_CC)$(DEB_GCC_VERSION)
 CXX= $(DEB_HOST_GNU_TYPE)-$(BASE_CXX)$(DEB_GCC_VERSION)
+MIG= $(DEB_HOST_GNU_TYPE)-$(BASE_MIG)
 BUILD_CC = $(DEB_BUILD_GNU_TYPE)-$(BASE_CC)
 BUILD_CXX = $(DEB_BUILD_GNU_TYPE)-$(BASE_CXX)
 

Modified: glibc-package/trunk/debian/rules.d/build.mk
===
--- glibc-package/trunk/debian/rules.d/build.mk 2015-09-03 00:25:45 UTC (rev 
6517)
+++ glibc-package/trunk/debian/rules.d/build.mk 2015-09-03 00:42:25 UTC (rev 
6518)
@@ -32,6 +32,7 @@
rm -f $(DEB_BUILDDIR)/configparms
echo "CC = $(call xx,CC)" >> $(DEB_BUILDDIR)/configparms
echo "CXX = $(call xx,CXX)"   >> $(DEB_BUILDDIR)/configparms
+   echo "MIG = $(call xx,MIG)"   >> $(DEB_BUILDDIR)/configparms
echo "BUILD_CC = $(BUILD_CC)" >> $(DEB_BUILDDIR)/configparms
echo "BUILD_CXX = $(BUILD_CXX)"   >> $(DEB_BUILDDIR)/configparms
echo "CFLAGS = $(HOST_CFLAGS)">> $(DEB_BUILDDIR)/configparms
@@ -78,6 +79,7 @@
cd $(DEB_BUILDDIR) && \
CC="$(call xx,CC)" \
CXX="$(call xx,CXX)" \
+   MIG="$(call xx,MIG)" \
AUTOCONF=false \
MAKEINFO=: \
$(CURDIR)/configure \



r6517 - in glibc-package/branches/glibc-2.21/debian: . patches patches/hurd-i386

2015-09-02 Thread Samuel Thibault
Author: sthibault
Date: 2015-09-03 00:25:45 + (Thu, 03 Sep 2015)
New Revision: 6517

Added:
   
glibc-package/branches/glibc-2.21/debian/patches/hurd-i386/submitted-bootstrap.diff
Modified:
   glibc-package/branches/glibc-2.21/debian/changelog
   glibc-package/branches/glibc-2.21/debian/patches/series
Log:
backport r6516 from trunk: patches/hurd-i386/submitted-bootstrap.diff: New 
patch to fix crt*.o build in stage1.

Modified: glibc-package/branches/glibc-2.21/debian/changelog
===
--- glibc-package/branches/glibc-2.21/debian/changelog  2015-09-03 00:25:12 UTC 
(rev 6516)
+++ glibc-package/branches/glibc-2.21/debian/changelog  2015-09-03 00:25:45 UTC 
(rev 6517)
@@ -263,6 +263,8 @@
 really self-hosted.
   * patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: Update patch to not
 advertise _POSIX_CLOCK_SELECTION for vlc
+  * patches/hurd-i386/submitted-bootstrap.diff: New patch to fix crt*.o build
+in stage1.
 
  -- Samuel Thibault   Sun, 09 Aug 2015 20:00:16 +
 

Copied: 
glibc-package/branches/glibc-2.21/debian/patches/hurd-i386/submitted-bootstrap.diff
 (from rev 6516, 
glibc-package/trunk/debian/patches/hurd-i386/submitted-bootstrap.diff)
===
--- 
glibc-package/branches/glibc-2.21/debian/patches/hurd-i386/submitted-bootstrap.diff
 (rev 0)
+++ 
glibc-package/branches/glibc-2.21/debian/patches/hurd-i386/submitted-bootstrap.diff
 2015-09-03 00:25:45 UTC (rev 6517)
@@ -0,0 +1,42 @@
+diff --git a/sysdeps/mach/Makefile b/sysdeps/mach/Makefile
+index b47cdc6..3323e81 100644
+--- a/sysdeps/mach/Makefile
 b/sysdeps/mach/Makefile
+@@ -35,7 +35,7 @@ endif
+ # because it's different in Darwin and the conditional crap is
+ # too much trouble.  This should suffice for getting the mach/Makefile
+ # rules invoked when they need to be.
+-mach-before-compile := $(mach-objpfx)mach-shortcuts.h \
++mach-before-compile := $(mach-objpfx)mach-shortcuts.h 
$(mach-objpfx)mach/mach_interface.h \
+  $(patsubst %,$(mach-objpfx)mach/mach_%.h,\
+ port host)
+ 
+@@ -43,7 +43,7 @@ ifneq (mach,$(subdir))
+ # This patsubst generates patterns like `m%h-shortcuts.h', which are damn
+ # likely to match just the corresponding particular file we want.
+ $(patsubst mach%,m\%h%,$(mach-before-compile)): # Run only if doesn't exist.
+-  $(MAKE) -C $(..)mach mach-before-compile no_deps=t generating=t
++  $(MAKE) -C $(..)mach subdir=mach mach-before-compile no_deps=t 
generating=t
+ 
+ before-compile += $(mach-before-compile)
+ endif
+diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
+index b528815..244ac4b 100644
+--- a/sysdeps/mach/hurd/Makefile
 b/sysdeps/mach/hurd/Makefile
+@@ -48,13 +48,13 @@ hurd-objpfx = $(common-objpfx)hurd/
+ before-compile += $(patsubst %,$(hurd-objpfx)hurd/%.h,auth io fs process)
+ $(patsubst %,$(hurd-objpfx)hurd/%.%,auth io fs process): \
+   $(common-objpfx)mach/mach-shortcuts.h
+-  $(MAKE) -C $(..)hurd before-compile no_deps=t
++  $(MAKE) -C $(..)hurd subdir=hurd before-compile no_deps=t
+ endif
+ 
+ # Hurd profil.c includes this file, so give a rule to make it.
+ ifeq ($(subdir),gmon)
+ $(common-objpfx)hurd/../mach/RPC_task_get_sampled_pcs.c:
+-  $(MAKE) -C $(..)mach before-compile no_deps=t
++  $(MAKE) -C $(..)mach subdir=mach before-compile no_deps=t
+ endif
+ 
+ 

Modified: glibc-package/branches/glibc-2.21/debian/patches/series
===
--- glibc-package/branches/glibc-2.21/debian/patches/series 2015-09-03 
00:25:12 UTC (rev 6516)
+++ glibc-package/branches/glibc-2.21/debian/patches/series 2015-09-03 
00:25:45 UTC (rev 6517)
@@ -147,6 +147,7 @@
 hurd-i386/cvs-mlock.diff
 hurd-i386/tg-mmap32th_bit.diff
 hurd-i386/tg-sysheaders.diff
+hurd-i386/submitted-bootstrap.diff
 
 i386/local-biarch.diff
 i386/local-cmov.diff



r6516 - in glibc-package/trunk/debian: . patches patches/hurd-i386

2015-09-02 Thread Samuel Thibault
Author: sthibault
Date: 2015-09-03 00:25:12 + (Thu, 03 Sep 2015)
New Revision: 6516

Added:
   glibc-package/trunk/debian/patches/hurd-i386/submitted-bootstrap.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
patches/hurd-i386/submitted-bootstrap.diff: New patch to fix crt*.o build in 
stage1.

Modified: glibc-package/trunk/debian/changelog
===
--- glibc-package/trunk/debian/changelog2015-09-01 00:26:53 UTC (rev 
6515)
+++ glibc-package/trunk/debian/changelog2015-09-03 00:25:12 UTC (rev 
6516)
@@ -18,6 +18,8 @@
 really self-hosted.
   * patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: Update patch to not
 advertise _POSIX_CLOCK_SELECTION for vlc
+  * patches/hurd-i386/submitted-bootstrap.diff: New patch to fix crt*.o build
+in stage1.
 
   [ Aurelien Jarno ]
   * Update from upstream stable branch:

Added: glibc-package/trunk/debian/patches/hurd-i386/submitted-bootstrap.diff
===
--- glibc-package/trunk/debian/patches/hurd-i386/submitted-bootstrap.diff   
(rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/submitted-bootstrap.diff   
2015-09-03 00:25:12 UTC (rev 6516)
@@ -0,0 +1,42 @@
+diff --git a/sysdeps/mach/Makefile b/sysdeps/mach/Makefile
+index b47cdc6..3323e81 100644
+--- a/sysdeps/mach/Makefile
 b/sysdeps/mach/Makefile
+@@ -35,7 +35,7 @@ endif
+ # because it's different in Darwin and the conditional crap is
+ # too much trouble.  This should suffice for getting the mach/Makefile
+ # rules invoked when they need to be.
+-mach-before-compile := $(mach-objpfx)mach-shortcuts.h \
++mach-before-compile := $(mach-objpfx)mach-shortcuts.h 
$(mach-objpfx)mach/mach_interface.h \
+  $(patsubst %,$(mach-objpfx)mach/mach_%.h,\
+ port host)
+ 
+@@ -43,7 +43,7 @@ ifneq (mach,$(subdir))
+ # This patsubst generates patterns like `m%h-shortcuts.h', which are damn
+ # likely to match just the corresponding particular file we want.
+ $(patsubst mach%,m\%h%,$(mach-before-compile)): # Run only if doesn't exist.
+-  $(MAKE) -C $(..)mach mach-before-compile no_deps=t generating=t
++  $(MAKE) -C $(..)mach subdir=mach mach-before-compile no_deps=t 
generating=t
+ 
+ before-compile += $(mach-before-compile)
+ endif
+diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
+index b528815..244ac4b 100644
+--- a/sysdeps/mach/hurd/Makefile
 b/sysdeps/mach/hurd/Makefile
+@@ -48,13 +48,13 @@ hurd-objpfx = $(common-objpfx)hurd/
+ before-compile += $(patsubst %,$(hurd-objpfx)hurd/%.h,auth io fs process)
+ $(patsubst %,$(hurd-objpfx)hurd/%.%,auth io fs process): \
+   $(common-objpfx)mach/mach-shortcuts.h
+-  $(MAKE) -C $(..)hurd before-compile no_deps=t
++  $(MAKE) -C $(..)hurd subdir=hurd before-compile no_deps=t
+ endif
+ 
+ # Hurd profil.c includes this file, so give a rule to make it.
+ ifeq ($(subdir),gmon)
+ $(common-objpfx)hurd/../mach/RPC_task_get_sampled_pcs.c:
+-  $(MAKE) -C $(..)mach before-compile no_deps=t
++  $(MAKE) -C $(..)mach subdir=mach before-compile no_deps=t
+ endif
+ 
+ 

Modified: glibc-package/trunk/debian/patches/series
===
--- glibc-package/trunk/debian/patches/series   2015-09-01 00:26:53 UTC (rev 
6515)
+++ glibc-package/trunk/debian/patches/series   2015-09-03 00:25:12 UTC (rev 
6516)
@@ -163,6 +163,7 @@
 hurd-i386/cvs-mlock.diff
 hurd-i386/tg-mmap32th_bit.diff
 hurd-i386/tg-sysheaders.diff
+hurd-i386/submitted-bootstrap.diff
 
 i386/local-biarch.diff
 i386/local-cmov.diff



Bug#797831: glibc: further problems with stage1

2015-09-02 Thread Helmut Grohne
Source: glibc
Version: 2.21-0experimental1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

Hi Aurelien,

thank you very much for applying #766877 and uploading to experimental.
This has moved us a big step closer to a working stage1. We are not
quite there yet. At this point I estimate a remaining patch stack for
the following problems:

 * stage1 fails to build for various reasons
 * stage1 libc6-dev not installable due to dependency on libc6
 * wrong set of packages being built for stage1
 * dh_shlibdeps fails
 * linux headers cannot be found
 * various hurd things

Even though I still carry patches for these, it is not clear that all of
these problems are still reproducible. The above list is meant as an
outlook, not a cumulative bug report.

This particular bug shall address only the first of those problems
above, because I have a good understanding and can answer your
questions. I am attaching a patch and also explain the individual hunks
in what follows. All of them apply to stage1-specific code.

- *:/lib32 | *:/lib64 | *:/libx32 | *:/lib/arm-linux-gnueabi*) \
+ *:/lib32 | *:/lib64 | *:/libo32 | *:/libx32 | 
*:/lib/arm-linux-gnueabi*) \

The code fails to identify a certain mips architecture multilib build
and thus places the multilib build into the main package.

+ *:* ) \
+   templates="" \
+   ;; \

This extra case ensures that no templates are interpolated for optimized
builds (e.g. libc6-i686). These do not generate development packages
anyway, so dropping them (for stage1) is the right thing to do. Failing
to do so again overwrites the main package.

-   -e "/$$libdir.*.a /d" \
+   -e "/LIBDIR.*\.a /d" \

The immediate error resulting from this sed invocation is that the
command "u" is not understood by sed. $libdir becomes
"/usr/lib/triplet".  Thus the resulting sed command starts with "//u"
which sed does not like. Fixing the escaping is not enough however,
since LIBDIR is not yet interpolated. That only happens a few lines
later. So instead, the match needs to target non-interpolated filenames
and thus match LIBDIR.

I hope that the level of detail given is sufficient. If not, please ask.
Otherwise, please consider applying the patch. I would appreciate
another experimental upload that also includes the hurd changes staged
to SVN by Samuel Thibault already within a month from now. Thank you for
your support.

Helmut
diff -Nru glibc-2.19/debian/rules.d/debhelper.mk glibc-2.19/debian/rules.d/debhelper.mk
--- glibc-2.19/debian/rules.d/debhelper.mk
+++ glibc-2.19/debian/rules.d/debhelper.mk
@@ -197,10 +197,13 @@
 	case "$$curpass:$$slibdir" in \
 	  libc:*) \
 	;; \
-	  *:/lib32 | *:/lib64 | *:/libx32 | *:/lib/arm-linux-gnueabi*) \
+	  *:/lib32 | *:/lib64 | *:/libo32 | *:/libx32 | *:/lib/arm-linux-gnueabi*) \
 	pass="-alt" \
 	suffix="-$(curpass)" \
 	;; \
+	  *:* ) \
+   templates="" \
+	;; \
 	esac ; \
 	for t in $$templates ; do \
 	  for s in debian/$$t$$pass.* ; do \
@@ -219,7 +219,7 @@
 	  cp $$s $$t ; \
 	fi ; \
 	sed -i \
-		-e "/$$libdir.*.a /d" \
+		-e "/LIBDIR.*\.a /d" \
 		-e "s#TMPDIR#debian/tmp-$$curpass#g" \
 		-e "s#RTLDDIR#$$rtlddir#g" \
 		-e "s#SLIBDIR#$$slibdir#g" \