[config] Merge CONFIG_SHELL selection.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Aug 03 08:50:56 2009 +0200 (2009-08-03)
changeset 14488a21b4be90cd
parent 1447 8ef937cc57ba
parent 1443 ffe807a86288
child 1449 8ad2773e7ae3
[config] Merge CONFIG_SHELL selection.
scripts/crosstool-NG.sh.in
     1.1 --- a/config/cc/gcc.in	Sun Aug 02 23:50:22 2009 +0200
     1.2 +++ b/config/cc/gcc.in	Mon Aug 03 08:50:56 2009 +0200
     1.3 @@ -118,6 +118,13 @@
     1.4      select CC_GCC_4_3_or_later
     1.5      select CC_GCC_4_4_or_later
     1.6  
     1.7 +config CC_V_4_4_1
     1.8 +    bool
     1.9 +    prompt "4.4.1  (EXPERIMENTAL)"
    1.10 +    depends on EXPERIMENTAL
    1.11 +    select CC_GCC_4_3_or_later
    1.12 +    select CC_GCC_4_4_or_later
    1.13 +
    1.14  # CT_INSERT_VERSION_ABOVE
    1.15  # Don't remove above line!
    1.16  endchoice
    1.17 @@ -155,6 +162,7 @@
    1.18      default "4.3.2" if CC_V_4_3_2
    1.19      default "4.3.3" if CC_V_4_3_3
    1.20      default "4.4.0" if CC_V_4_4_0
    1.21 +    default "4.4.1" if CC_V_4_4_1
    1.22  # CT_INSERT_VERSION_STRING_ABOVE
    1.23  # Don't remove above line!
    1.24  
     2.1 --- a/config/companion_libs/gmp.in	Sun Aug 02 23:50:22 2009 +0200
     2.2 +++ b/config/companion_libs/gmp.in	Mon Aug 03 08:50:56 2009 +0200
     2.3 @@ -12,6 +12,14 @@
     2.4      bool
     2.5      prompt "4.2.4"
     2.6  
     2.7 +config GMP_V_4_3_0
     2.8 +    bool
     2.9 +    prompt "4.3.0"
    2.10 +
    2.11 +config GMP_V_4_3_1
    2.12 +    bool
    2.13 +    prompt "4.3.1"
    2.14 +
    2.15  # CT_INSERT_VERSION_ABOVE
    2.16  # Don't remove above line!
    2.17  endchoice
    2.18 @@ -20,5 +28,7 @@
    2.19      string
    2.20      default "4.2.2" if GMP_V_4_2_2
    2.21      default "4.2.4" if GMP_V_4_2_4
    2.22 +    default "4.3.0" if GMP_V_4_3_0
    2.23 +    default "4.3.1" if GMP_V_4_3_1
    2.24  # CT_INSERT_VERSION_STRING_ABOVE
    2.25  # Don't remove above line!
     3.1 --- a/config/debug/duma.in	Sun Aug 02 23:50:22 2009 +0200
     3.2 +++ b/config/debug/duma.in	Mon Aug 03 08:50:56 2009 +0200
     3.3 @@ -37,6 +37,10 @@
     3.4      bool
     3.5      prompt "2_5_14"
     3.6  
     3.7 +config DUMA_V_2_5_15
     3.8 +    bool
     3.9 +    prompt "2.5.15"
    3.10 +
    3.11  # CT_INSERT_VERSION_ABOVE
    3.12  # Don't remove above line!
    3.13  endchoice
    3.14 @@ -47,5 +51,6 @@
    3.15      default "2_5_8" if DUMA_V_2_5_8
    3.16      default "2_5_12" if DUMA_V_2_5_12
    3.17      default "2_5_14" if DUMA_V_2_5_14
    3.18 +    default "2.5.15" if DUMA_V_2_5_15
    3.19  # CT_INSERT_VERSION_STRING_ABOVE
    3.20  # Don't remove above line!
     4.1 --- a/config/debug/ltrace.in	Sun Aug 02 23:50:22 2009 +0200
     4.2 +++ b/config/debug/ltrace.in	Mon Aug 03 08:50:56 2009 +0200
     4.3 @@ -25,6 +25,10 @@
     4.4      prompt "0.5.1  (EXPERIMENTAL)"
     4.5      depends on EXPERIMENTAL
     4.6  
     4.7 +config LTRACE_V_0_5_2
     4.8 +    bool
     4.9 +    prompt "0.5.2"
    4.10 +
    4.11  # CT_INSERT_VERSION_ABOVE
    4.12  # Don't remove above line!
    4.13  endchoice
    4.14 @@ -34,5 +38,6 @@
    4.15      default "0.4" if LTRACE_V_0_4
    4.16      default "0.5" if LTRACE_V_0_5
    4.17      default "0.5.1" if LTRACE_V_0_5_1
    4.18 +    default "0.5.2" if LTRACE_V_0_5_2
    4.19  # CT_INSERT_VERSION_STRING_ABOVE
    4.20  # # Don't remove above line!
     5.1 --- a/config/kernel/linux.in	Sun Aug 02 23:50:22 2009 +0200
     5.2 +++ b/config/kernel/linux.in	Mon Aug 03 08:50:56 2009 +0200
     5.3 @@ -76,9 +76,9 @@
     5.4      prompt "2.6.26.8 (OBSOLETE)"
     5.5      depends on OBSOLETE
     5.6  
     5.7 -config KERNEL_V_2_6_27_24
     5.8 +config KERNEL_V_2_6_27_29
     5.9      bool
    5.10 -    prompt "2.6.27.24"
    5.11 +    prompt "2.6.27.29 (long-term stable)"
    5.12  
    5.13  config KERNEL_V_2_6_28_10
    5.14      bool
    5.15 @@ -104,6 +104,34 @@
    5.16      bool
    5.17      prompt "2.6.29.4"
    5.18  
    5.19 +config KERNEL_V_2_6_29_5
    5.20 +    bool
    5.21 +    prompt "2.6.29.5"
    5.22 +
    5.23 +config KERNEL_V_2_6_29_6
    5.24 +    bool
    5.25 +    prompt "2.6.29.6"
    5.26 +
    5.27 +config KERNEL_V_2_6_30
    5.28 +    bool
    5.29 +    prompt "2.6.30"
    5.30 +
    5.31 +config KERNEL_V_2_6_30_1
    5.32 +    bool
    5.33 +    prompt "2.6.30.1"
    5.34 +
    5.35 +config KERNEL_V_2_6_30_2
    5.36 +    bool
    5.37 +    prompt "2.6.30.2"
    5.38 +
    5.39 +config KERNEL_V_2_6_30_3
    5.40 +    bool
    5.41 +    prompt "2.6.30.3"
    5.42 +
    5.43 +config KERNEL_V_2_6_30_4
    5.44 +    bool
    5.45 +    prompt "2.6.30.4"
    5.46 +
    5.47  # CT_INSERT_VERSION_ABOVE
    5.48  # Don't remove above line!
    5.49  
    5.50 @@ -126,13 +154,20 @@
    5.51      default "2.6.24.7" if KERNEL_V_2_6_24_7
    5.52      default "2.6.25.20" if KERNEL_V_2_6_25_20
    5.53      default "2.6.26.8" if KERNEL_V_2_6_26_8
    5.54 -    default "2.6.27.24" if KERNEL_V_2_6_27_24
    5.55 +    default "2.6.27.29" if KERNEL_V_2_6_27_29
    5.56      default "2.6.28.10" if KERNEL_V_2_6_28_10
    5.57      default "2.6.29" if KERNEL_V_2_6_29
    5.58      default "2.6.29.1" if KERNEL_V_2_6_29_1
    5.59      default "2.6.29.2" if KERNEL_V_2_6_29_2
    5.60      default "2.6.29.3" if KERNEL_V_2_6_29_3
    5.61      default "2.6.29.4" if KERNEL_V_2_6_29_4
    5.62 +    default "2.6.29.5" if KERNEL_V_2_6_29_5
    5.63 +    default "2.6.29.6" if KERNEL_V_2_6_29_6
    5.64 +    default "2.6.30" if KERNEL_V_2_6_30
    5.65 +    default "2.6.30.1" if KERNEL_V_2_6_30_1
    5.66 +    default "2.6.30.2" if KERNEL_V_2_6_30_2
    5.67 +    default "2.6.30.3" if KERNEL_V_2_6_30_3
    5.68 +    default "2.6.30.4" if KERNEL_V_2_6_30_4
    5.69  # CT_INSERT_VERSION_STRING_ABOVE
    5.70  # Don't remove above line!
    5.71      help
     6.1 --- a/config/libc/eglibc.in	Sun Aug 02 23:50:22 2009 +0200
     6.2 +++ b/config/libc/eglibc.in	Mon Aug 03 08:50:56 2009 +0200
     6.3 @@ -36,6 +36,10 @@
     6.4      bool
     6.5      prompt "2_9"
     6.6  
     6.7 +config LIBC_V_2_10
     6.8 +    bool
     6.9 +    prompt "2_10"
    6.10 +
    6.11  # CT_INSERT_VERSION_ABOVE
    6.12  # Don't remove above line!
    6.13  
    6.14 @@ -55,6 +59,7 @@
    6.15      default "2_7" if EGLIBC_V_2_7
    6.16      default "2_8" if EGLIBC_V_2_8
    6.17      default "2_9" if EGLIBC_V_2_9
    6.18 +    default "2_10" if LIBC_V_2_10
    6.19  # CT_INSERT_VERSION_STRING_ABOVE
    6.20  # Don't remove above line!
    6.21  
     7.1 --- a/config/tools/libelf.in	Sun Aug 02 23:50:22 2009 +0200
     7.2 +++ b/config/tools/libelf.in	Mon Aug 03 08:50:56 2009 +0200
     7.3 @@ -13,6 +13,10 @@
     7.4      bool
     7.5      prompt "0.8.10"
     7.6  
     7.7 +config LIBELF_V_0_8_11
     7.8 +    bool
     7.9 +    prompt "0.8.11"
    7.10 +
    7.11  # CT_INSERT_VERSION_ABOVE
    7.12  # Don't remove above line!
    7.13  endchoice
    7.14 @@ -20,5 +24,6 @@
    7.15  config LIBELF_VERSION
    7.16      string
    7.17      default "0.8.10" if LIBELF_V_0_8_10
    7.18 +    default "0.8.11" if LIBELF_V_0_8_11
    7.19  # CT_INSERT_VERSION_STRING_ABOVE
    7.20  # Don't remove above line!
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/patches/duma/2_5_15/100-cross-compile.patch	Mon Aug 03 08:50:56 2009 +0200
     8.3 @@ -0,0 +1,32 @@
     8.4 +diff -durN duma_2_5_15.orig/GNUmakefile duma_2_5_15/GNUmakefile
     8.5 +--- duma_2_5_15.orig/GNUmakefile	2008-08-03 21:22:38.000000000 +0200
     8.6 ++++ duma_2_5_15/GNUmakefile	2009-06-19 15:32:23.000000000 +0200
     8.7 +@@ -93,10 +93,6 @@
     8.8 + # also define 'WIN32'
     8.9 + 
    8.10 + # some defaults:
    8.11 +-CC=gcc
    8.12 +-CXX=g++
    8.13 +-AR=ar
    8.14 +-RANLIB=ranlib
    8.15 + INSTALL=install
    8.16 + RM=rm
    8.17 + RMFORCE=rm -f
    8.18 +@@ -471,7 +467,7 @@
    8.19 + 
    8.20 + createconf$(EXEPOSTFIX): createconf.o
    8.21 + 	- $(RMFORCE) createconf$(EXEPOSTFIX)
    8.22 +-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
    8.23 ++	$(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
    8.24 + 
    8.25 + tstheap$(EXEPOSTFIX): libduma.a tstheap.o
    8.26 + 	- $(RMFORCE) tstheap$(EXEPOSTFIX)
    8.27 +@@ -532,7 +528,7 @@
    8.28 + # define rules how to build objects for createconf
    8.29 + #
    8.30 + createconf.o:
    8.31 +-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
    8.32 ++	$(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
    8.33 + 
    8.34 + 
    8.35 + #
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/patches/duma/2_5_15/110-separate_cpp.patch	Mon Aug 03 08:50:56 2009 +0200
     9.3 @@ -0,0 +1,19 @@
     9.4 +diff -durN duma_2_5_15.orig/GNUmakefile duma_2_5_15/GNUmakefile
     9.5 +--- duma_2_5_15.orig/GNUmakefile	2009-06-19 16:41:53.000000000 +0200
     9.6 ++++ duma_2_5_15/GNUmakefile	2009-06-19 16:43:53.000000000 +0200
     9.7 +@@ -289,9 +289,13 @@
     9.8 + 	dumatest.c tstheap.c thread-test.c testmt.c dumatestpp.cpp testoperators.cpp \
     9.9 + 	createconf.c
    9.10 + 
    9.11 +-OBJECTS=dumapp.o duma.o sem_inc.o print.o
    9.12 ++OBJECTS = duma.o sem_inc.o print.o
    9.13 ++SO_OBJECTS = duma_so.o sem_inc_so.o print_so.o
    9.14 + 
    9.15 +-SO_OBJECTS=dumapp_so.o duma_so.o sem_inc_so.o print_so.o
    9.16 ++ifeq ($(DUMA_CPP),1)
    9.17 ++OBJECTS += dumapp.o
    9.18 ++SO_OBJECTS += dumapp_so.o
    9.19 ++endif
    9.20 + 
    9.21 + # Make all the top-level targets the makefile knows about.
    9.22 + all:	libduma.a tstheap$(EXEPOSTFIX) dumatest$(EXEPOSTFIX) thread-test$(EXEPOSTFIX) testmt$(EXEPOSTFIX) dumatestpp$(EXEPOSTFIX) testoperators$(EXEPOSTFIX) $(DUMA_DYN_DEPS)
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/patches/eglibc/2_10/100-powerpc-8xx-CPU15-errata.patch	Mon Aug 03 08:50:56 2009 +0200
    10.3 @@ -0,0 +1,49 @@
    10.4 +diff -ru eglibc-2_9_orig/sysdeps/powerpc/powerpc32/memset.S eglibc-2_9/sysdeps/powerpc/powerpc32/memset.S
    10.5 +--- eglibc-2_9_orig/sysdeps/powerpc/powerpc32/memset.S	2007-04-13 08:35:45.000000000 -0700
    10.6 ++++ eglibc-2_9/sysdeps/powerpc/powerpc32/memset.S	2009-05-06 16:52:04.000000000 -0700
    10.7 +@@ -112,11 +112,13 @@
    10.8 + 	clrrwi.	rALIGN, rLEN, 5
    10.9 + 	mtcrf	0x01, rLEN	/* 40th instruction from .align */
   10.10 + 
   10.11 ++#ifndef BROKEN_PPC_8xx_CPU15
   10.12 + /* Check if we can use the special case for clearing memory using dcbz.
   10.13 +    This requires that we know the correct cache line size for this
   10.14 +    processor.  Getting the __cache_line_size may require establishing GOT
   10.15 +    addressability, so branch out of line to set this up.  */
   10.16 + 	beq	cr1, L(checklinesize)
   10.17 ++#endif
   10.18 + 
   10.19 + /* Store blocks of 32-bytes (256-bits) starting on a 32-byte boundary.
   10.20 +    Can't assume that rCHR is zero or that the cache line size is either
   10.21 +@@ -158,6 +160,7 @@
   10.22 + 	add	rMEMP, rMEMP, rALIGN
   10.23 + 	b	L(medium_tail2)	/* 72nd instruction from .align */
   10.24 + 
   10.25 ++#ifndef BROKEN_PPC_8xx_CPU15
   10.26 + 	.align	5
   10.27 + 	nop
   10.28 + /* Clear cache lines of memory in 128-byte chunks.
   10.29 +@@ -191,6 +194,7 @@
   10.30 + 	bdnz	L(zloop)
   10.31 + 	beqlr	cr5
   10.32 + 	b	L(medium_tail2)
   10.33 ++#endif /* ! BROKEN_PPC_8xx_CPU15 */
   10.34 + 
   10.35 + 	.align	5
   10.36 + L(small):
   10.37 +@@ -248,6 +252,7 @@
   10.38 + 	stw	rCHR, -8(rMEMP)
   10.39 + 	blr
   10.40 + 
   10.41 ++#ifndef BROKEN_PPC_8xx_CPU15
   10.42 + L(checklinesize):
   10.43 + #ifdef SHARED
   10.44 + 	mflr	rTMP
   10.45 +@@ -329,6 +334,7 @@
   10.46 + L(handletail32):
   10.47 + 	clrrwi.	rALIGN, rLEN, 5
   10.48 + 	b	L(nondcbz)
   10.49 ++#endif /* ! BROKEN_PPC_8xx_CPU15 */
   10.50 + 
   10.51 + END (BP_SYM (memset))
   10.52 + libc_hidden_builtin_def (memset)
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch	Mon Aug 03 08:50:56 2009 +0200
    11.3 @@ -0,0 +1,33 @@
    11.4 +diff --git a/mpz/remove.c b/mpz/remove.c
    11.5 +--- a/mpz/remove.c
    11.6 ++++ b/mpz/remove.c
    11.7 +@@ -23,7 +23,7 @@
    11.8 + unsigned long int
    11.9 + mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f)
   11.10 + {
   11.11 +-  mpz_t fpow[40];		/* inexhaustible...until year 2020 or so */
   11.12 ++  mpz_t fpow[GMP_LIMB_BITS];		/* Really MP_SIZE_T_BITS */
   11.13 +   mpz_t x, rem;
   11.14 +   unsigned long int pwr;
   11.15 +   int p;
   11.16 +@@ -69,7 +69,7 @@
   11.17 +       mpz_set (dest, x);
   11.18 +     }
   11.19 + 
   11.20 +-  pwr = (1 << p) - 1;
   11.21 ++  pwr = (1L << p) - 1;
   11.22 + 
   11.23 +   mpz_clear (fpow[p]);
   11.24 + 
   11.25 +diff --git a/mpz/remove.c b/mpz/remove.c
   11.26 +--- a/mpz/remove.c
   11.27 ++++ b/mpz/remove.c
   11.28 +@@ -80,7 +80,7 @@
   11.29 +       mpz_tdiv_qr (x, rem, dest, fpow[p]);
   11.30 +       if (SIZ (rem) == 0)
   11.31 + 	{
   11.32 +-	  pwr += 1 << p;
   11.33 ++	  pwr += 1L << p;
   11.34 + 	  mpz_set (dest, x);
   11.35 + 	}
   11.36 +       mpz_clear (fpow[p]);
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/patches/gmp/4.3.1/110-unbounded-alloc.patch	Mon Aug 03 08:50:56 2009 +0200
    12.3 @@ -0,0 +1,31 @@
    12.4 +diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c
    12.5 +--- a/mpn/generic/toom44_mul.c
    12.6 ++++ b/mpn/generic/toom44_mul.c
    12.7 +@@ -116,17 +116,16 @@
    12.8 + 
    12.9 +   TMP_MARK;
   12.10 + 
   12.11 +-  as1  = TMP_SALLOC_LIMBS (n + 1);
   12.12 +-  asm1 = TMP_SALLOC_LIMBS (n + 1);
   12.13 +-  as2  = TMP_SALLOC_LIMBS (n + 1);
   12.14 +-  ash  = TMP_SALLOC_LIMBS (n + 1);
   12.15 +-  asmh = TMP_SALLOC_LIMBS (n + 1);
   12.16 +-
   12.17 +-  bs1  = TMP_SALLOC_LIMBS (n + 1);
   12.18 +-  bsm1 = TMP_SALLOC_LIMBS (n + 1);
   12.19 +-  bs2  = TMP_SALLOC_LIMBS (n + 1);
   12.20 +-  bsh  = TMP_SALLOC_LIMBS (n + 1);
   12.21 +-  bsmh = TMP_SALLOC_LIMBS (n + 1);
   12.22 ++  as1  = TMP_ALLOC_LIMBS (10 * n + 10);
   12.23 ++  asm1 = as1  + n + 1;
   12.24 ++  as2  = asm1 + n + 1;
   12.25 ++  ash  = as2  + n + 1;
   12.26 ++  asmh = ash  + n + 1;
   12.27 ++  bs1  = asmh + n + 1;
   12.28 ++  bsm1 = bs1  + n + 1;
   12.29 ++  bs2  = bsm1 + n + 1;
   12.30 ++  bsh  = bs2  + n + 1;
   12.31 ++  bsmh = bsh  + n + 1;
   12.32 + 
   12.33 +   gp = pp;
   12.34 +   hp = pp + n + 1;
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/patches/libelf/0.8.11/100-fix-64-bit-detection.patch	Mon Aug 03 08:50:56 2009 +0200
    13.3 @@ -0,0 +1,24 @@
    13.4 +diff -dur libelf-0.8.10.orig/configure libelf-0.8.10/configure
    13.5 +--- libelf-0.8.10.orig/configure	2007-09-07 14:08:06.000000000 +0200
    13.6 ++++ libelf-0.8.10/configure	2008-10-23 22:43:19.000000000 +0200
    13.7 +@@ -1595,7 +1595,7 @@
    13.8 +   echo $ac_n "(cached) $ac_c" 1>&6
    13.9 + else
   13.10 +   if test "$cross_compiling" = yes; then
   13.11 +-  ac_cv_sizeof_long_long=0
   13.12 ++  ac_cv_sizeof_long_long=8
   13.13 + else
   13.14 +   cat > conftest.$ac_ext <<EOF
   13.15 + #line 1602 "configure"
   13.16 +diff -dur libelf-0.8.10.orig/configure.in libelf-0.8.10/configure.in
   13.17 +--- libelf-0.8.10.orig/configure.in	2007-09-07 14:07:59.000000000 +0200
   13.18 ++++ libelf-0.8.10/configure.in	2008-10-23 22:43:10.000000000 +0200
   13.19 +@@ -90,7 +90,7 @@
   13.20 + AC_CHECK_SIZEOF(short,2)
   13.21 + AC_CHECK_SIZEOF(int,4)
   13.22 + AC_CHECK_SIZEOF(long,4)
   13.23 +-AC_CHECK_SIZEOF(long long,0)
   13.24 ++AC_CHECK_SIZEOF(long long,8)
   13.25 + # Windows port
   13.26 + AC_CHECK_SIZEOF(__int64, 0)
   13.27 + 
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/patches/ltrace/0.5.2/100-allow-cross-compile.patch	Mon Aug 03 08:50:56 2009 +0200
    14.3 @@ -0,0 +1,77 @@
    14.4 +diff -durN ltrace-0.5.2.orig/Makefile.in ltrace-0.5.2/Makefile.in
    14.5 +--- ltrace-0.5.2.orig/Makefile.in	2009-05-21 19:14:54.000000000 +0200
    14.6 ++++ ltrace-0.5.2/Makefile.in	2009-06-27 15:30:34.000000000 +0200
    14.7 +@@ -2,8 +2,14 @@
    14.8 + # ltrace's Makefile.in
    14.9 + #
   14.10 + 
   14.11 +-#OS		:= $(shell uname -s)
   14.12 + OS		:= @HOST_OS@
   14.13 ++ARCH		:= $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/      \
   14.14 ++						   -e s/sun4u/sparc64/  \
   14.15 ++						   -e s/arm.*/arm/      \
   14.16 ++						   -e s/sa110/arm/      \
   14.17 ++						   -e s/ppc64/ppc/      \
   14.18 ++						   -e s/s390x/s390/)
   14.19 ++export ARCH
   14.20 + 
   14.21 + TOPDIR		= $(shell pwd)
   14.22 + 
   14.23 +diff -durN ltrace-0.5.2.orig/configure ltrace-0.5.2/configure
   14.24 +--- ltrace-0.5.2.orig/configure	2009-05-21 19:14:57.000000000 +0200
   14.25 ++++ ltrace-0.5.2/configure	2009-06-27 15:30:34.000000000 +0200
   14.26 +@@ -660,6 +660,7 @@
   14.27 + host_cpu
   14.28 + host_vendor
   14.29 + host_os
   14.30 ++HOST_ARCH
   14.31 + HOST_OS
   14.32 + CC
   14.33 + CFLAGS
   14.34 +@@ -1823,6 +1824,7 @@
   14.35 + case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
   14.36 + 
   14.37 + 
   14.38 ++HOST_ARCH="$host_cpu"
   14.39 + case "$host_os" in
   14.40 +   linux-gnu*) host_os=linux-gnu
   14.41 + esac
   14.42 +@@ -5406,6 +5408,7 @@
   14.43 + host_cpu!$host_cpu$ac_delim
   14.44 + host_vendor!$host_vendor$ac_delim
   14.45 + host_os!$host_os$ac_delim
   14.46 ++HOST_ARCH!$HOST_ARCH$ac_delim
   14.47 + HOST_OS!$HOST_OS$ac_delim
   14.48 + CC!$CC$ac_delim
   14.49 + CFLAGS!$CFLAGS$ac_delim
   14.50 +@@ -5426,7 +5429,7 @@
   14.51 + LTLIBOBJS!$LTLIBOBJS$ac_delim
   14.52 + _ACEOF
   14.53 + 
   14.54 +-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
   14.55 ++  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then
   14.56 +     break
   14.57 +   elif $ac_last_try; then
   14.58 +     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
   14.59 +diff -durN ltrace-0.5.2.orig/configure.ac ltrace-0.5.2/configure.ac
   14.60 +--- ltrace-0.5.2.orig/configure.ac	2009-05-21 19:14:54.000000000 +0200
   14.61 ++++ ltrace-0.5.2/configure.ac	2009-06-27 15:30:34.000000000 +0200
   14.62 +@@ -11,6 +11,8 @@
   14.63 + esac
   14.64 + HOST_OS="$host_os"
   14.65 + AC_SUBST(HOST_OS)
   14.66 ++HOST_ARCH="$host_cpu"
   14.67 ++AC_SUBST(HOST_ARCH)
   14.68 + 
   14.69 + dnl Checks for programs.
   14.70 + AC_PROG_CC
   14.71 +diff -durN ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile ltrace-0.5.2/sysdeps/linux-gnu/Makefile
   14.72 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile	2009-05-21 19:14:54.000000000 +0200
   14.73 ++++ ltrace-0.5.2/sysdeps/linux-gnu/Makefile	2009-06-27 15:30:34.000000000 +0200
   14.74 +@@ -1,6 +1,3 @@
   14.75 +-ARCH		:=	$(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
   14.76 +-			-e s/arm.*/arm/ -e s/sa110/arm/ -e s/ppc64/ppc/ -e s/s390x/s390/)
   14.77 +-
   14.78 + CPPFLAGS	+=	-I$(TOPDIR)/sysdeps/linux-gnu/$(ARCH)
   14.79 + 
   14.80 + OBJ		=	events.o trace.o proc.o breakpoint.o
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/patches/ltrace/0.5.2/110-alpha-support.patch	Mon Aug 03 08:50:56 2009 +0200
    15.3 @@ -0,0 +1,11 @@
    15.4 +diff -durN ltrace-0.5.2.orig/Makefile.in ltrace-0.5.2/Makefile.in
    15.5 +--- ltrace-0.5.2.orig/Makefile.in	2009-06-27 15:34:04.000000000 +0200
    15.6 ++++ ltrace-0.5.2/Makefile.in	2009-06-27 15:34:27.000000000 +0200
    15.7 +@@ -5,6 +5,7 @@
    15.8 + OS		:= @HOST_OS@
    15.9 + ARCH		:= $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/      \
   15.10 + 						   -e s/sun4u/sparc64/  \
   15.11 ++						   -e s/alpha.*/alpha/  \
   15.12 + 						   -e s/arm.*/arm/      \
   15.13 + 						   -e s/sa110/arm/      \
   15.14 + 						   -e s/ppc64/ppc/      \
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch	Mon Aug 03 08:50:56 2009 +0200
    16.3 @@ -0,0 +1,240 @@
    16.4 +--- ltrace-0.5.2.orig/TODO
    16.5 ++++ ltrace-0.5.2/TODO
    16.6 +@@ -37,3 +37,4 @@
    16.7 + * debug: change "-d" option to be something like "-d elf,events", or "-d breakpoints"
    16.8 + * Find out if a process is sharing memory with its parent?
    16.9 + * When using -p, find out if that process is sharing memory with other procs
   16.10 ++* After a clone(), syscalls may be seen as sysrets in s390 (see trace.c:syscall_p())
   16.11 +--- ltrace-0.5.2.orig/process_event.c
   16.12 ++++ ltrace-0.5.2/process_event.c
   16.13 +@@ -170,7 +170,7 @@
   16.14 + 			enable_breakpoint(proc->pid, proc->breakpoint_being_enabled);
   16.15 + 			proc->breakpoint_being_enabled = NULL;
   16.16 + 		}
   16.17 +-		if (proc->parent->state == STATE_ATTACHED && options.follow) {
   16.18 ++		if (options.follow) {
   16.19 + 			proc->state = STATE_ATTACHED;
   16.20 + 		} else {
   16.21 + 			proc->state = STATE_IGNORED;
   16.22 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/ppc/trace.c
   16.23 ++++ ltrace-0.5.2/sysdeps/linux-gnu/ppc/trace.c
   16.24 +@@ -50,9 +50,9 @@
   16.25 + 			*sysnum =
   16.26 + 			    (int)ptrace(PTRACE_PEEKUSER, proc->pid,
   16.27 + 					sizeof(long) * PT_R0, 0);
   16.28 +-			if (proc->callstack_depth > 0
   16.29 +-			    && proc->callstack[proc->callstack_depth -
   16.30 +-					       1].is_syscall) {
   16.31 ++			if (proc->callstack_depth > 0 &&
   16.32 ++					proc->callstack[proc->callstack_depth - 1].is_syscall &&
   16.33 ++					proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
   16.34 + 				return 2;
   16.35 + 			}
   16.36 + 			return 1;
   16.37 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/i386/trace.c
   16.38 ++++ ltrace-0.5.2/sysdeps/linux-gnu/i386/trace.c
   16.39 +@@ -32,7 +32,8 @@
   16.40 + 		*sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 4 * ORIG_EAX, 0);
   16.41 + 
   16.42 + 		if (proc->callstack_depth > 0 &&
   16.43 +-		    proc->callstack[proc->callstack_depth - 1].is_syscall) {
   16.44 ++				proc->callstack[proc->callstack_depth - 1].is_syscall &&
   16.45 ++				proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
   16.46 + 			return 2;
   16.47 + 		}
   16.48 + 
   16.49 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/ia64/trace.c
   16.50 ++++ ltrace-0.5.2/sysdeps/linux-gnu/ia64/trace.c
   16.51 +@@ -106,8 +106,8 @@
   16.52 + 		if (insn == 0x1000000000 || insn == 0x1ffffffffff) {
   16.53 + 			*sysnum = r15;
   16.54 + 			if (proc->callstack_depth > 0 &&
   16.55 +-			    proc->callstack[proc->callstack_depth -
   16.56 +-					    1].is_syscall) {
   16.57 ++				proc->callstack[proc->callstack_depth - 1].is_syscall &&
   16.58 ++				proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
   16.59 + 				return 2;
   16.60 + 			}
   16.61 + 			return 1;
   16.62 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/m68k/trace.c
   16.63 ++++ ltrace-0.5.2/sysdeps/linux-gnu/m68k/trace.c
   16.64 +@@ -36,9 +36,8 @@
   16.65 + 		if (*sysnum >= 0) {
   16.66 + 			depth = proc->callstack_depth;
   16.67 + 			if (depth > 0 &&
   16.68 +-			    proc->callstack[depth - 1].is_syscall &&
   16.69 +-			    proc->callstack[depth - 1].c_un.syscall ==
   16.70 +-			    *sysnum) {
   16.71 ++					proc->callstack[depth - 1].is_syscall &&
   16.72 ++					proc->callstack[depth - 1].c_un.syscall == *sysnum) {
   16.73 + 				return 2;
   16.74 + 			} else {
   16.75 + 				return 1;
   16.76 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/alpha/trace.c
   16.77 ++++ ltrace-0.5.2/sysdeps/linux-gnu/alpha/trace.c
   16.78 +@@ -36,8 +36,9 @@
   16.79 + 			return 0;
   16.80 + 		*sysnum =
   16.81 + 		    ptrace(PTRACE_PEEKUSER, proc->pid, 0 /* REG_R0 */ , 0);
   16.82 +-		if (proc->callstack_depth > 0
   16.83 +-		    && proc->callstack[proc->callstack_depth - 1].is_syscall) {
   16.84 ++		if (proc->callstack_depth > 0 &&
   16.85 ++		    proc->callstack[proc->callstack_depth - 1].is_syscall &&
   16.86 ++			proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
   16.87 + 			return 2;
   16.88 + 		}
   16.89 + 		if (*sysnum >= 0 && *sysnum < 500) {
   16.90 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/sparc/trace.c
   16.91 ++++ ltrace-0.5.2/sysdeps/linux-gnu/sparc/trace.c
   16.92 +@@ -33,9 +33,9 @@
   16.93 + 		insn = ptrace(PTRACE_PEEKTEXT, proc->pid, ip, 0);
   16.94 + 		if ((insn & 0xc1f8007f) == 0x81d00010) {
   16.95 + 			*sysnum = ((proc_archdep *) proc->arch_ptr)->regs.r_g1;
   16.96 +-			if ((proc->callstack_depth > 0)
   16.97 +-			    && proc->callstack[proc->callstack_depth -
   16.98 +-					       1].is_syscall) {
   16.99 ++			if (proc->callstack_depth > 0 &&
  16.100 ++					proc->callstack[proc->callstack_depth - 1].is_syscall &&
  16.101 ++					proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
  16.102 + 				return 2;
  16.103 + 			} else if (*sysnum >= 0) {
  16.104 + 				return 1;
  16.105 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/mipsel/trace.c
  16.106 ++++ ltrace-0.5.2/sysdeps/linux-gnu/mipsel/trace.c
  16.107 +@@ -60,33 +60,34 @@
  16.108 + int
  16.109 + syscall_p(Process *proc, int status, int *sysnum) {
  16.110 + 	if (WIFSTOPPED(status)
  16.111 +-	    && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) {
  16.112 +-       /* get the user's pc (plus 8) */
  16.113 +-       long pc = (long)get_instruction_pointer(proc);
  16.114 +-       /* fetch the SWI instruction */
  16.115 +-       int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0);
  16.116 +-       int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0);
  16.117 +-       
  16.118 +-/*
  16.119 +-  On a mipsel,  syscall looks like:
  16.120 +-  24040fa1    li v0, 0x0fa1   # 4001 --> _exit syscall
  16.121 +-  0000000c    syscall
  16.122 +- */
  16.123 +-      if(insn!=0x0000000c){
  16.124 +-          return 0;
  16.125 +-      }
  16.126 +-
  16.127 +-      *sysnum = (num & 0xFFFF) - 4000;
  16.128 +-      /* if it is a syscall, return 1 or 2 */
  16.129 +-      if (proc->callstack_depth > 0 &&
  16.130 +-          proc->callstack[proc->callstack_depth - 1].is_syscall) {
  16.131 +-          return 2;
  16.132 +-      }
  16.133 +-      
  16.134 +-      if (*sysnum >= 0) {
  16.135 +-          return 1;
  16.136 +-      }
  16.137 +-   }
  16.138 ++			&& WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) {
  16.139 ++		/* get the user's pc (plus 8) */
  16.140 ++		long pc = (long)get_instruction_pointer(proc);
  16.141 ++		/* fetch the SWI instruction */
  16.142 ++		int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0);
  16.143 ++		int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0);
  16.144 ++
  16.145 ++		/*
  16.146 ++		   On a mipsel,  syscall looks like:
  16.147 ++		   24040fa1    li v0, 0x0fa1   # 4001 --> _exit syscall
  16.148 ++		   0000000c    syscall
  16.149 ++		 */
  16.150 ++		if(insn!=0x0000000c){
  16.151 ++			return 0;
  16.152 ++		}
  16.153 ++
  16.154 ++		*sysnum = (num & 0xFFFF) - 4000;
  16.155 ++		/* if it is a syscall, return 1 or 2 */
  16.156 ++		if (proc->callstack_depth > 0 &&
  16.157 ++				proc->callstack[proc->callstack_depth - 1].is_syscall &&
  16.158 ++				proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
  16.159 ++			return 2;
  16.160 ++		}
  16.161 ++
  16.162 ++		if (*sysnum >= 0) {
  16.163 ++			return 1;
  16.164 ++		}
  16.165 ++	}
  16.166 + 	return 0;
  16.167 + }
  16.168 + /**
  16.169 +@@ -119,34 +120,34 @@
  16.170 + */
  16.171 + long
  16.172 + gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) {
  16.173 +-    long ret;
  16.174 +-    debug(2,"type %d arg %d",type,arg_num);
  16.175 +-    if (type == LT_TOF_FUNCTION || type == LT_TOF_SYSCALL){
  16.176 +-        if(arg_num <4){
  16.177 +-            ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0);
  16.178 +-            debug(2,"ret = %#lx",ret);
  16.179 +-            return ret;
  16.180 +-        } else {
  16.181 +-            // If we need this, I think we can look at [sp+16] for arg_num==4.
  16.182 +-            CP;
  16.183 +-            return 0;
  16.184 +-        }
  16.185 +-    } 
  16.186 +-    if(arg_num>=0){
  16.187 +-       fprintf(stderr,"args on return?");
  16.188 +-    }
  16.189 +-    if(type == LT_TOF_FUNCTIONR) {
  16.190 +-        return  ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0);
  16.191 +-    }
  16.192 +-    if (type == LT_TOF_SYSCALLR) {
  16.193 +-        unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0);
  16.194 +-        unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0);
  16.195 +-        if(!a3){
  16.196 +-            return v0;
  16.197 +-        }
  16.198 +-        return -1;
  16.199 +-    }
  16.200 +-    fprintf(stderr, "gimme_arg called with wrong arguments\n");
  16.201 ++	long ret;
  16.202 ++	debug(2,"type %d arg %d",type,arg_num);
  16.203 ++	if (type == LT_TOF_FUNCTION || type == LT_TOF_SYSCALL){
  16.204 ++		if(arg_num <4){
  16.205 ++			ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0);
  16.206 ++			debug(2,"ret = %#lx",ret);
  16.207 ++			return ret;
  16.208 ++		} else {
  16.209 ++			// If we need this, I think we can look at [sp+16] for arg_num==4.
  16.210 ++			CP;
  16.211 ++			return 0;
  16.212 ++		}
  16.213 ++	} 
  16.214 ++	if(arg_num>=0){
  16.215 ++		fprintf(stderr,"args on return?");
  16.216 ++	}
  16.217 ++	if(type == LT_TOF_FUNCTIONR) {
  16.218 ++		return  ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0);
  16.219 ++	}
  16.220 ++	if (type == LT_TOF_SYSCALLR) {
  16.221 ++		unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0);
  16.222 ++		unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0);
  16.223 ++		if(!a3){
  16.224 ++			return v0;
  16.225 ++		}
  16.226 ++		return -1;
  16.227 ++	}
  16.228 ++	fprintf(stderr, "gimme_arg called with wrong arguments\n");
  16.229 + 	return 0;
  16.230 + }
  16.231 + 
  16.232 +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/x86_64/trace.c
  16.233 ++++ ltrace-0.5.2/sysdeps/linux-gnu/x86_64/trace.c
  16.234 +@@ -41,7 +41,8 @@
  16.235 + 		*sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 8 * ORIG_RAX, 0);
  16.236 + 
  16.237 + 		if (proc->callstack_depth > 0 &&
  16.238 +-		    proc->callstack[proc->callstack_depth - 1].is_syscall) {
  16.239 ++				proc->callstack[proc->callstack_depth - 1].is_syscall &&
  16.240 ++				proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) {
  16.241 + 			return 2;
  16.242 + 		}
  16.243 + 
    17.1 --- a/scripts/addToolVersion.sh	Sun Aug 02 23:50:22 2009 +0200
    17.2 +++ b/scripts/addToolVersion.sh	Mon Aug 03 08:50:56 2009 +0200
    17.3 @@ -96,7 +96,11 @@
    17.4          ver_m=$(echo "${version}...." |cut -d . -f 2)
    17.5          if [    ${ver_M} -gt 4                          \
    17.6               -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 3 \)  ]; then
    17.7 -            SedExpr1="    select CC_GCC_4_3_or_later\n"
    17.8 +            SedExpr1="${SedExpr1}    select CC_GCC_4_3_or_later\n"
    17.9 +        fi
   17.10 +        if [    ${ver_M} -gt 4                          \
   17.11 +             -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 4 \)  ]; then
   17.12 +            SedExpr1="${SedExpr1}    select CC_GCC_4_4_or_later\n"
   17.13          fi
   17.14      fi
   17.15      SedExpr2="    default \"${version}\" if ${cat}_V_${v}"
    18.1 --- a/scripts/crosstool-NG.sh.in	Sun Aug 02 23:50:22 2009 +0200
    18.2 +++ b/scripts/crosstool-NG.sh.in	Mon Aug 03 08:50:56 2009 +0200
    18.3 @@ -412,7 +412,7 @@
    18.4              else
    18.5                  case "${tool}" in
    18.6                      # We'll at least need some of them...
    18.7 -                    ar|as|gcc|ld|nm|objcopy|objdump|ranlib)
    18.8 +                    ar|as|gcc|g++|ld|nm|objcopy|objdump|ranlib)
    18.9                          CT_Abort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!"
   18.10                          ;;
   18.11                      # Some are conditionnally required
    19.1 --- a/scripts/wrapper.in	Sun Aug 02 23:50:22 2009 +0200
    19.2 +++ b/scripts/wrapper.in	Mon Aug 03 08:50:56 2009 +0200
    19.3 @@ -1,7 +1,8 @@
    19.4  #!/bin/sh
    19.5  
    19.6 -dirname="$(dirname "${0}")"
    19.7 -basename="$(basename "${0}")"
    19.8 +canonicalizedname=$(readlink -nm "${0}")
    19.9 +dirname="$(dirname "${canonicalizedname}")"
   19.10 +basename="$(basename "${canonicalizedname}")"
   19.11  
   19.12  ld_lib_path="$(dirname "${dirname}")/lib"
   19.13