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

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