Author: aurel32
Date: 2015-08-21 14:43:12 +0000 (Fri, 21 Aug 2015)
New Revision: 6476

Modified:
   glibc-package/branches/glibc-2.21/debian/changelog
   glibc-package/branches/glibc-2.21/debian/rules.d/build.mk
   glibc-package/branches/glibc-2.21/debian/rules.d/debhelper.mk
Log:
Fix multilib enabled stage1 cross builds (closes: #766877).

Modified: glibc-package/branches/glibc-2.21/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.21/debian/changelog  2015-08-15 08:29:08 UTC 
(rev 6475)
+++ glibc-package/branches/glibc-2.21/debian/changelog  2015-08-21 14:43:12 UTC 
(rev 6476)
@@ -92,6 +92,9 @@
     It was removed in commit 92963737c4376bcfd65235d5c325fa7f48302f89
     (Closes: #781245).
 
+  [ Matthias Klose ]
+  * Fix multilib enabled stage1 cross builds (closes: #766877).
+
  -- Samuel Thibault <[email protected]>  Fri, 20 Mar 2015 12:30:54 +0000
 
 glibc (2.21-0experimental0) experimental; urgency=medium

Modified: glibc-package/branches/glibc-2.21/debian/rules.d/build.mk
===================================================================
--- glibc-package/branches/glibc-2.21/debian/rules.d/build.mk   2015-08-15 
08:29:08 UTC (rev 6475)
+++ glibc-package/branches/glibc-2.21/debian/rules.d/build.mk   2015-08-21 
14:43:12 UTC (rev 6476)
@@ -160,10 +160,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 \
@@ -204,6 +204,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 \
@@ -225,6 +226,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

Modified: glibc-package/branches/glibc-2.21/debian/rules.d/debhelper.mk
===================================================================
--- glibc-package/branches/glibc-2.21/debian/rules.d/debhelper.mk       
2015-08-15 08:29:08 UTC (rev 6475)
+++ glibc-package/branches/glibc-2.21/debian/rules.d/debhelper.mk       
2015-08-21 14:43:12 UTC (rev 6476)
@@ -203,20 +203,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 -e "s#LIBDIR#$$libdir#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" -i debian/$(libc)-dev.install
 else
 $(patsubst %,debhelper_%,$(GLIBC_PASSES)) :: debhelper_% : $(stamp)debhelper_%
 $(stamp)debhelper_%: $(stamp)debhelper-common $(stamp)install_%

Reply via email to