patches/gdb/6.6/600-fix-compile-flag-mismatch.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Feb 17 22:08:06 2008 +0000 (2008-02-17)
changeset 431 8bde4c6ea47a
permissions -rw-r--r--
Robert P. J. DAY says:

apparently, the patchset for gcc 4.2.1 applies properly to the
source for gcc 4.2.2 and gcc 4.2.3. so, if you want, you can simply
add support for those last two just by augmenting menuconfig and
adding a couple symlinks for those two directories. seems like a
cheap way to add a couple new versions.
     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