# HG changeset patch # User "Yann E. MORIN" # Date 1249282256 -7200 # Node ID 8a21b4be90cdf167510d48e1056fbde19a384ee5 # Parent 8ef937cc57ba86d58117fcb968768caeb50b6a47# Parent ffe807a862881a0714ad7d2e82bd52ef54c69c78 [config] Merge CONFIG_SHELL selection. diff -r 8ef937cc57ba -r 8a21b4be90cd config/cc/gcc.in --- a/config/cc/gcc.in Sun Aug 02 23:50:22 2009 +0200 +++ b/config/cc/gcc.in Mon Aug 03 08:50:56 2009 +0200 @@ -118,6 +118,13 @@ select CC_GCC_4_3_or_later select CC_GCC_4_4_or_later +config CC_V_4_4_1 + bool + prompt "4.4.1 (EXPERIMENTAL)" + depends on EXPERIMENTAL + select CC_GCC_4_3_or_later + select CC_GCC_4_4_or_later + # CT_INSERT_VERSION_ABOVE # Don't remove above line! endchoice @@ -155,6 +162,7 @@ default "4.3.2" if CC_V_4_3_2 default "4.3.3" if CC_V_4_3_3 default "4.4.0" if CC_V_4_4_0 + default "4.4.1" if CC_V_4_4_1 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! diff -r 8ef937cc57ba -r 8a21b4be90cd config/companion_libs/gmp.in --- a/config/companion_libs/gmp.in Sun Aug 02 23:50:22 2009 +0200 +++ b/config/companion_libs/gmp.in Mon Aug 03 08:50:56 2009 +0200 @@ -12,6 +12,14 @@ bool prompt "4.2.4" +config GMP_V_4_3_0 + bool + prompt "4.3.0" + +config GMP_V_4_3_1 + bool + prompt "4.3.1" + # CT_INSERT_VERSION_ABOVE # Don't remove above line! endchoice @@ -20,5 +28,7 @@ string default "4.2.2" if GMP_V_4_2_2 default "4.2.4" if GMP_V_4_2_4 + default "4.3.0" if GMP_V_4_3_0 + default "4.3.1" if GMP_V_4_3_1 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! diff -r 8ef937cc57ba -r 8a21b4be90cd config/debug/duma.in --- a/config/debug/duma.in Sun Aug 02 23:50:22 2009 +0200 +++ b/config/debug/duma.in Mon Aug 03 08:50:56 2009 +0200 @@ -37,6 +37,10 @@ bool prompt "2_5_14" +config DUMA_V_2_5_15 + bool + prompt "2.5.15" + # CT_INSERT_VERSION_ABOVE # Don't remove above line! endchoice @@ -47,5 +51,6 @@ default "2_5_8" if DUMA_V_2_5_8 default "2_5_12" if DUMA_V_2_5_12 default "2_5_14" if DUMA_V_2_5_14 + default "2.5.15" if DUMA_V_2_5_15 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! diff -r 8ef937cc57ba -r 8a21b4be90cd config/debug/ltrace.in --- a/config/debug/ltrace.in Sun Aug 02 23:50:22 2009 +0200 +++ b/config/debug/ltrace.in Mon Aug 03 08:50:56 2009 +0200 @@ -25,6 +25,10 @@ prompt "0.5.1 (EXPERIMENTAL)" depends on EXPERIMENTAL +config LTRACE_V_0_5_2 + bool + prompt "0.5.2" + # CT_INSERT_VERSION_ABOVE # Don't remove above line! endchoice @@ -34,5 +38,6 @@ default "0.4" if LTRACE_V_0_4 default "0.5" if LTRACE_V_0_5 default "0.5.1" if LTRACE_V_0_5_1 + default "0.5.2" if LTRACE_V_0_5_2 # CT_INSERT_VERSION_STRING_ABOVE # # Don't remove above line! diff -r 8ef937cc57ba -r 8a21b4be90cd config/kernel/linux.in --- a/config/kernel/linux.in Sun Aug 02 23:50:22 2009 +0200 +++ b/config/kernel/linux.in Mon Aug 03 08:50:56 2009 +0200 @@ -76,9 +76,9 @@ prompt "2.6.26.8 (OBSOLETE)" depends on OBSOLETE -config KERNEL_V_2_6_27_24 +config KERNEL_V_2_6_27_29 bool - prompt "2.6.27.24" + prompt "2.6.27.29 (long-term stable)" config KERNEL_V_2_6_28_10 bool @@ -104,6 +104,34 @@ bool prompt "2.6.29.4" +config KERNEL_V_2_6_29_5 + bool + prompt "2.6.29.5" + +config KERNEL_V_2_6_29_6 + bool + prompt "2.6.29.6" + +config KERNEL_V_2_6_30 + bool + prompt "2.6.30" + +config KERNEL_V_2_6_30_1 + bool + prompt "2.6.30.1" + +config KERNEL_V_2_6_30_2 + bool + prompt "2.6.30.2" + +config KERNEL_V_2_6_30_3 + bool + prompt "2.6.30.3" + +config KERNEL_V_2_6_30_4 + bool + prompt "2.6.30.4" + # CT_INSERT_VERSION_ABOVE # Don't remove above line! @@ -126,13 +154,20 @@ default "2.6.24.7" if KERNEL_V_2_6_24_7 default "2.6.25.20" if KERNEL_V_2_6_25_20 default "2.6.26.8" if KERNEL_V_2_6_26_8 - default "2.6.27.24" if KERNEL_V_2_6_27_24 + default "2.6.27.29" if KERNEL_V_2_6_27_29 default "2.6.28.10" if KERNEL_V_2_6_28_10 default "2.6.29" if KERNEL_V_2_6_29 default "2.6.29.1" if KERNEL_V_2_6_29_1 default "2.6.29.2" if KERNEL_V_2_6_29_2 default "2.6.29.3" if KERNEL_V_2_6_29_3 default "2.6.29.4" if KERNEL_V_2_6_29_4 + default "2.6.29.5" if KERNEL_V_2_6_29_5 + default "2.6.29.6" if KERNEL_V_2_6_29_6 + default "2.6.30" if KERNEL_V_2_6_30 + default "2.6.30.1" if KERNEL_V_2_6_30_1 + default "2.6.30.2" if KERNEL_V_2_6_30_2 + default "2.6.30.3" if KERNEL_V_2_6_30_3 + default "2.6.30.4" if KERNEL_V_2_6_30_4 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! help diff -r 8ef937cc57ba -r 8a21b4be90cd config/libc/eglibc.in --- a/config/libc/eglibc.in Sun Aug 02 23:50:22 2009 +0200 +++ b/config/libc/eglibc.in Mon Aug 03 08:50:56 2009 +0200 @@ -36,6 +36,10 @@ bool prompt "2_9" +config LIBC_V_2_10 + bool + prompt "2_10" + # CT_INSERT_VERSION_ABOVE # Don't remove above line! @@ -55,6 +59,7 @@ default "2_7" if EGLIBC_V_2_7 default "2_8" if EGLIBC_V_2_8 default "2_9" if EGLIBC_V_2_9 + default "2_10" if LIBC_V_2_10 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! diff -r 8ef937cc57ba -r 8a21b4be90cd config/tools/libelf.in --- a/config/tools/libelf.in Sun Aug 02 23:50:22 2009 +0200 +++ b/config/tools/libelf.in Mon Aug 03 08:50:56 2009 +0200 @@ -13,6 +13,10 @@ bool prompt "0.8.10" +config LIBELF_V_0_8_11 + bool + prompt "0.8.11" + # CT_INSERT_VERSION_ABOVE # Don't remove above line! endchoice @@ -20,5 +24,6 @@ config LIBELF_VERSION string default "0.8.10" if LIBELF_V_0_8_10 + default "0.8.11" if LIBELF_V_0_8_11 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! diff -r 8ef937cc57ba -r 8a21b4be90cd patches/duma/2_5_15/100-cross-compile.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/duma/2_5_15/100-cross-compile.patch Mon Aug 03 08:50:56 2009 +0200 @@ -0,0 +1,32 @@ +diff -durN duma_2_5_15.orig/GNUmakefile duma_2_5_15/GNUmakefile +--- duma_2_5_15.orig/GNUmakefile 2008-08-03 21:22:38.000000000 +0200 ++++ duma_2_5_15/GNUmakefile 2009-06-19 15:32:23.000000000 +0200 +@@ -93,10 +93,6 @@ + # also define 'WIN32' + + # some defaults: +-CC=gcc +-CXX=g++ +-AR=ar +-RANLIB=ranlib + INSTALL=install + RM=rm + RMFORCE=rm -f +@@ -471,7 +467,7 @@ + + createconf$(EXEPOSTFIX): createconf.o + - $(RMFORCE) createconf$(EXEPOSTFIX) +- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) ++ $(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) + + tstheap$(EXEPOSTFIX): libduma.a tstheap.o + - $(RMFORCE) tstheap$(EXEPOSTFIX) +@@ -532,7 +528,7 @@ + # define rules how to build objects for createconf + # + createconf.o: +- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ ++ $(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ + + + # diff -r 8ef937cc57ba -r 8a21b4be90cd patches/duma/2_5_15/110-separate_cpp.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/duma/2_5_15/110-separate_cpp.patch Mon Aug 03 08:50:56 2009 +0200 @@ -0,0 +1,19 @@ +diff -durN duma_2_5_15.orig/GNUmakefile duma_2_5_15/GNUmakefile +--- duma_2_5_15.orig/GNUmakefile 2009-06-19 16:41:53.000000000 +0200 ++++ duma_2_5_15/GNUmakefile 2009-06-19 16:43:53.000000000 +0200 +@@ -289,9 +289,13 @@ + dumatest.c tstheap.c thread-test.c testmt.c dumatestpp.cpp testoperators.cpp \ + createconf.c + +-OBJECTS=dumapp.o duma.o sem_inc.o print.o ++OBJECTS = duma.o sem_inc.o print.o ++SO_OBJECTS = duma_so.o sem_inc_so.o print_so.o + +-SO_OBJECTS=dumapp_so.o duma_so.o sem_inc_so.o print_so.o ++ifeq ($(DUMA_CPP),1) ++OBJECTS += dumapp.o ++SO_OBJECTS += dumapp_so.o ++endif + + # Make all the top-level targets the makefile knows about. + all: libduma.a tstheap$(EXEPOSTFIX) dumatest$(EXEPOSTFIX) thread-test$(EXEPOSTFIX) testmt$(EXEPOSTFIX) dumatestpp$(EXEPOSTFIX) testoperators$(EXEPOSTFIX) $(DUMA_DYN_DEPS) diff -r 8ef937cc57ba -r 8a21b4be90cd patches/eglibc/2_10/100-powerpc-8xx-CPU15-errata.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/eglibc/2_10/100-powerpc-8xx-CPU15-errata.patch Mon Aug 03 08:50:56 2009 +0200 @@ -0,0 +1,49 @@ +diff -ru eglibc-2_9_orig/sysdeps/powerpc/powerpc32/memset.S eglibc-2_9/sysdeps/powerpc/powerpc32/memset.S +--- eglibc-2_9_orig/sysdeps/powerpc/powerpc32/memset.S 2007-04-13 08:35:45.000000000 -0700 ++++ eglibc-2_9/sysdeps/powerpc/powerpc32/memset.S 2009-05-06 16:52:04.000000000 -0700 +@@ -112,11 +112,13 @@ + clrrwi. rALIGN, rLEN, 5 + mtcrf 0x01, rLEN /* 40th instruction from .align */ + ++#ifndef BROKEN_PPC_8xx_CPU15 + /* Check if we can use the special case for clearing memory using dcbz. + This requires that we know the correct cache line size for this + processor. Getting the __cache_line_size may require establishing GOT + addressability, so branch out of line to set this up. */ + beq cr1, L(checklinesize) ++#endif + + /* Store blocks of 32-bytes (256-bits) starting on a 32-byte boundary. + Can't assume that rCHR is zero or that the cache line size is either +@@ -158,6 +160,7 @@ + add rMEMP, rMEMP, rALIGN + b L(medium_tail2) /* 72nd instruction from .align */ + ++#ifndef BROKEN_PPC_8xx_CPU15 + .align 5 + nop + /* Clear cache lines of memory in 128-byte chunks. +@@ -191,6 +194,7 @@ + bdnz L(zloop) + beqlr cr5 + b L(medium_tail2) ++#endif /* ! BROKEN_PPC_8xx_CPU15 */ + + .align 5 + L(small): +@@ -248,6 +252,7 @@ + stw rCHR, -8(rMEMP) + blr + ++#ifndef BROKEN_PPC_8xx_CPU15 + L(checklinesize): + #ifdef SHARED + mflr rTMP +@@ -329,6 +334,7 @@ + L(handletail32): + clrrwi. rALIGN, rLEN, 5 + b L(nondcbz) ++#endif /* ! BROKEN_PPC_8xx_CPU15 */ + + END (BP_SYM (memset)) + libc_hidden_builtin_def (memset) diff -r 8ef937cc57ba -r 8a21b4be90cd patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch Mon Aug 03 08:50:56 2009 +0200 @@ -0,0 +1,33 @@ +diff --git a/mpz/remove.c b/mpz/remove.c +--- a/mpz/remove.c ++++ b/mpz/remove.c +@@ -23,7 +23,7 @@ + unsigned long int + mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f) + { +- mpz_t fpow[40]; /* inexhaustible...until year 2020 or so */ ++ mpz_t fpow[GMP_LIMB_BITS]; /* Really MP_SIZE_T_BITS */ + mpz_t x, rem; + unsigned long int pwr; + int p; +@@ -69,7 +69,7 @@ + mpz_set (dest, x); + } + +- pwr = (1 << p) - 1; ++ pwr = (1L << p) - 1; + + mpz_clear (fpow[p]); + +diff --git a/mpz/remove.c b/mpz/remove.c +--- a/mpz/remove.c ++++ b/mpz/remove.c +@@ -80,7 +80,7 @@ + mpz_tdiv_qr (x, rem, dest, fpow[p]); + if (SIZ (rem) == 0) + { +- pwr += 1 << p; ++ pwr += 1L << p; + mpz_set (dest, x); + } + mpz_clear (fpow[p]); diff -r 8ef937cc57ba -r 8a21b4be90cd patches/gmp/4.3.1/110-unbounded-alloc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/gmp/4.3.1/110-unbounded-alloc.patch Mon Aug 03 08:50:56 2009 +0200 @@ -0,0 +1,31 @@ +diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c +--- a/mpn/generic/toom44_mul.c ++++ b/mpn/generic/toom44_mul.c +@@ -116,17 +116,16 @@ + + TMP_MARK; + +- as1 = TMP_SALLOC_LIMBS (n + 1); +- asm1 = TMP_SALLOC_LIMBS (n + 1); +- as2 = TMP_SALLOC_LIMBS (n + 1); +- ash = TMP_SALLOC_LIMBS (n + 1); +- asmh = TMP_SALLOC_LIMBS (n + 1); +- +- bs1 = TMP_SALLOC_LIMBS (n + 1); +- bsm1 = TMP_SALLOC_LIMBS (n + 1); +- bs2 = TMP_SALLOC_LIMBS (n + 1); +- bsh = TMP_SALLOC_LIMBS (n + 1); +- bsmh = TMP_SALLOC_LIMBS (n + 1); ++ as1 = TMP_ALLOC_LIMBS (10 * n + 10); ++ asm1 = as1 + n + 1; ++ as2 = asm1 + n + 1; ++ ash = as2 + n + 1; ++ asmh = ash + n + 1; ++ bs1 = asmh + n + 1; ++ bsm1 = bs1 + n + 1; ++ bs2 = bsm1 + n + 1; ++ bsh = bs2 + n + 1; ++ bsmh = bsh + n + 1; + + gp = pp; + hp = pp + n + 1; diff -r 8ef937cc57ba -r 8a21b4be90cd patches/libelf/0.8.11/100-fix-64-bit-detection.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/libelf/0.8.11/100-fix-64-bit-detection.patch Mon Aug 03 08:50:56 2009 +0200 @@ -0,0 +1,24 @@ +diff -dur libelf-0.8.10.orig/configure libelf-0.8.10/configure +--- libelf-0.8.10.orig/configure 2007-09-07 14:08:06.000000000 +0200 ++++ libelf-0.8.10/configure 2008-10-23 22:43:19.000000000 +0200 +@@ -1595,7 +1595,7 @@ + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test "$cross_compiling" = yes; then +- ac_cv_sizeof_long_long=0 ++ ac_cv_sizeof_long_long=8 + else + cat > conftest.$ac_ext <&5 +diff -durN ltrace-0.5.2.orig/configure.ac ltrace-0.5.2/configure.ac +--- ltrace-0.5.2.orig/configure.ac 2009-05-21 19:14:54.000000000 +0200 ++++ ltrace-0.5.2/configure.ac 2009-06-27 15:30:34.000000000 +0200 +@@ -11,6 +11,8 @@ + esac + HOST_OS="$host_os" + AC_SUBST(HOST_OS) ++HOST_ARCH="$host_cpu" ++AC_SUBST(HOST_ARCH) + + dnl Checks for programs. + AC_PROG_CC +diff -durN ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile ltrace-0.5.2/sysdeps/linux-gnu/Makefile +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile 2009-05-21 19:14:54.000000000 +0200 ++++ ltrace-0.5.2/sysdeps/linux-gnu/Makefile 2009-06-27 15:30:34.000000000 +0200 +@@ -1,6 +1,3 @@ +-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ +- -e s/arm.*/arm/ -e s/sa110/arm/ -e s/ppc64/ppc/ -e s/s390x/s390/) +- + CPPFLAGS += -I$(TOPDIR)/sysdeps/linux-gnu/$(ARCH) + + OBJ = events.o trace.o proc.o breakpoint.o diff -r 8ef937cc57ba -r 8a21b4be90cd patches/ltrace/0.5.2/110-alpha-support.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/ltrace/0.5.2/110-alpha-support.patch Mon Aug 03 08:50:56 2009 +0200 @@ -0,0 +1,11 @@ +diff -durN ltrace-0.5.2.orig/Makefile.in ltrace-0.5.2/Makefile.in +--- ltrace-0.5.2.orig/Makefile.in 2009-06-27 15:34:04.000000000 +0200 ++++ ltrace-0.5.2/Makefile.in 2009-06-27 15:34:27.000000000 +0200 +@@ -5,6 +5,7 @@ + OS := @HOST_OS@ + ARCH := $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/ \ + -e s/sun4u/sparc64/ \ ++ -e s/alpha.*/alpha/ \ + -e s/arm.*/arm/ \ + -e s/sa110/arm/ \ + -e s/ppc64/ppc/ \ diff -r 8ef937cc57ba -r 8a21b4be90cd patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/ltrace/0.5.2/120-debian-ltrace-0.5.2-2.patch Mon Aug 03 08:50:56 2009 +0200 @@ -0,0 +1,240 @@ +--- ltrace-0.5.2.orig/TODO ++++ ltrace-0.5.2/TODO +@@ -37,3 +37,4 @@ + * debug: change "-d" option to be something like "-d elf,events", or "-d breakpoints" + * Find out if a process is sharing memory with its parent? + * When using -p, find out if that process is sharing memory with other procs ++* After a clone(), syscalls may be seen as sysrets in s390 (see trace.c:syscall_p()) +--- ltrace-0.5.2.orig/process_event.c ++++ ltrace-0.5.2/process_event.c +@@ -170,7 +170,7 @@ + enable_breakpoint(proc->pid, proc->breakpoint_being_enabled); + proc->breakpoint_being_enabled = NULL; + } +- if (proc->parent->state == STATE_ATTACHED && options.follow) { ++ if (options.follow) { + proc->state = STATE_ATTACHED; + } else { + proc->state = STATE_IGNORED; +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/ppc/trace.c ++++ ltrace-0.5.2/sysdeps/linux-gnu/ppc/trace.c +@@ -50,9 +50,9 @@ + *sysnum = + (int)ptrace(PTRACE_PEEKUSER, proc->pid, + sizeof(long) * PT_R0, 0); +- if (proc->callstack_depth > 0 +- && proc->callstack[proc->callstack_depth - +- 1].is_syscall) { ++ if (proc->callstack_depth > 0 && ++ proc->callstack[proc->callstack_depth - 1].is_syscall && ++ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { + return 2; + } + return 1; +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/i386/trace.c ++++ ltrace-0.5.2/sysdeps/linux-gnu/i386/trace.c +@@ -32,7 +32,8 @@ + *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 4 * ORIG_EAX, 0); + + if (proc->callstack_depth > 0 && +- proc->callstack[proc->callstack_depth - 1].is_syscall) { ++ proc->callstack[proc->callstack_depth - 1].is_syscall && ++ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { + return 2; + } + +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/ia64/trace.c ++++ ltrace-0.5.2/sysdeps/linux-gnu/ia64/trace.c +@@ -106,8 +106,8 @@ + if (insn == 0x1000000000 || insn == 0x1ffffffffff) { + *sysnum = r15; + if (proc->callstack_depth > 0 && +- proc->callstack[proc->callstack_depth - +- 1].is_syscall) { ++ proc->callstack[proc->callstack_depth - 1].is_syscall && ++ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { + return 2; + } + return 1; +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/m68k/trace.c ++++ ltrace-0.5.2/sysdeps/linux-gnu/m68k/trace.c +@@ -36,9 +36,8 @@ + if (*sysnum >= 0) { + depth = proc->callstack_depth; + if (depth > 0 && +- proc->callstack[depth - 1].is_syscall && +- proc->callstack[depth - 1].c_un.syscall == +- *sysnum) { ++ proc->callstack[depth - 1].is_syscall && ++ proc->callstack[depth - 1].c_un.syscall == *sysnum) { + return 2; + } else { + return 1; +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/alpha/trace.c ++++ ltrace-0.5.2/sysdeps/linux-gnu/alpha/trace.c +@@ -36,8 +36,9 @@ + return 0; + *sysnum = + ptrace(PTRACE_PEEKUSER, proc->pid, 0 /* REG_R0 */ , 0); +- if (proc->callstack_depth > 0 +- && proc->callstack[proc->callstack_depth - 1].is_syscall) { ++ if (proc->callstack_depth > 0 && ++ proc->callstack[proc->callstack_depth - 1].is_syscall && ++ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { + return 2; + } + if (*sysnum >= 0 && *sysnum < 500) { +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/sparc/trace.c ++++ ltrace-0.5.2/sysdeps/linux-gnu/sparc/trace.c +@@ -33,9 +33,9 @@ + insn = ptrace(PTRACE_PEEKTEXT, proc->pid, ip, 0); + if ((insn & 0xc1f8007f) == 0x81d00010) { + *sysnum = ((proc_archdep *) proc->arch_ptr)->regs.r_g1; +- if ((proc->callstack_depth > 0) +- && proc->callstack[proc->callstack_depth - +- 1].is_syscall) { ++ if (proc->callstack_depth > 0 && ++ proc->callstack[proc->callstack_depth - 1].is_syscall && ++ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { + return 2; + } else if (*sysnum >= 0) { + return 1; +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/mipsel/trace.c ++++ ltrace-0.5.2/sysdeps/linux-gnu/mipsel/trace.c +@@ -60,33 +60,34 @@ + int + syscall_p(Process *proc, int status, int *sysnum) { + if (WIFSTOPPED(status) +- && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { +- /* get the user's pc (plus 8) */ +- long pc = (long)get_instruction_pointer(proc); +- /* fetch the SWI instruction */ +- int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0); +- int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0); +- +-/* +- On a mipsel, syscall looks like: +- 24040fa1 li v0, 0x0fa1 # 4001 --> _exit syscall +- 0000000c syscall +- */ +- if(insn!=0x0000000c){ +- return 0; +- } +- +- *sysnum = (num & 0xFFFF) - 4000; +- /* if it is a syscall, return 1 or 2 */ +- if (proc->callstack_depth > 0 && +- proc->callstack[proc->callstack_depth - 1].is_syscall) { +- return 2; +- } +- +- if (*sysnum >= 0) { +- return 1; +- } +- } ++ && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { ++ /* get the user's pc (plus 8) */ ++ long pc = (long)get_instruction_pointer(proc); ++ /* fetch the SWI instruction */ ++ int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0); ++ int num = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 8, 0); ++ ++ /* ++ On a mipsel, syscall looks like: ++ 24040fa1 li v0, 0x0fa1 # 4001 --> _exit syscall ++ 0000000c syscall ++ */ ++ if(insn!=0x0000000c){ ++ return 0; ++ } ++ ++ *sysnum = (num & 0xFFFF) - 4000; ++ /* if it is a syscall, return 1 or 2 */ ++ if (proc->callstack_depth > 0 && ++ proc->callstack[proc->callstack_depth - 1].is_syscall && ++ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { ++ return 2; ++ } ++ ++ if (*sysnum >= 0) { ++ return 1; ++ } ++ } + return 0; + } + /** +@@ -119,34 +120,34 @@ + */ + long + gimme_arg(enum tof type, Process *proc, int arg_num, arg_type_info *info) { +- long ret; +- debug(2,"type %d arg %d",type,arg_num); +- if (type == LT_TOF_FUNCTION || type == LT_TOF_SYSCALL){ +- if(arg_num <4){ +- ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0); +- debug(2,"ret = %#lx",ret); +- return ret; +- } else { +- // If we need this, I think we can look at [sp+16] for arg_num==4. +- CP; +- return 0; +- } +- } +- if(arg_num>=0){ +- fprintf(stderr,"args on return?"); +- } +- if(type == LT_TOF_FUNCTIONR) { +- return ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0); +- } +- if (type == LT_TOF_SYSCALLR) { +- unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0); +- unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0); +- if(!a3){ +- return v0; +- } +- return -1; +- } +- fprintf(stderr, "gimme_arg called with wrong arguments\n"); ++ long ret; ++ debug(2,"type %d arg %d",type,arg_num); ++ if (type == LT_TOF_FUNCTION || type == LT_TOF_SYSCALL){ ++ if(arg_num <4){ ++ ret=ptrace(PTRACE_PEEKUSER,proc->pid,off_a0+arg_num,0); ++ debug(2,"ret = %#lx",ret); ++ return ret; ++ } else { ++ // If we need this, I think we can look at [sp+16] for arg_num==4. ++ CP; ++ return 0; ++ } ++ } ++ if(arg_num>=0){ ++ fprintf(stderr,"args on return?"); ++ } ++ if(type == LT_TOF_FUNCTIONR) { ++ return ptrace(PTRACE_PEEKUSER,proc->pid,off_v0,0); ++ } ++ if (type == LT_TOF_SYSCALLR) { ++ unsigned a3=ptrace(PTRACE_PEEKUSER, proc->pid,off_a3,0); ++ unsigned v0=ptrace(PTRACE_PEEKUSER, proc->pid,off_v0,0); ++ if(!a3){ ++ return v0; ++ } ++ return -1; ++ } ++ fprintf(stderr, "gimme_arg called with wrong arguments\n"); + return 0; + } + +--- ltrace-0.5.2.orig/sysdeps/linux-gnu/x86_64/trace.c ++++ ltrace-0.5.2/sysdeps/linux-gnu/x86_64/trace.c +@@ -41,7 +41,8 @@ + *sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, 8 * ORIG_RAX, 0); + + if (proc->callstack_depth > 0 && +- proc->callstack[proc->callstack_depth - 1].is_syscall) { ++ proc->callstack[proc->callstack_depth - 1].is_syscall && ++ proc->callstack[proc->callstack_depth - 1].c_un.syscall == *sysnum) { + return 2; + } + diff -r 8ef937cc57ba -r 8a21b4be90cd scripts/addToolVersion.sh --- a/scripts/addToolVersion.sh Sun Aug 02 23:50:22 2009 +0200 +++ b/scripts/addToolVersion.sh Mon Aug 03 08:50:56 2009 +0200 @@ -96,7 +96,11 @@ ver_m=$(echo "${version}...." |cut -d . -f 2) if [ ${ver_M} -gt 4 \ -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 3 \) ]; then - SedExpr1=" select CC_GCC_4_3_or_later\n" + SedExpr1="${SedExpr1} select CC_GCC_4_3_or_later\n" + fi + if [ ${ver_M} -gt 4 \ + -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 4 \) ]; then + SedExpr1="${SedExpr1} select CC_GCC_4_4_or_later\n" fi fi SedExpr2=" default \"${version}\" if ${cat}_V_${v}" diff -r 8ef937cc57ba -r 8a21b4be90cd scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Sun Aug 02 23:50:22 2009 +0200 +++ b/scripts/crosstool-NG.sh.in Mon Aug 03 08:50:56 2009 +0200 @@ -412,7 +412,7 @@ else case "${tool}" in # We'll at least need some of them... - ar|as|gcc|ld|nm|objcopy|objdump|ranlib) + ar|as|gcc|g++|ld|nm|objcopy|objdump|ranlib) CT_Abort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!" ;; # Some are conditionnally required diff -r 8ef937cc57ba -r 8a21b4be90cd scripts/wrapper.in --- a/scripts/wrapper.in Sun Aug 02 23:50:22 2009 +0200 +++ b/scripts/wrapper.in Mon Aug 03 08:50:56 2009 +0200 @@ -1,7 +1,8 @@ #!/bin/sh -dirname="$(dirname "${0}")" -basename="$(basename "${0}")" +canonicalizedname=$(readlink -nm "${0}") +dirname="$(dirname "${canonicalizedname}")" +basename="$(basename "${canonicalizedname}")" ld_lib_path="$(dirname "${dirname}")/lib"