aboutsummaryrefslogtreecommitdiff
path: root/devel/avr-gcc
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2005-11-04 20:51:33 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2005-11-04 20:51:33 +0000
commit55cd38c9e0e530bfd897ff3161372ed49b417894 (patch)
treed52a98b3a0c8311495fcfb484fd633bc55daed46 /devel/avr-gcc
parent939f2992bddcbc7c4b64f2248fedf55f166a2fd3 (diff)
downloadports-55cd38c9e0e530bfd897ff3161372ed49b417894.tar.gz
ports-55cd38c9e0e530bfd897ff3161372ed49b417894.zip
Notes
Diffstat (limited to 'devel/avr-gcc')
-rw-r--r--devel/avr-gcc/Makefile2
-rw-r--r--devel/avr-gcc/files/patch-misspelled-signames46
-rw-r--r--devel/avr-gcc/files/patch-newdevices38
-rw-r--r--devel/avr-gcc/pkg-descr2
4 files changed, 70 insertions, 18 deletions
diff --git a/devel/avr-gcc/Makefile b/devel/avr-gcc/Makefile
index 8d890d71abfc..8974c68607d9 100644
--- a/devel/avr-gcc/Makefile
+++ b/devel/avr-gcc/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gcc
PORTVERSION= 3.4.4
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GCC}
MASTER_SITES+= http://people.freebsd.org/~joerg/:local
diff --git a/devel/avr-gcc/files/patch-misspelled-signames b/devel/avr-gcc/files/patch-misspelled-signames
new file mode 100644
index 000000000000..cc4df593fea6
--- /dev/null
+++ b/devel/avr-gcc/files/patch-misspelled-signames
@@ -0,0 +1,46 @@
+2004-05-12 Theodore A. Roth <troth@openavr.org>
+
+ * gcc/config/avr/avr.c (avr_handle_fndecl_attribute): Generate a
+ warning if the function name does not begin with "__vector" and the
+ function has either the 'signal' or 'interrupt' attribute.
+
+Index: gcc/config/avr/avr.c
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/avr/avr.c,v
+retrieving revision 1.118
+diff -u -p -p -r1.118 avr.c
+--- gcc/config/avr/avr.c 13 Mar 2004 06:43:30 -0000 1.118
++++ gcc/config/avr/avr.c 12 May 2004 19:40:28 -0000
+@@ -4566,6 +4559,32 @@ avr_handle_fndecl_attribute (tree *node,
+ warning ("`%s' attribute only applies to functions",
+ IDENTIFIER_POINTER (name));
+ *no_add_attrs = true;
++ }
++ else
++ {
++ const char *func_name = IDENTIFIER_POINTER (DECL_NAME (*node));
++ const char *attr = IDENTIFIER_POINTER (name);
++
++ /* If the function has the 'signal' or 'interrupt' attribute, test to
++ make sure that the name of the function is "__vector_NN" so as to
++ catch when the user misspells the interrupt vector name. */
++
++ if (strncmp (attr, "interrupt", strlen ("interrupt")) == 0)
++ {
++ if (strncmp (func_name, "__vector", strlen ("__vector")) != 0)
++ {
++ warning ("`%s' appears to be a misspelled interrupt handler",
++ func_name);
++ }
++ }
++ else if (strncmp (attr, "signal", strlen ("signal")) == 0)
++ {
++ if (strncmp (func_name, "__vector", strlen ("__vector")) != 0)
++ {
++ warning ("`%s' appears to be a misspelled signal handler",
++ func_name);
++ }
++ }
+ }
+
+ return NULL_TREE;
diff --git a/devel/avr-gcc/files/patch-newdevices b/devel/avr-gcc/files/patch-newdevices
index 32388d8b8d85..1455a3a4319b 100644
--- a/devel/avr-gcc/files/patch-newdevices
+++ b/devel/avr-gcc/files/patch-newdevices
@@ -1,6 +1,6 @@
-diff -ur ../gcc-3.4.4.orig/gcc/config/avr/avr.c ./gcc/config/avr/avr.c
---- ../gcc-3.4.4.orig/gcc/config/avr/avr.c Sun Mar 20 22:14:28 2005
-+++ ./gcc/config/avr/avr.c Mon Sep 12 22:54:25 2005
+diff -ur ../gcc-3.4.4-orig/gcc/config/avr/avr.c ./gcc/config/avr/avr.c
+--- ../gcc-3.4.4-orig/gcc/config/avr/avr.c Sun Mar 20 22:14:28 2005
++++ ./gcc/config/avr/avr.c Fri Nov 4 21:20:12 2005
@@ -175,6 +175,12 @@
{ "at90c8534", 2, "__AVR_AT90C8534__" },
{ "at90s8535", 2, "__AVR_AT90S8535__" },
@@ -14,7 +14,7 @@ diff -ur ../gcc-3.4.4.orig/gcc/config/avr/avr.c ./gcc/config/avr/avr.c
/* Classic, > 8K. */
{ "avr3", 3, NULL },
{ "atmega103", 3, "__AVR_ATmega103__" },
-@@ -185,19 +191,40 @@
+@@ -185,19 +191,42 @@
/* Enhanced, <= 8K. */
{ "avr4", 4, NULL },
{ "atmega8", 4, "__AVR_ATmega8__" },
@@ -51,13 +51,15 @@ diff -ur ../gcc-3.4.4.orig/gcc/config/avr/avr.c ./gcc/config/avr/avr.c
{ "atmega128", 5, "__AVR_ATmega128__" },
+ { "atmega1280",5, "__AVR_ATmega1280__" },
+ { "atmega1281",5, "__AVR_ATmega1281__" },
++ { "at90can32", 5, "__AVR_AT90CAN32__" },
++ { "at90can64", 5, "__AVR_AT90CAN64__" },
+ { "at90can128", 5, "__AVR_AT90CAN128__" },
{ "at94k", 5, "__AVR_AT94K__" },
/* Assembler only. */
{ "avr1", 1, NULL },
-diff -ur ../gcc-3.4.4.orig/gcc/config/avr/avr.h ./gcc/config/avr/avr.h
---- ../gcc-3.4.4.orig/gcc/config/avr/avr.h Tue Mar 9 03:59:55 2004
-+++ ./gcc/config/avr/avr.h Mon Sep 12 22:59:20 2005
+diff -ur ../gcc-3.4.4-orig/gcc/config/avr/avr.h ./gcc/config/avr/avr.h
+--- ../gcc-3.4.4-orig/gcc/config/avr/avr.h Tue Mar 9 03:59:55 2004
++++ ./gcc/config/avr/avr.h Fri Nov 4 21:21:30 2005
@@ -2351,12 +2351,13 @@
Do not define this macro if it does not need to do anything. */
@@ -71,8 +73,8 @@ diff -ur ../gcc-3.4.4.orig/gcc/config/avr/avr.h ./gcc/config/avr/avr.h
-%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64|mmcu=atmega128|mmcu=at94k:-m avr5}\
-%{mmcu=atmega64|mmcu=atmega128|mmcu=atmega162|mmcu=atmega169: -Tdata 0x800100} "
+%{mmcu=atmega8*|mmcu=atmega48|mmcu=at90pwm*:-m avr4}\
-+%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64*|mmcu=atmega128*|mmcu=at90can128|mmcu=at94k:-m avr5}\
-+%{mmcu=atmega324|mmcu=atmega325|mmcu=atmega3250|mmcu=atmega329|mmcu=atmega3290|mmcu=atmega48|mmcu=atmega88|mmcu=atmega64|mmcu=atmega644|mmcu=atmega645|mmcu=atmega6450|mmcu=atmega649|mmcu=atmega6490|mmcu=atmega128|mmcu=at90can128|mmcu=atmega162|mmcu=atmega164|mmcu=atmega165|mmcu=atmega168|mmcu=atmega169|mmcu=at90pwm*: -Tdata 0x800100}\
++%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64*|mmcu=atmega128*|mmcu=at90can*|mmcu=at94k:-m avr5}\
++%{mmcu=atmega324|mmcu=atmega325|mmcu=atmega3250|mmcu=atmega329|mmcu=atmega3290|mmcu=atmega48|mmcu=atmega88|mmcu=atmega64|mmcu=atmega644|mmcu=atmega645|mmcu=atmega6450|mmcu=atmega649|mmcu=atmega6490|mmcu=atmega128|mmcu=at90can*|mmcu=atmega162|mmcu=atmega164|mmcu=atmega165|mmcu=atmega168|mmcu=atmega169|mmcu=at90pwm*: -Tdata 0x800100}\
+%{mmcu=atmega640|mmcu=atmega1280|mmcu=atmega1281: -Tdata 0x800200} "
/* A C string constant that tells the GCC driver program options to
@@ -95,7 +97,7 @@ diff -ur ../gcc-3.4.4.orig/gcc/config/avr/avr.h ./gcc/config/avr/avr.h
/* Another C string constant that tells the GCC driver program how
and when to place a reference to `libgcc.a' into the linker
command line. This constant is placed both before and after the
-@@ -2421,23 +2422,49 @@
+@@ -2421,23 +2422,51 @@
%{mmcu=at90c8534:crtc8534.o%s} \
%{mmcu=at90s8535:crts8535.o%s} \
%{mmcu=at86rf401:crt86401.o%s} \
@@ -141,14 +143,16 @@ diff -ur ../gcc-3.4.4.orig/gcc/config/avr/avr.h ./gcc/config/avr/avr.h
%{mmcu=atmega128:crtm128.o%s} \
+%{mmcu=atmega1280:crtm1280.o%s} \
+%{mmcu=atmega1281:crtm1281.o%s} \
++%{mmcu=at90can32:crtcan32.o%s} \
++%{mmcu=at90can64:crtcan64.o%s} \
+%{mmcu=at90can128:crtcan128.o%s} \
%{mmcu=at94k:crtat94k.o%s}"
#define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},
-diff -ur ../gcc-3.4.4.orig/gcc/config/avr/t-avr ./gcc/config/avr/t-avr
---- ../gcc-3.4.4.orig/gcc/config/avr/t-avr Mon Apr 25 06:17:34 2005
-+++ ./gcc/config/avr/t-avr Mon Sep 12 23:00:12 2005
-@@ -46,13 +46,25 @@
+diff -ur ../gcc-3.4.4-orig/gcc/config/avr/t-avr ./gcc/config/avr/t-avr
+--- ../gcc-3.4.4-orig/gcc/config/avr/t-avr Mon Apr 25 06:17:34 2005
++++ ./gcc/config/avr/t-avr Fri Nov 4 21:22:34 2005
+@@ -46,12 +46,27 @@
mmcu?avr3=mmcu?at43usb320 mmcu?avr3=mmcu?at43usb355 \
mmcu?avr3=mmcu?at76c711 \
mmcu?avr4=mmcu?atmega8515 mmcu?avr4=mmcu?atmega8535 \
@@ -164,7 +168,6 @@ diff -ur ../gcc-3.4.4.orig/gcc/config/avr/t-avr ./gcc/config/avr/t-avr
mmcu?avr5=mmcu?atmega16 \
- mmcu?avr5=mmcu?atmega323 mmcu?avr5=mmcu?atmega32 \
- mmcu?avr5=mmcu?atmega64 mmcu?avr5=mmcu?atmega128 \
-- mmcu?avr5=mmcu?at94k
+ mmcu?avr5=mmcu?atmega323 mmcu?avr5=mmcu?atmega324 \
+ mmcu?avr5=mmcu?atmega325 mmcu?avr5=mmcu?atmega3250 \
+ mmcu?avr5=mmcu?atmega329 mmcu?avr5=mmcu?atmega3290 \
@@ -175,7 +178,10 @@ diff -ur ../gcc-3.4.4.orig/gcc/config/avr/t-avr ./gcc/config/avr/t-avr
+ mmcu?avr5=mmcu?atmega6490 mmcu?avr5=mmcu?atmega64 \
+ mmcu?avr5=mmcu?atmega128 \
+ mmcu?avr5=mmcu?atmega1280 mmcu?avr5=mmcu?atmega1281 \
-+ mmcu?avr5=mmcu?at94k mmcu?avr5=mmcu?at90can128
++ mmcu?avr5=mmcu?at90can32 \
++ mmcu?avr5=mmcu?at90can64 \
++ mmcu?avr5=mmcu?at90can128 \
+ mmcu?avr5=mmcu?at94k
MULTILIB_EXCEPTIONS =
diff --git a/devel/avr-gcc/pkg-descr b/devel/avr-gcc/pkg-descr
index e9c7a58fd051..8a01f937fc2b 100644
--- a/devel/avr-gcc/pkg-descr
+++ b/devel/avr-gcc/pkg-descr
@@ -17,7 +17,7 @@ Locally added support for the following AVR devices:
ATmega325/ATmega3250/ATmega645/ATmega6450
ATmega329/ATmega3290/ATmega649/ATmega6490
ATmega640/ATmega1280/ATmega1281
- AT90CAN128
+ AT90CAN32/64/128
WWW: http://gcc.gnu.org/
WWW: http://www.nongnu.org/avr-libc/