aboutsummaryrefslogtreecommitdiff
path: root/devel/avr-gcc/files
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2004-07-07 11:29:23 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2004-07-07 11:29:23 +0000
commitd04fd3fae81cc1089dec902376b9209c116ba9a5 (patch)
tree54c2cccaa108f4430b406cf93c0b2643e97be8b5 /devel/avr-gcc/files
parent4c7b9623b7a3984ea2336e8f674a2f168bae5703 (diff)
Notes
Diffstat (limited to 'devel/avr-gcc/files')
-rw-r--r--devel/avr-gcc/files/patch-binary-constants83
-rw-r--r--devel/avr-gcc/files/patch-dwarfdebug8
2 files changed, 91 insertions, 0 deletions
diff --git a/devel/avr-gcc/files/patch-binary-constants b/devel/avr-gcc/files/patch-binary-constants
new file mode 100644
index 000000000000..1d56ff951bde
--- /dev/null
+++ b/devel/avr-gcc/files/patch-binary-constants
@@ -0,0 +1,83 @@
+--- gcc/cpplib.h.orig Mon Feb 9 13:23:51 2004
++++ gcc/cpplib.h Thu Apr 29 12:24:10 2004
+@@ -630,6 +630,7 @@
+ #define CPP_N_DECIMAL 0x0100
+ #define CPP_N_HEX 0x0200
+ #define CPP_N_OCTAL 0x0400
++#define CPP_N_BINARY 0x0800
+
+ #define CPP_N_UNSIGNED 0x1000 /* Properties. */
+ #define CPP_N_IMAGINARY 0x2000
+--- gcc/cppexp.c.orig Thu Feb 12 00:52:56 2004
++++ gcc/cppexp.c Thu Apr 29 12:29:40 2004
+@@ -22,6 +22,9 @@
+ #include "system.h"
+ #include "cpplib.h"
+ #include "cpphash.h"
++#include "flags.h"
++#include "coretypes.h"
++#include "toplev.h"
+
+ #define PART_PRECISION (sizeof (cpp_num_part) * CHAR_BIT)
+ #define HALF_MASK (~(cpp_num_part) 0 >> (PART_PRECISION / 2))
+@@ -75,6 +78,9 @@
+ #define SYNTAX_ERROR2(msgid, arg) \
+ do { cpp_error (pfile, CPP_DL_ERROR, msgid, arg); goto syntax_error; } \
+ while(0)
++#define SYNTAX_ERROR3(msgid, arg1, arg2) \
++ do { cpp_error (pfile, CPP_DL_ERROR, msgid, arg1, arg2); goto syntax_error; } \
++ while(0)
+
+ /* Subroutine of cpp_classify_number. S points to a float suffix of
+ length LEN, possibly zero. Returns 0 for an invalid suffix, or a
+@@ -171,6 +177,11 @@
+ radix = 16;
+ str++;
+ }
++ else if ((*str == 'b' || *str == 'B') && (str[1] == '0' || str[1] == '1'))
++ {
++ radix = 2;
++ str++;
++ }
+ }
+
+ /* Now scan for a well-formed integer or float. */
+@@ -209,7 +220,8 @@
+ radix = 10;
+
+ if (max_digit >= radix)
+- SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit);
++ SYNTAX_ERROR3 ("invalid digit \"%c\" in %s constant", '0' + max_digit,
++ radix == 2? "binary": "octal");
+
+ if (float_flag != NOT_FLOAT)
+ {
+@@ -288,11 +300,16 @@
+ if ((result & CPP_N_IMAGINARY) && CPP_PEDANTIC (pfile))
+ cpp_error (pfile, CPP_DL_PEDWARN,
+ "imaginary constants are a GCC extension");
++ if (radix == 2 && CPP_PEDANTIC (pfile))
++ cpp_error (pfile, CPP_DL_PEDWARN,
++ "binary constants are a GCC extension");
+
+ if (radix == 10)
+ result |= CPP_N_DECIMAL;
+ else if (radix == 16)
+ result |= CPP_N_HEX;
++ else if (radix == 2)
++ result |= CPP_N_BINARY;
+ else
+ result |= CPP_N_OCTAL;
+
+@@ -341,6 +358,11 @@
+ else if ((type & CPP_N_RADIX) == CPP_N_HEX)
+ {
+ base = 16;
++ p += 2;
++ }
++ else if ((type & CPP_N_RADIX) == CPP_N_BINARY)
++ {
++ base = 2;
+ p += 2;
+ }
+
diff --git a/devel/avr-gcc/files/patch-dwarfdebug b/devel/avr-gcc/files/patch-dwarfdebug
new file mode 100644
index 000000000000..4663f984f160
--- /dev/null
+++ b/devel/avr-gcc/files/patch-dwarfdebug
@@ -0,0 +1,8 @@
+--- gcc/config/avr/avr.h.orig Tue Mar 9 03:59:55 2004
++++ gcc/config/avr/avr.h Sun Jul 4 21:46:12 2004
+@@ -2479,4 +2479,5 @@
+ /* zero register r1 */
+ #define ZERO_REGNO 1
+
++#define DWARF2_DEBUGGING_INFO 1
+ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG