patches/gcc/4.3.0/250-pr35705.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jul 31 09:08:33 2008 +0000 (2008-07-31)
changeset 752 b037a5643e04
parent 746 b150d6f590fc
permissions -rw-r--r--
Have the glibc build use the cross-objdump, rather than the host one.
On some distros (eg. Fedora), the native objdump can not interpret objects not for the native system, and thus fail.
This commit adds a new patch against glibc-2.7 that introduces OBJDUMP_FOR_HOST, wich, if set, overides the detected objdump.

Note: bizarely enough, glibc already has code to detect the cross-objdump, but that does not work for an unknown reason... :-(

/trunk/patches/glibc/2.7/220-objdump_for_host.patch | 13 13 0 0 +++++++++
/trunk/scripts/build/libc_glibc.sh | 37 21 16 0 +++++++++++++++------------
2 files changed, 34 insertions(+), 16 deletions(-)
yann@552
     1
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/63_all_gcc43-pr35705.patch
yann@552
     2
http://gcc.gnu.org/PR35705
yann@552
     3
yann@552
     4
2008-04-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
yann@552
     5
yann@552
     6
	PR middle-end/35705
yann@552
     7
	* fold-const.c (get_pointer_modulus_and_residue): Return modulus 1 if
yann@552
     8
	the expression is a function address.
yann@552
     9
yann@552
    10
diff -durN gcc-4.3.0.orig/gcc/fold-const.c gcc-4.3.0/gcc/fold-const.c
yann@552
    11
--- gcc-4.3.0.orig/gcc/fold-const.c	2008-02-27 15:12:33.000000000 +0100
yann@552
    12
+++ gcc-4.3.0/gcc/fold-const.c	2008-06-10 14:45:09.000000000 +0200
yann@552
    13
@@ -9357,7 +9357,7 @@
yann@552
    14
 	    }
yann@552
    15
 	}
yann@552
    16
 
yann@552
    17
-      if (DECL_P (expr))
yann@552
    18
+      if (DECL_P (expr) && TREE_CODE (expr) != FUNCTION_DECL)
yann@552
    19
 	return DECL_ALIGN_UNIT (expr);
yann@552
    20
     }
yann@552
    21
   else if (code == POINTER_PLUS_EXPR)