Assorted GNU updates.

svn path=/nixpkgs/branches/stdenv-updates/; revision=21047
This commit is contained in:
Ludovic Courtès
2010-04-13 08:37:54 +00:00
parent 19b9811012
commit 99d51d0e92
8 changed files with 21 additions and 138 deletions

View File

@@ -1,83 +0,0 @@
Fix a regression in GNU as:
http://sourceware.org/bugzilla/show_bug.cgi?id=10856 .
The bug appears to be responsible for invalid code generated for
Crypto++:
http://groups.google.com/group/cryptopp-users/browse_thread/thread/7ce734e479586640/29c6649b7c7adee2?#29c6649b7c7adee2 .
diff -u -r1.77.2.1 -r1.77.2.2
--- a/gas/expr.c 2009/09/11 15:28:43 1.77.2.1
+++ b/gas/expr.c 2009/10/28 08:23:48 1.77.2.2
@@ -1997,6 +1997,7 @@
/* Help out with CSE. */
valueT final_val = expressionP->X_add_number;
symbolS *add_symbol = expressionP->X_add_symbol;
+ symbolS *orig_add_symbol = add_symbol;
symbolS *op_symbol = expressionP->X_op_symbol;
operatorT op = expressionP->X_op;
valueT left, right;
@@ -2078,6 +2079,7 @@
left = right;
seg_left = seg_right;
add_symbol = op_symbol;
+ orig_add_symbol = expressionP->X_op_symbol;
op = O_symbol;
break;
}
@@ -2122,18 +2124,19 @@
{
if (op == O_bit_exclusive_or || op == O_bit_inclusive_or)
{
- if (seg_right != absolute_section || right != 0)
+ if (!(seg_right == absolute_section && right == 0))
{
seg_left = seg_right;
left = right;
add_symbol = op_symbol;
+ orig_add_symbol = expressionP->X_op_symbol;
}
op = O_symbol;
break;
}
else if (op == O_left_shift || op == O_right_shift)
{
- if (seg_left != absolute_section || left != 0)
+ if (!(seg_left == absolute_section && left == 0))
{
op = O_symbol;
break;
@@ -2149,6 +2152,7 @@
seg_left = seg_right;
left = right;
add_symbol = op_symbol;
+ orig_add_symbol = expressionP->X_op_symbol;
op = O_symbol;
break;
}
@@ -2158,11 +2162,11 @@
op = O_symbol;
break;
}
- else if (left != right
- || ((seg_left != reg_section || seg_right != reg_section)
- && (seg_left != undefined_section
- || seg_right != undefined_section
- || add_symbol != op_symbol)))
+ else if (!(left == right
+ && ((seg_left == reg_section && seg_right == reg_section)
+ || (seg_left == undefined_section
+ && seg_right == undefined_section
+ && add_symbol == op_symbol))))
return 0;
else if (op == O_bit_and || op == O_bit_inclusive_or)
{
@@ -2233,7 +2237,8 @@
op = O_constant;
else if (seg_left == reg_section && final_val == 0)
op = O_register;
- else if (add_symbol != expressionP->X_add_symbol)
+ else if (seg_left == undefined_section
+ && add_symbol != orig_add_symbol)
final_val += left;
expressionP->X_add_symbol = add_symbol;
}

View File

@@ -1,14 +1,14 @@
{stdenv, fetchurl, noSysDirs, cross ? null}:
let
basename = "binutils-2.20";
basename = "binutils-2.20.1";
in
stdenv.mkDerivation rec {
name = basename + stdenv.lib.optionalString (cross != null) "-${cross.config}";
src = fetchurl {
url = "mirror://gnu/binutils/${basename}.tar.bz2";
sha256 = "1c3m789p5rwmmnck5ms4zcnc40axss3gxzivz571al1vmbq0kpz1";
sha256 = "1y7nwsprhr4hvx9ps2l0l0ivb6k41rcrx1invmzqxs475mr892r2";
};
patches = [
@@ -16,8 +16,6 @@ stdenv.mkDerivation rec {
# RUNPATH instead of RPATH on binaries. This is important because
# RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
./new-dtags.patch
./as-pr10856.patch
];
inherit noSysDirs;