summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-04-30 10:43:41 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-04-30 10:43:41 (GMT)
commit86c54d80791ab37b88bf3813794fb1fa04e1b251 (patch)
treeeb96aea88b692fd64fde5f5575faa484716294fe /patches
parentdacd159a98e28c1e5e1111c24cf400fee20f3e14 (diff)
Merge the fortran stuff to trunk now it works!
Fortran is not supported for all targets, though. ARM at least does not work. /trunk/scripts/build/binutils.sh | 8 8 0 0 ++++++++ /trunk/scripts/build/cc_gcc.sh | 11 6 5 0 ++++++----- /trunk/scripts/crosstool.sh | 10 9 1 0 +++++++++- /trunk/tools/addToolVersion.sh | 3 3 0 0 +++ /trunk/steps.mk | 2 2 0 0 ++ /trunk/config/cc/gcc.in | 16 16 0 0 ++++++++++++++++ 6 files changed, 44 insertions(+), 6 deletions(-)
Diffstat (limited to 'patches')
-rw-r--r--patches/gmp/4.2.2/100-mpf_set_str.c.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/patches/gmp/4.2.2/100-mpf_set_str.c.patch b/patches/gmp/4.2.2/100-mpf_set_str.c.patch
new file mode 100644
index 0000000..6d9ac04
--- /dev/null
+++ b/patches/gmp/4.2.2/100-mpf_set_str.c.patch
@@ -0,0 +1,38 @@
+Original patch from http://gmplib.org/patches/mpf_set_str.c.diff
+Re-diffed to match crosstool-NG conventions.
+
+diff -dur gmp-4.2.2.orig/mpf/set_str.c gmp-4.2.2/mpf/set_str.c
+--- gmp-4.2.2.orig/mpf/set_str.c 2007-08-30 20:31:40.000000000 +0200
++++ gmp-4.2.2/mpf/set_str.c 2008-01-28 23:05:29.000000000 +0100
+@@ -271,8 +271,29 @@
+ }
+
+ if (expptr != 0)
+- /* FIXME: Should do some error checking here. */
+- exp_in_base = strtol (expptr, (char **) 0, exp_base);
++ {
++ /* Scan and convert the exponent, in base exp_base. */
++ long dig, neg = -(long) ('-' == expptr[0]);
++ expptr -= neg; /* conditional increment */
++ c = (unsigned char) *expptr++;
++ dig = digit_value[c];
++ if (dig >= exp_base)
++ {
++ TMP_FREE;
++ return -1;
++ }
++ exp_in_base = dig;
++ c = (unsigned char) *expptr++;
++ dig = digit_value[c];
++ while (dig < exp_base)
++ {
++ exp_in_base = exp_in_base * exp_base;
++ exp_in_base += dig;
++ c = (unsigned char) *expptr++;
++ dig = digit_value[c];
++ }
++ exp_in_base = (exp_in_base ^ neg) - neg; /* conditional negation */
++ }
+ else
+ exp_in_base = 0;
+ if (dotpos != 0)