patches/gdb/6.6/600-fix-compile-flag-mismatch.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Apr 26 21:31:05 2008 +0000 (2008-04-26)
changeset 454 372b2f397baa
permissions -rw-r--r--
Configure tsocks with a simple heuristic.

Consider the proxy has to be in a 'local' network. It means it is directly
reachable by the local machine, even if the local machine has to hop through
one or more gates to reach the proxy (often the case in enterprise networks
where class A 10.0.0.0/8 is in fact sub-divided into smaller networks, each
one of them in a different location, eg. 10.1.0.0/16 in a place, while
10.2.0.0/16 would be on the other side of the world). Not being in the same
subnet does not mean the proxy is not available.

So we will build a mask with at most high bits set, which defines a network
that has both the local machine and the proxy. Because a machine may have
more than one interface, build a mask for each of them, removing 127.0.0.1
which is added automagically by tsocks, and removing duplicate masks.

If all of this does not work, then it means the local machine can NOT in fact
reach the proxy, which in turn means the user mis-configured something (most
probably a typo...).

/trunk/scripts/crosstool.sh | 61 52 9 0 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 52 insertions(+), 9 deletions(-)
     1 diff -rduNp gdb-6.6-100/Makefile.in gdb-6.6/Makefile.in
     2 --- gdb-6.6-100/Makefile.in	2006-12-18 08:21:19.000000000 +0100
     3 +++ gdb-6.6/Makefile.in	2007-05-14 10:54:29.000000000 +0200
     4 @@ -331,7 +331,7 @@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_
     5  # CFLAGS will be just -g.  We want to ensure that TARGET libraries
     6  # (which we know are built with gcc) are built with optimizations so
     7  # prepend -O2 when setting CFLAGS_FOR_TARGET.
     8 -CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
     9 +CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
    10  SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
    11  CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
    12  LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
    13 diff -rduNp gdb-6.6-100/Makefile.tpl gdb-6.6/Makefile.tpl
    14 --- gdb-6.6-100/Makefile.tpl	2006-11-15 00:26:39.000000000 +0100
    15 +++ gdb-6.6/Makefile.tpl	2007-05-14 10:54:29.000000000 +0200
    16 @@ -334,7 +334,7 @@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_
    17  # CFLAGS will be just -g.  We want to ensure that TARGET libraries
    18  # (which we know are built with gcc) are built with optimizations so
    19  # prepend -O2 when setting CFLAGS_FOR_TARGET.
    20 -CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
    21 +CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
    22  SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
    23  CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
    24  LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
    25 diff -rduNp gdb-6.6-100/gdb/configure gdb-6.6/gdb/configure
    26 --- gdb-6.6-100/gdb/configure	2006-12-17 16:38:59.000000000 +0100
    27 +++ gdb-6.6/gdb/configure	2007-05-14 10:55:41.000000000 +0200
    28 @@ -272,7 +272,7 @@ PACKAGE_STRING=
    29  PACKAGE_BUGREPORT=
    30  
    31  ac_unique_file="main.c"
    32 -ac_subdirs_all="$ac_subdirs_all doc testsuite"
    33 +ac_subdirs_all="$ac_subdirs_all doc"
    34  # Factoring default headers for most tests.
    35  ac_includes_default="\
    36  #include <stdio.h>
    37 @@ -3055,7 +3055,7 @@ _ACEOF
    38  
    39  
    40  
    41 -subdirs="$subdirs doc testsuite"
    42 +subdirs="$subdirs doc"
    43  
    44  
    45  # Provide defaults for some variables set by the per-host and per-target
    46 diff -rduNp gdb-6.6-100/gdb/gdbserver/configure gdb-6.6/gdb/gdbserver/configure
    47 --- gdb-6.6-100/gdb/gdbserver/configure	2006-11-22 01:10:19.000000000 +0100
    48 +++ gdb-6.6/gdb/gdbserver/configure	2007-05-14 10:54:29.000000000 +0200
    49 @@ -1239,7 +1239,7 @@ echo "$as_me: error: \`$ac_var' was not 
    50        ac_cache_corrupted=: ;;
    51      ,);;
    52      *)
    53 -      if test "x$ac_old_val" != "x$ac_new_val"; then
    54 +      if test "`echo $ac_old_val`" != "`echo $ac_new_val`"; then
    55  	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
    56  echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
    57  	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
    58 diff -rduNp gdb-6.6-100/gdb/testsuite/configure gdb-6.6/gdb/testsuite/configure
    59 --- gdb-6.6-100/gdb/testsuite/configure	2006-06-21 15:57:21.000000000 +0200
    60 +++ gdb-6.6/gdb/testsuite/configure	2007-05-14 10:54:29.000000000 +0200
    61 @@ -1248,7 +1248,7 @@ echo "$as_me: error: \`$ac_var' was not 
    62        ac_cache_corrupted=: ;;
    63      ,);;
    64      *)
    65 -      if test "x$ac_old_val" != "x$ac_new_val"; then
    66 +      if test "`echo $ac_old_val" != "`echo $ac_new_val"; then
    67  	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
    68  echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
    69  	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5