[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r5053 - in glibc-package/trunk/debian: . debhelper.in patches patches/arm rules.d sysdeps



Author: vorlon
Date: 2011-12-07 00:15:45 +0000 (Wed, 07 Dec 2011)
New Revision: 5053

Added:
   glibc-package/trunk/debian/debhelper.in/libc-udeb.install.armhf
   glibc-package/trunk/debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff
   glibc-package/trunk/debian/patches/arm/unsubmitted-ldso-abi-check.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
   glibc-package/trunk/debian/rules.d/build.mk
   glibc-package/trunk/debian/sysdeps/armel.mk
   glibc-package/trunk/debian/sysdeps/armhf.mk
Log:
* patches/arm/unsubmitted-ldconfig-cache-abi.diff: New patch from
  Steve McIntyre that adds tagging to armhf libraries in ld.so.cache
* patches/arm/unsubmitted-ldso-abi-check.diff: Another patch from
  Steve McIntyre, giving ld.so the ability to differentiate between
  soft and hard-float ABIs and provide sane exits when required.
* Merge armel/armhf bi-arch support from Ubuntu, but disable until
  the armhf bootstrap in Debian has removed /lib/ld-linux.so.3:
  - Fix install locations for libc6-dev-armel in sysdeps.
  - Change armel_rtlddir (for libc6-armel) to /lib, as required.
  - Install /lib/ld-linux.so.3 symlink in libc6-armel.
  - Install ld.so.conf.d file for the multilib ARM targets.
* Add dynamic linker name for the non-default multilib in ARM ldd.
* debian/debhelper.in/libc-udeb.install.armhf: Install ld-linux.so.3
  to the correct location in the udeb, so binaries can find it.
* Install /lib/ld-linux.so.3 symlink in libc6:armhf, this will need
  to be reverted once the rebuild/rebootstrap is completed.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2011-12-04 18:33:56 UTC (rev 5052)
+++ glibc-package/trunk/debian/changelog	2011-12-07 00:15:45 UTC (rev 5053)
@@ -1,5 +1,23 @@
 eglibc (2.13-22) UNRELEASED; urgency=low
 
+  [ Adam Conrad ]
+  * patches/arm/unsubmitted-ldconfig-cache-abi.diff: New patch from
+    Steve McIntyre that adds tagging to armhf libraries in ld.so.cache
+  * patches/arm/unsubmitted-ldso-abi-check.diff: Another patch from
+    Steve McIntyre, giving ld.so the ability to differentiate between
+    soft and hard-float ABIs and provide sane exits when required.
+  * Merge armel/armhf bi-arch support from Ubuntu, but disable until
+    the armhf bootstrap in Debian has removed /lib/ld-linux.so.3:
+    - Fix install locations for libc6-dev-armel in sysdeps.
+    - Change armel_rtlddir (for libc6-armel) to /lib, as required.
+    - Install /lib/ld-linux.so.3 symlink in libc6-armel.
+    - Install ld.so.conf.d file for the multilib ARM targets.
+  * Add dynamic linker name for the non-default multilib in ARM ldd.
+  * debian/debhelper.in/libc-udeb.install.armhf: Install ld-linux.so.3
+    to the correct location in the udeb, so binaries can find it.
+  * Install /lib/ld-linux.so.3 symlink in libc6:armhf, this will need
+    to be reverted once the rebuild/rebootstrap is completed.
+
   [ Aurelien Jarno ]
   * patches/i386/local-cpuid-level2.diff: fix a typo.  Closes: #609389.
   * Don't ship /usr/share/doc/locales/README.  Closes: #643885, #643887.

Added: glibc-package/trunk/debian/debhelper.in/libc-udeb.install.armhf
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc-udeb.install.armhf	                        (rev 0)
+++ glibc-package/trunk/debian/debhelper.in/libc-udeb.install.armhf	2011-12-07 00:15:45 UTC (rev 5053)
@@ -0,0 +1,14 @@
+# FIXME: someday we may need to handle installing into non-lib
+# OH NOES, THAT DAY IS UPON US (armhf's interpreter isn't in /lib)
+TMPDIR/SLIBDIR/ld*.so* lib/arm-linux-gnueabihf
+TMPDIR/SLIBDIR/libm-*.so* lib
+TMPDIR/SLIBDIR/libm.so* lib
+TMPDIR/SLIBDIR/libdl*.so* lib
+TMPDIR/SLIBDIR/libresolv*.so* lib
+TMPDIR/SLIBDIR/libc-*.so* lib
+TMPDIR/SLIBDIR/libc.so* lib
+TMPDIR/SLIBDIR/libutil* lib
+TMPDIR/SLIBDIR/libcrypt* lib
+TMPDIR/SLIBDIR/librt*.so* lib
+TMPDIR/SLIBDIR/libpthread*.so* lib
+

Added: glibc-package/trunk/debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff
===================================================================
--- glibc-package/trunk/debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff	2011-12-07 00:15:45 UTC (rev 5053)
@@ -0,0 +1,247 @@
+--- eglibc-2.13.old/elf/cache.c	2007-10-15 21:14:17.000000000 +0100
++++ eglibc-2.13/elf/cache.c	2011-11-03 21:56:14.000000000 +0000
+@@ -91,6 +91,8 @@
+       break;
+     case FLAG_MIPS64_LIBN64:
+       fputs (",64bit", stdout);
++    case FLAG_ARM_HFABI:
++      fputs (",hard-float", stdout);
+     case 0:
+       break;
+     default:
+--- eglibc-2.13.old/sysdeps/generic/ldconfig.h	2007-09-12 17:26:54.000000000 +0100
++++ eglibc-2.13/sysdeps/generic/ldconfig.h	2011-11-09 14:48:44.481643107 +0000
+@@ -34,6 +34,7 @@
+ #define FLAG_POWERPC_LIB64	0x0500
+ #define FLAG_MIPS64_LIBN32	0x0600
+ #define FLAG_MIPS64_LIBN64	0x0700
++#define FLAG_ARM_HFABI		0x0800
+ 
+ /* Name of auxiliary cache.  */
+ #define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"
+--- eglibc-2.13.old/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h	1970-01-01 01:00:00.000000000 +0100
++++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/arm/dl-cache.h	2011-11-09 16:14:19.939065832 +0000
+@@ -0,0 +1,34 @@
++/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
++   Copyright (C) 2011 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Steve McIntyre <steve.mcintyre@linaro.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library 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
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <ldconfig.h>
++
++/* Redefine the cache ID for the new hf ABI; the sf ABI inverts the check.  */
++#define _DL_CACHE_ARMHF_ID  (FLAG_ARM_HFABI | FLAG_ELF_LIBC6)
++
++#ifdef __ARM_PCS_VFP
++#define _dl_cache_check_flags(flags) \
++  ((flags) == _DL_CACHE_ARMHF_ID)
++#else
++#define _dl_cache_check_flags(flags) \
++  ((flags) != _DL_CACHE_ARMHF_ID)
++#endif
++
++#include_next <dl-cache.h>
+--- eglibc-2.13.old/ports/sysdeps/unix/sysv/linux/arm/readelflib.c	1970-01-01 01:00:00.000000000 +0100
++++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/arm/readelflib.c	2011-11-09 16:14:25.797641640 +0000
+@@ -0,0 +1,186 @@
++/* Copyright (C) 2011 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Steve McIntyre <steve.mcintyre@linaro.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library 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
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++int process_elf32_file (const char *file_name, const char *lib, int *flag,
++			unsigned int *osversion, char **soname,
++			void *file_contents, size_t file_length);
++
++/* Read an unsigned leb128 value from P, store the value in VAL, return
++   P incremented past the value.  We assume that a word is large enough to
++   hold any value so encoded; if it is smaller than a pointer on some target,
++   pointers should not be leb128 encoded on that target.  */
++static const unsigned char *
++read_uleb128 (const unsigned char *p, unsigned long *val)
++{
++  unsigned int shift = 0;
++  unsigned char byte;
++  unsigned long result;
++
++  result = 0;
++  do
++    {
++      byte = *p++;
++      result |= (byte & 0x7f) << shift;
++      shift += 7;
++    }
++  while (byte & 0x80);
++
++  *val = result;
++  return p;
++}
++
++
++#define ATTR_TAG_FILE          1
++#define ABI_VFP_args          28
++#define VFP_ARGS_IN_VFP_REGS   1
++
++/* Check the ABI in the ARM attributes. Search through the section
++   headers looking for the ARM attributes section, then check the
++   VFP_ARGS attribute. */
++static int is_library_hf(const char *file_name, void *file_contents, size_t file_length)
++{
++  unsigned int i;
++  ElfW(Ehdr) *ehdr = (ElfW(Ehdr) *) file_contents;
++  ElfW(Shdr) *shdrs;
++
++  shdrs = file_contents + ehdr->e_shoff;
++  for (i = 0; i < ehdr->e_shnum; i++)
++    {        
++      if (SHT_ARM_ATTRIBUTES == shdrs[i].sh_type)
++        {
++	  /* We've found a likely section. Load the contents and
++	   * check the tags */
++	  unsigned char *p = (unsigned char *)file_contents + shdrs[i].sh_offset;
++	  unsigned char * end;
++
++	  /* Sanity-check the attribute section details. Make sure
++	   * that it's the "aeabi" section, that's all we care
++	   * about. */
++	  if (*p == 'A')
++            {
++	      unsigned long len = shdrs[i].sh_size - 1;
++	      unsigned long namelen;
++	      p++;
++                
++	      while (len > 0)
++                {
++		  unsigned long section_len = p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
++		  if (section_len > len)
++		    section_len = len;
++
++		  p += 4;                    
++		  len -= section_len;
++		  section_len -= 4;
++
++		  if (0 != strcmp((char *)p, "aeabi"))
++                    {
++		      p += section_len;
++		      continue;
++                    }
++		  namelen = strlen((char *)p) + 1;
++		  p += namelen;
++		  section_len -= namelen;
++                    
++		  /* We're in a valid section. Walk through this
++		   * section looking for the tag we care about
++		   * (ABI_VFP_args) */
++		  while (section_len > 0)
++                    {
++		      unsigned long tag, val;
++		      unsigned long size;
++
++		      end = p;
++		      tag = (*p++);
++
++		      size = p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
++		      if (size > section_len)
++			size = section_len;
++		      p += 4;
++                        
++		      section_len -= size;
++		      end += size;
++		      if (ATTR_TAG_FILE != tag)
++                        {
++			  /* ignore, we don't care */
++			  p = end;
++			  continue;
++                        }
++		      while (p < end)
++                        {
++			  p = read_uleb128 (p, &tag);
++			  /* Handle the different types of tag. */
++			  if ( (tag == 4) || (tag == 5) || (tag == 67) )
++                            {
++			      /* Special cases for string values */
++			      namelen = strlen((char *)p) + 1;
++			      p += namelen;
++                            }
++			  else
++                            {
++			      p = read_uleb128 (p, &val);
++                            }
++			  if ( (tag == ABI_VFP_args) && (val == VFP_ARGS_IN_VFP_REGS) )
++			    return 1;
++                        }
++                    }
++                }
++            }                
++        }            
++    }
++  return 0;
++}
++
++/* Returns 0 if everything is ok, != 0 in case of error.  */
++int
++process_elf_file (const char *file_name, const char *lib, int *flag,
++		  unsigned int *osversion, char **soname, void *file_contents,
++		  size_t file_length)
++{
++  ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
++  int ret;
++
++  if (elf_header->e_machine != EM_ARM)
++    {
++      error (0, 0, _("%s is for unknown machine %d.\n"),
++	     file_name, elf_header->e_machine);
++      return 1;
++    }
++
++  /* Explicitly not coping with 64-bit yet... */
++  if (elf_header->e_ident [EI_CLASS] != ELFCLASS32)
++    {
++      error (0, 0, _("%s is not 32-bit.\n"), file_name);
++      return 1;
++    }
++  ret = process_elf32_file (file_name, lib, flag, osversion, soname,
++			    file_contents, file_length);
++  
++  if (!ret)
++    /* Do we have a hard-float ABI library? */
++    if (is_library_hf(file_name, file_contents, file_length))
++      *flag = FLAG_ARM_HFABI|FLAG_ELF_LIBC6;
++  return ret;
++}
++
++#undef __ELF_NATIVE_CLASS
++#undef process_elf_file
++#define process_elf_file process_elf32_file
++#define __ELF_NATIVE_CLASS 32
++#include "elf/readelflib.c"

Added: glibc-package/trunk/debian/patches/arm/unsubmitted-ldso-abi-check.diff
===================================================================
--- glibc-package/trunk/debian/patches/arm/unsubmitted-ldso-abi-check.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/arm/unsubmitted-ldso-abi-check.diff	2011-12-07 00:15:45 UTC (rev 5053)
@@ -0,0 +1,241 @@
+--- eglibc-2.13.old/elf/dl-load.c	2011-02-04 22:13:20.000000000 +0000
++++ eglibc-2.13/elf/dl-load.c	2011-11-23 16:21:27.000000000 +0000
+@@ -1547,6 +1551,208 @@
+     _dl_debug_printf_c ("\t\t(%s)\n", what);
+ }
+ 
++#ifdef __arm__
++/* Read an unsigned leb128 value from P, store the value in VAL, return
++   P incremented past the value.  We assume that a word is large enough to
++   hold any value so encoded; if it is smaller than a pointer on some target,
++   pointers should not be leb128 encoded on that target.  */
++static const unsigned char *
++read_uleb128 (const unsigned char *p, unsigned long *val)
++{
++  unsigned int shift = 0;
++  unsigned char byte;
++  unsigned long result;
++
++  result = 0;
++  do
++    {
++      byte = *p++;
++      result |= (byte & 0x7f) << shift;
++      shift += 7;
++    }
++  while (byte & 0x80);
++
++  *val = result;
++  return p;
++}
++
++
++#define ATTR_TAG_FILE          1
++#define ABI_VFP_args          28
++#define VFP_ARGS_IN_VFP_REGS   1
++
++/* Check consistency of ABI in the ARM attributes. Search through the
++   section headers looking for the ARM attributes section, then
++   check the VFP_ARGS attribute. */
++static int
++check_arm_attributes_hfabi(int fd, ElfW(Ehdr) *ehdr, bool *is_hf)
++{
++  unsigned int i;
++  ElfW(Shdr) *shdrs;
++  int sh_size = ehdr->e_shentsize * ehdr->e_shnum;
++
++  /* Load in the section headers so we can look for the attributes
++   * section */
++  shdrs = alloca(sh_size);
++  __lseek (fd, ehdr->e_shoff, SEEK_SET);
++  if ((size_t) __libc_read (fd, (void *) shdrs, sh_size) != sh_size)
++    return -1;
++
++  for (i = 0; i < ehdr->e_shnum; i++)
++    {        
++      if (SHT_ARM_ATTRIBUTES == shdrs[i].sh_type)
++        {
++	  /* We've found a likely section. Load the contents and
++	   * check the tags */
++	  unsigned char *contents = alloca(shdrs[i].sh_size);
++	  unsigned char *p = contents;
++	  unsigned char * end;
++
++	  __lseek (fd, shdrs[i].sh_offset, SEEK_SET);
++	  if ((size_t) __libc_read (fd, (void *) contents, shdrs[i].sh_size) != shdrs[i].sh_size)
++	    return -1;
++
++	  /* Sanity-check the attribute section details. Make sure
++	   * that it's the "aeabi" section, that's all we care
++	   * about. */
++	  if (*p == 'A')
++            {
++	      unsigned long len = shdrs[i].sh_size - 1;
++	      unsigned long namelen;
++	      p++;
++                
++	      while (len > 0)
++                {
++		  unsigned long section_len = p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
++		  if (section_len > len)
++                    {
++		      _dl_debug_printf_c ("    invalid section len %lu, max remaining %lu\n", section_len, len);
++		      section_len = len;
++                    }
++
++		  p += 4;                    
++		  len -= section_len;
++		  section_len -= 4;
++
++		  if (0 != strcmp((char *)p, "aeabi"))
++                    {
++		      _dl_debug_printf_c ("    ignoring unknown attr section %s\n", p);
++		      p += section_len;
++		      continue;
++                    }
++		  namelen = strlen((char *)p) + 1;
++		  p += namelen;
++		  section_len -= namelen;
++                    
++		  /* We're in a valid section. Walk through this
++		   * section looking for the tag we care about
++		   * (ABI_VFP_args) */
++		  while (section_len > 0)
++                    {
++		      unsigned long tag, val;
++		      unsigned long size;
++
++		      end = p;
++		      tag = (*p++);
++
++		      size = p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
++		      if (size > section_len)
++                        {
++			  _dl_debug_printf_c ("    invalid subsection length %lu, max allowed %lu\n", size, section_len);
++			  size = section_len;
++                        }
++		      p += 4;
++                        
++		      section_len -= size;
++		      end += size;
++		      if (ATTR_TAG_FILE != tag)
++                        {
++			  /* ignore, we don't care */
++			  _dl_debug_printf_c ("    ignoring unknown subsection with type %u length %lu\n", tag, size);
++			  p = end;
++			  continue;
++                        }
++		      while (p < end)
++                        {
++			  p = read_uleb128 (p, &tag);
++			  /* Handle the different types of tag. */
++			  if ( (tag == 4) || (tag == 5) || (tag == 67) )
++                            {
++			      /* Special cases for string values */
++			      namelen = strlen((char *)p) + 1;
++			      p += namelen;
++                            }
++			  else
++                            {
++			      p = read_uleb128 (p, &val);
++                            }
++			  if ( (tag == ABI_VFP_args) && (val == VFP_ARGS_IN_VFP_REGS) )
++                            {
++			      *is_hf = 1;
++			      return 0;
++                            }
++                        }
++                    }
++                }
++            }                
++        }            
++    }
++    
++  return 0;
++}
++
++
++/* ARM-specific checks. If we're built using the HF ABI, then fail any
++   attempts to use the SF ABI (and vice versa). Then, check for
++   consistency of ABI in terms of passing VFP args. */
++static int
++arm_specific_checks(int fd, const char *name, ElfW(Ehdr) *ehdr)
++{
++  static int all_hf = -1; /* unset */
++  bool is_hf = false;
++  int ret;
++
++  ret = check_arm_attributes_hfabi(fd, ehdr, &is_hf);
++  if (ret != 0)
++    return ret;
++
++#ifdef __ARM_PCS_VFP
++  if (!is_hf)
++    _exit(1);
++#else
++  if (is_hf)
++    _exit(1);
++#endif
++
++  if (all_hf == -1)
++    {
++      if (is_hf)
++	all_hf = 1;
++      else
++	all_hf = 0;
++    }
++  else if (all_hf == 1 && !is_hf)
++    return EINVAL;
++  else if (all_hf == 0 && is_hf)
++    return EINVAL;
++  return 0;
++}
++#endif
++
++
++/* Run any architecture-specific checks that might be needed for the
++   current architecture. */
++static int
++arch_specific_checks(int fd, const char *name, ElfW(Ehdr) *ehdr)
++{
++#ifdef __arm__
++    return arm_specific_checks(fd, name, ehdr);
++#endif
++
++  return 0;
++}
++
++
+ /* Open a file and verify it is an ELF file for this architecture.  We
+    ignore only ELF files for other architectures.  Non-ELF files and
+    ELF files with different header information cause fatal errors since
+@@ -1745,6 +1951,7 @@
+ 
+       /* Check .note.ABI-tag if present.  */
+       for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph)
++      {
+ 	if (ph->p_type == PT_NOTE && ph->p_filesz >= 32 && ph->p_align >= 4)
+ 	  {
+ 	    ElfW(Addr) size = ph->p_filesz;
+@@ -1793,6 +2000,21 @@
+ 	    break;
+ 	  }
+     }
++      if (-1 != fd)
++	{
++	  int error = arch_specific_checks(fd, name, ehdr);
++	  if (EINVAL == error)
++	    {
++	      goto close_and_out;
++	    }
++	  if (0 != error)
++	    {
++	      errstring = N_("Unable to run arch-specific checks\n");
++	      goto call_lose;
++	    }
++	}
++
++    }
+ 
+   return fd;
+ }

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2011-12-04 18:33:56 UTC (rev 5052)
+++ glibc-package/trunk/debian/patches/series	2011-12-07 00:15:45 UTC (rev 5053)
@@ -84,6 +84,8 @@
 arm/local-sigaction.diff
 arm/submitted-armhf-triplet.diff
 arm/cvs-clone-cantunwind.diff
+arm/unsubmitted-ldconfig-cache-abi.diff
+arm/unsubmitted-ldso-abi-check.diff
 
 hppa/local-inlining.diff
 hppa/local-linuxthreads.diff

Modified: glibc-package/trunk/debian/rules.d/build.mk
===================================================================
--- glibc-package/trunk/debian/rules.d/build.mk	2011-12-04 18:33:56 UTC (rev 5052)
+++ glibc-package/trunk/debian/rules.d/build.mk	2011-12-07 00:15:45 UTC (rev 5053)
@@ -192,6 +192,25 @@
 	  ;; \
 	esac
 
+	# handle the non-default multilib for arm targets
+	case $(curpass) in arm*) \
+	  mkdir -p debian/tmp-$(curpass)/etc/ld.so.conf.d; \
+	  conffile="debian/tmp-$(curpass)/etc/ld.so.conf.d/$$(basename $(call xx,slibdir)).conf"; \
+	  echo "# Multiarch support" > $$conffile; \
+	  echo "$(call xx,slibdir)" >> $$conffile; \
+	  echo "$(call xx,libdir)" >> $$conffile; \
+	esac
+
+	# ARM: add dynamic linker name for the non-default multilib in ldd
+	if [ $(curpass) = libc ]; then \
+	  case $(DEB_HOST_ARCH) in \
+	    armel) \
+	      sed -i '/RTLDLIST=/s,=\(.*\),="\1 /lib/arm-linux-gnueabihf/ld-linux.so.3",' debian/tmp-$(curpass)/usr/bin/ldd;; \
+	    armhf) \
+	      sed -i '/RTLDLIST=/s,=\(.*\),="\1 /lib/ld-linux.so.3",' debian/tmp-$(curpass)/usr/bin/ldd;; \
+	  esac; \
+	fi
+
 	# Create the ld.so symlink to the multiarch directory
 	if [ $(curpass) = libc ]; then \
 	  rtld_so="$$(LANG=C LC_ALL=C readelf -l debian/tmp-$(curpass)/usr/bin/iconv | grep 'interpreter' | sed -e 's/.*interpreter: \(.*\)]/\1/g')" ; \

Modified: glibc-package/trunk/debian/sysdeps/armel.mk
===================================================================
--- glibc-package/trunk/debian/sysdeps/armel.mk	2011-12-04 18:33:56 UTC (rev 5052)
+++ glibc-package/trunk/debian/sysdeps/armel.mk	2011-12-07 00:15:45 UTC (rev 5053)
@@ -1 +1,24 @@
 libc_add-ons = ports nptl $(add-ons)
+
+#EGLIBC_PASSES += armhf
+#DEB_ARCH_REGULAR_PACKAGES += libc6-armhf libc6-dev-armhf
+#armhf_add-ons = ports nptl $(add-ons)
+#armhf_CC = $(BUILD_CC) -mfloat-abi=hard
+#armhf_CXX = $(BUILD_CXX) -mfloat-abi=hard
+#armhf_slibdir = /lib/arm-linux-gnueabihf
+#armhf_libdir = /usr/lib/arm-linux-gnueabihf
+## To be coinstallable with armel, we install ld.so to a multiarch directory
+## from the beginning.
+#armhf_rtlddir = /lib/$(DEB_HOST_MULTIARCH)
+#
+#define libc6-dev-armhf_extra_pkg_install
+#mkdir -p debian/libc6-dev-armhf/usr/include
+#cp -a debian/tmp-armhf/usr/include/bits \
+#	debian/libc6-dev-armhf/usr/include/
+#cp -a debian/tmp-armhf/usr/include/gnu \
+#	debian/libc6-dev-armhf/usr/include/
+#cp -a debian/tmp-armhf/usr/include/sys \
+#	debian/libc6-dev-armhf/usr/include/
+#cp debian/tmp-armhf/usr/include/fpu_control.h \
+#	debian/libc6-dev-armhf/usr/include/
+#endef

Modified: glibc-package/trunk/debian/sysdeps/armhf.mk
===================================================================
--- glibc-package/trunk/debian/sysdeps/armhf.mk	2011-12-04 18:33:56 UTC (rev 5052)
+++ glibc-package/trunk/debian/sysdeps/armhf.mk	2011-12-07 00:15:45 UTC (rev 5053)
@@ -9,3 +9,39 @@
 CXX    = g++-4.6
 endif
 
+# To be coinstallable with armel, we install ld.so to a multiarch directory
+# from the beginning.
+libc_rtlddir = /lib/$(DEB_HOST_MULTIARCH)
+
+# This is only here while Debian/armhf is still transitioning linkers
+# ** THIS MUST BE REMOVED BEFORE ENABLING THE BI-ARCH BUILD BELOW **
+define libc6_extra_pkg_install
+mkdir -p debian/libc6/lib
+ln -sf $(libc_rtlddir)/ld-linux.so.3 debian/libc6/lib
+endef
+
+#EGLIBC_PASSES += armel
+#DEB_ARCH_REGULAR_PACKAGES += libc6-armel libc6-dev-armel
+#armel_add-ons = ports nptl $(add-ons)
+#armel_CC = $(BUILD_CC) -mfloat-abi=softfp
+#armel_CXX = $(BUILD_CXX) -mfloat-abi=softfp
+#armel_slibdir = /lib/arm-linux-gnueabi
+#armel_libdir = /usr/lib/arm-linux-gnueabi
+#armel_rtlddir = /lib
+#
+#define libc6-dev-armel_extra_pkg_install
+#mkdir -p debian/libc6-dev-armel/usr/include
+#cp -a debian/tmp-armel/usr/include/bits \
+#	debian/libc6-dev-armel/usr/include/
+#cp -a debian/tmp-armel/usr/include/gnu \
+#	debian/libc6-dev-armel/usr/include/
+#cp -a debian/tmp-armel/usr/include/sys \
+#	debian/libc6-dev-armel/usr/include/
+#cp debian/tmp-armel/usr/include/fpu_control.h \
+#	debian/libc6-dev-armel/usr/include/
+#endef
+#
+#define libc6-armel_extra_pkg_install
+#mkdir -p debian/libc6-armel/lib
+#ln -sf $(armel_slibdir)/ld-linux.so.3 debian/libc6-armel/lib
+#endef


Reply to: