Bug#766877: Fix multilib enabled stage1 cross builds

2015-04-30 Thread Helmut Grohne
On Tue, Dec 16, 2014 at 08:51:44PM +0100, Helmut Grohne wrote:
> Matthias patch does not work for architectures with optimized libcs
> (called "otherarch" in glibc packaging, i.e. i386, mipsel, alpha).

Matthias asked to clarify my stance on this patch. The above says that
the patch does not work for architectures with optimized libcs. What it
doesn't say there is that the patch goes a long way to fix architectures
without optimized libcs. It thus presents a good basis for further work
on the bootstrap problem. I would like to see that patch merged.

To be serious, the reason for me having stopped sending glibc patches is
that this essential patch still has not been merged.

Helmut


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150430150247.ga25...@alf.mars



Bug#766877: Fix multilib enabled stage1 cross builds

2014-12-16 Thread Helmut Grohne
Control: user helm...@debian.org
Control: usertags -1 + rebootstrap

On Sun, Oct 26, 2014 at 02:23:07PM +0100, Matthias Klose wrote:
> The patch fixes building multilib enabled stage1 cross, by doing the call xx
> dance for stage1 as well, as well as generating the debhelper files for 
> multilib
> stage1 packages.

Matthias patch does not work for architectures with optimized libcs
(called "otherarch" in glibc packaging, i.e. i386, mipsel, alpha).

Quoting the commit message of
http://anonscm.debian.org/cgit/users/helmutg/rebootstrap.git/commit/?id=b462ceb
for details:

| attempt at fixing glibc multilib stage1 builds
| 
| Currently for mipsel libc6-dev and libc6-dev-mips64 (stage1) are not
| coinstallable, because they have an undeclared file conflict in
| /usr/include/sys. Since libc6-dev is multiarch, it shouldn't contain
| that directory but use something below /usr/include/triplet.
| 
| The cause is the debhelper tooling affected by the patch below. It is
| run for each $curpass, where in case of mipsel passes include libc,
| mips64 and loongson2f. The last one is interesting, because it is not
| covered by either existing cases. In the non-stage1 variant of this
| code, it is classified as a pass=-otherbuild. Since we don't change
| templates or pass for loongson2f, the snippet overwrites the debhelper
| .install files for libc causing the libc6-dev package to contain the
| headers for loongson2f (in non-multiarch locations). So the non-stage1
| restricts templates to just libc for otherbuild. Since stage1 restricts
| templates to libc-dev, the intersection for stage1 and otherbuild is
| empty.
| 
| Arguably, the loongson2f pass should be skipped in stage1 entirely.
| 
| This bug should break any architecture with optimized libc packages:
|  * mipsel -> loongon2f
|  * i386 -> 686 (breaks in gcc earlier atm)
|  * alpha -> alphaev67 (libc6.1-dev and libc6-dev conflict already)

Helmut


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141216195143.ga15...@alf.mars



Bug#766877: Fix multilib enabled stage1 cross builds

2014-10-26 Thread Matthias Klose
Package: src:glibc
Version:
Tags: patch

The patch fixes building multilib enabled stage1 cross, by doing the call xx
dance for stage1 as well, as well as generating the debhelper files for multilib
stage1 packages.
--- glibc-2.19/debian/rules.d/debhelper.mk.orig 2014-10-22 21:10:46.131349002 
+0200
+++ glibc-2.19/debian/rules.d/debhelper.mk  2014-10-22 21:20:07.863363493 
+0200
@@ -201,19 +201,30 @@
templates="libc-dev" ;\
pass="" ; \
suffix="" ;\
+   case "$$curpass:$$slibdir" in \
+ libc:*) \
+   ;; \
+ *:/lib32 | *:/lib64 | *:/libx32 | *:/lib/arm-linux-gnueabi*) \
+   pass="-alt" \
+   suffix="-$(curpass)" \
+   ;; \
+   esac ; \
for t in $$templates ; do \
  for s in debian/$$t$$pass.* ; do \
t=`echo $$s | sed -e "s#libc\(.*\)$$pass#$(libc)\1$$suffix#"` ; \
+   echo "Generating $$t ..."; \
if [ "$$s" != "$$t" ] ; then \
  cp $$s $$t ; \
fi ; \
-   sed -e "s#TMPDIR#debian/tmp-$$curpass#g" -i $$t; \
-   sed -e "s#RTLDDIR#$$rtlddir#g" -i $$t; \
-   sed -e "s#SLIBDIR#$$slibdir#g" -i $$t; \
+   sed -i \
+   -e "/LIBDIR.*.a /d" \
+   -e "s#TMPDIR#debian/tmp-$$curpass#g" \
+   -e "s#RTLDDIR#$$rtlddir#g" \
+   -e "s#SLIBDIR#$$slibdir#g" \
+   -e "s#LIBDIR#$$libdir#g" \
+ $$t; \
  done ; \
done
-
-   sed -e "/LIBDIR.*.a /d" -e "s#LIBDIR#lib#g" -i 
debian/$(libc)-dev.install
 else
 $(patsubst %,debhelper_%,$(GLIBC_PASSES)) :: debhelper_% : $(stamp)debhelper_%
 $(stamp)debhelper_%: $(stamp)debhelper-common $(stamp)install_%
--- glibc-2.19/debian/rules.d/build.mk.orig 2014-10-23 15:14:45.302186092 
+0200
+++ glibc-2.19/debian/rules.d/build.mk  2014-10-23 15:15:37.194572346 +0200
@@ -165,10 +165,10 @@
cross-compiling=yes install_root=$(CURDIR)/debian/tmp-$(curpass)
\
install-bootstrap-headers=yes install-headers )
 
-   install -d $(CURDIR)/debian/tmp-$(curpass)/lib
-   install -m 644 $(DEB_BUILDDIR)/csu/crt[1in].o 
$(CURDIR)/debian/tmp-$(curpass)/lib
-   ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \
-   -o $(CURDIR)/debian/tmp-$(curpass)/lib/libc.so
+   install -d $(CURDIR)/debian/tmp-$(curpass)/$(call xx,libdir)
+   install -m 644 $(DEB_BUILDDIR)/csu/crt[1in].o 
$(CURDIR)/debian/tmp-$(curpass)/$(call xx,libdir)/.
+   $(call xx,CC) -nostdlib -nostartfiles -shared -x c /dev/null \
+   -o $(CURDIR)/debian/tmp-$(curpass)/$(call xx,libdir)/libc.so
 else
: # FIXME: why just needed for ARM multilib?
case "$(curpass)" in \
@@ -209,6 +209,7 @@
  $(MAKE) -f debian/generate-supported.mk IN=localedata/SUPPORTED \
OUT=debian/tmp-$(curpass)/usr/share/i18n/SUPPORTED; \
fi
+endif
 
# Create the multiarch directories, and the configuration file in 
/etc/ld.so.conf.d
if [ $(curpass) = libc ]; then \
@@ -230,6 +231,7 @@
  mv debian/tmp-$(curpass)/usr/include/ieee754.h 
debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH); \
fi
 
+ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
# For our biarch libc, add an ld.so.conf.d configuration; this
# is needed because multiarch libc Replaces: libc6-i386 for ld.so, and
# the multiarch ld.so doesn't look at the (non-standard) /lib32, so we