1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.6/220-cross-posix_makefile.patch Sun Mar 04 17:31:23 2012 +0100
1.3 @@ -0,0 +1,65 @@
1.4 +On 20090111.1151+0100, Thomas Jourdan <tjourdan@neuf.fr> wrote:
1.5 +
1.6 + I'm still working on the solaris port an I have the same issue here.
1.7 + While trying to build the i686-nptl-linux-gnu toolchain under
1.8 + OpenSolaris, the problems appears during the make install rule of the
1.9 + libc function.
1.10 +
1.11 + The problem is that solaris tries to execute ld-linux.so.2, which is an
1.12 + elf 32 bits dyn lib, and it fails with a memory fault, not a "cannot
1.13 + execute binary file". Hence the build stops on this error.
1.14 +
1.15 +And on 20090111.1339+0100, he replied with:
1.16 +
1.17 + After digging a little, the problem comes from the
1.18 + glibc-2.6.1/posix/Makefile. It has been solved starting from glibc 2.7
1.19 + so I extracted a patch for glibc 2.6.1.
1.20 +
1.21 +--- glibc-2.6.1/posix/Makefile 2007-04-04 01:28:20.000000000 +0200
1.22 ++++ glibc-2.7/posix/Makefile 2007-09-12 01:57:22.000000000 +0200
1.23 +@@ -98,7 +98,7 @@
1.24 + endif
1.25 + others := getconf
1.26 + install-bin := getconf
1.27 +-install-others := $(inst_libexecdir)/getconf
1.28 ++install-others-programs := $(inst_libexecdir)/getconf
1.29 +
1.30 + before-compile := testcases.h ptestcases.h
1.31 +
1.32 +@@ -110,7 +110,7 @@
1.33 + tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
1.34 + tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
1.35 + bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
1.36 +- tst-vfork3-mem tst-vfork3.mtrace
1.37 ++ tst-vfork3-mem tst-vfork3.mtrace getconf.speclist
1.38 +
1.39 + include ../Rules
1.40 +
1.41 +@@ -291,12 +291,20 @@
1.42 + $(objpfx)bug-glob2-mem: $(objpfx)bug-glob2.out
1.43 + $(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@
1.44 +
1.45 +-$(inst_libexecdir)/getconf: $(objpfx)getconf FORCE
1.46 ++$(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
1.47 ++ $(objpfx)getconf.speclist FORCE
1.48 + $(addprefix $(..)./scripts/mkinstalldirs ,\
1.49 + $(filter-out $(wildcard $@),$@))
1.50 +- for spec in `LC_ALL=C GETCONF_DIR=/dev/null \
1.51 +- $(run-program-prefix) $< \
1.52 +- _POSIX_V6_WIDTH_RESTRICTED_ENVS`; do \
1.53 +- $(INSTALL_PROGRAM) $< $@/$$spec.new; \
1.54 +- mv -f $@/$$spec.new $@/$$spec; \
1.55 +- done
1.56 ++ while read spec; do \
1.57 ++ ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
1.58 ++ mv -f $@/$$spec.new $@/$$spec; \
1.59 ++ done < $(objpfx)getconf.speclist
1.60 ++
1.61 ++$(objpfx)getconf.speclist: $(objpfx)getconf
1.62 ++ifeq (no,$(cross-compiling))
1.63 ++ LC_ALL=C GETCONF_DIR=/dev/null \
1.64 ++ $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
1.65 ++else
1.66 ++ > $@.new
1.67 ++endif
1.68 ++ mv -f $@.new $@