1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-override.patch Tue May 22 21:16:17 2007 +0000
1.3 @@ -0,0 +1,38 @@
1.4 +The error
1.5 +
1.6 +make[2]: *** [.../gcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/share/zoneinfo/Africa/Algiers] Segmentation fault
1.7 +make[2]: Leaving directory `.../gcc-3.3.3-glibc-2.1.3/glibc-2.1.3/timezone'
1.8 +make[1]: *** [timezone/subdir_install] Error 2
1.9 +
1.10 +is caused by glibc trying to run something it just compiled.
1.11 +A crude workaround for this was posted at
1.12 +http://lists.scratchbox.org/pipermail/scratchbox-users/2004-February/000018.html
1.13 +but the following patch lets you optionally override these programs at
1.14 +make time by setting Make variables
1.15 + localedef_FOR_BUILD rpcgen_FOR_BUILD zic_FOR_BUILD
1.16 +and maybe a few others to point to versions of those programs
1.17 +that can run on the build machine.
1.18 +Thanks to http://groups.google.com/groups?selm=9012160052.AA23106%40kaos.ksr.com
1.19 +for pointing out the idiom for inline $(ifdef ...) in GNU Make.
1.20 +
1.21 +Dan Kegel 2004-05-17
1.22 +[rediffed for glibc-2.3.2]
1.23 +[typos corrected - those are make variables, not environment variables,
1.24 + and it's $(built-program-override-name), not $(build-program-override-name)]
1.25 +
1.26 +--- glibc-2.3.2/Makeconfig.old 2004-05-17 13:53:46.000000000 -0700
1.27 ++++ glibc-2.3.2/Makeconfig 2004-05-17 14:09:59.000000000 -0700
1.28 +@@ -534,9 +534,12 @@
1.29 + run-program-prefix =
1.30 + endif
1.31 + # Never use $(run-program-prefix) for the statically-linked %-bp test programs
1.32 +-built-program-cmd = $(patsubst %,$(run-program-prefix),\
1.33 ++built-program-real = $(patsubst %,$(run-program-prefix),\
1.34 + $(filter-out %-bp,$(built-program-file))) \
1.35 + $(built-program-file)
1.36 ++# If user set foo_FOR_BUILD, use that instead of actually running the program we just linked.
1.37 ++built-program-override-name = $(notdir $(word 2,$^))_FOR_BUILD
1.38 ++built-program-cmd = $(if $(findstring undefined,$(origin $(built-program-override-name))),$(built-program-real),$($(built-program-override-name)))
1.39 +
1.40 + ifndef LD
1.41 + LD := ld -X