summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-01-20 18:55:46 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-01-20 18:55:46 (GMT)
commit991a5070e58d8de758b964a574f813ad0c03de91 (patch)
treeadaad89fc75e4d375542410305ea3ecdb457de88 /patches
parente11cc118f2d0a2b2433c9bb81d223daa736d679b (diff)
Backport patch for glibc-2.6.1 to glibc-2.6:
- fixes glibc-2.6.1 build on OpenSOLARIS.
Diffstat (limited to 'patches')
-rw-r--r--patches/glibc/2.6/220-cross-posix_makefile.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/patches/glibc/2.6/220-cross-posix_makefile.patch b/patches/glibc/2.6/220-cross-posix_makefile.patch
new file mode 100644
index 0000000..ae623db
--- /dev/null
+++ b/patches/glibc/2.6/220-cross-posix_makefile.patch
@@ -0,0 +1,65 @@
+On 20090111.1151+0100, Thomas Jourdan <tjourdan@neuf.fr> wrote:
+
+ I'm still working on the solaris port an I have the same issue here.
+ While trying to build the i686-nptl-linux-gnu toolchain under
+ OpenSolaris, the problems appears during the make install rule of the
+ libc function.
+
+ The problem is that solaris tries to execute ld-linux.so.2, which is an
+ elf 32 bits dyn lib, and it fails with a memory fault, not a "cannot
+ execute binary file". Hence the build stops on this error.
+
+And on 20090111.1339+0100, he replied with:
+
+ After digging a little, the problem comes from the
+ glibc-2.6.1/posix/Makefile. It has been solved starting from glibc 2.7
+ so I extracted a patch for glibc 2.6.1.
+
+--- glibc-2.6.1/posix/Makefile 2007-04-04 01:28:20.000000000 +0200
++++ glibc-2.7/posix/Makefile 2007-09-12 01:57:22.000000000 +0200
+@@ -98,7 +98,7 @@
+ endif
+ others := getconf
+ install-bin := getconf
+-install-others := $(inst_libexecdir)/getconf
++install-others-programs := $(inst_libexecdir)/getconf
+
+ before-compile := testcases.h ptestcases.h
+
+@@ -110,7 +110,7 @@
+ tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
+ tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
+ bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
+- tst-vfork3-mem tst-vfork3.mtrace
++ tst-vfork3-mem tst-vfork3.mtrace getconf.speclist
+
+ include ../Rules
+
+@@ -291,12 +291,20 @@
+ $(objpfx)bug-glob2-mem: $(objpfx)bug-glob2.out
+ $(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@
+
+-$(inst_libexecdir)/getconf: $(objpfx)getconf FORCE
++$(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
++ $(objpfx)getconf.speclist FORCE
+ $(addprefix $(..)./scripts/mkinstalldirs ,\
+ $(filter-out $(wildcard $@),$@))
+- for spec in `LC_ALL=C GETCONF_DIR=/dev/null \
+- $(run-program-prefix) $< \
+- _POSIX_V6_WIDTH_RESTRICTED_ENVS`; do \
+- $(INSTALL_PROGRAM) $< $@/$$spec.new; \
+- mv -f $@/$$spec.new $@/$$spec; \
+- done
++ while read spec; do \
++ ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
++ mv -f $@/$$spec.new $@/$$spec; \
++ done < $(objpfx)getconf.speclist
++
++$(objpfx)getconf.speclist: $(objpfx)getconf
++ifeq (no,$(cross-compiling))
++ LC_ALL=C GETCONF_DIR=/dev/null \
++ $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
++else
++ > $@.new
++endif
++ mv -f $@.new $@