aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2006-03-23 13:48:44 +0800
committerjoerg <joerg@FreeBSD.org>2006-03-23 13:48:44 +0800
commit7948b3f2018496d19e9ea3a30ccc37fe9e14b436 (patch)
tree1a4bd6328370f915685ea062e43a9c667c563b74 /devel
parent785ee92ebfa83543e22c5b8808fdd9ea78651965 (diff)
downloadfreebsd-ports-gnome-7948b3f2018496d19e9ea3a30ccc37fe9e14b436.tar.gz
freebsd-ports-gnome-7948b3f2018496d19e9ea3a30ccc37fe9e14b436.tar.zst
freebsd-ports-gnome-7948b3f2018496d19e9ea3a30ccc37fe9e14b436.zip
This brings GCC 4.1.0 for the AVR microcontroller target to the
ports collection.
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/avr-gcc-devel/Makefile67
-rw-r--r--devel/avr-gcc-devel/distinfo6
-rw-r--r--devel/avr-gcc-devel/files/patch-0b-constants144
-rw-r--r--devel/avr-gcc-devel/files/patch-libiberty-Makefile.in12
-rw-r--r--devel/avr-gcc-devel/files/patch-newdevices212
-rw-r--r--devel/avr-gcc-devel/pkg-descr21
-rw-r--r--devel/avr-gcc-devel/pkg-plist88
8 files changed, 551 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 35a29187dbb2..6b91d0366642 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -69,6 +69,7 @@
SUBDIR += avltree
SUBDIR += avr-binutils
SUBDIR += avr-gcc
+ SUBDIR += avr-gcc-devel
SUBDIR += avr-gdb
SUBDIR += avr-libc
SUBDIR += avra
diff --git a/devel/avr-gcc-devel/Makefile b/devel/avr-gcc-devel/Makefile
new file mode 100644
index 000000000000..4af33f41d868
--- /dev/null
+++ b/devel/avr-gcc-devel/Makefile
@@ -0,0 +1,67 @@
+# New ports collection makefile for: avr-gcc-devel
+# Date created: 22 Mar 2006
+# Whom: Joerg Wunsch <joerg@freebsd.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= gcc
+PORTVERSION= 4.1.0
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GCC}
+MASTER_SITES+= http://people.freebsd.org/~joerg/:local
+MASTER_SITE_SUBDIR= releases/${DISTNAME}
+PKGNAMEPREFIX= avr-
+DISTFILES= gcc-core-${PORTVERSION}${EXTRACT_SUFX} \
+ gcc-g++-${PORTVERSION}${EXTRACT_SUFX}
+EXTRACT_ONLY= gcc-core-${PORTVERSION}${EXTRACT_SUFX} \
+ gcc-g++-${PORTVERSION}${EXTRACT_SUFX}
+
+MAINTAINER= joerg@freebsd.org
+COMMENT= FSF GCC 3.x for Atmel AVR 8-bit RISC cross-development
+
+BUILD_DEPENDS= avr-as:${PORTSDIR}/devel/avr-binutils \
+ avr-ld:${PORTSDIR}/devel/avr-binutils
+RUN_DEPENDS= avr-as:${PORTSDIR}/devel/avr-binutils \
+ avr-ld:${PORTSDIR}/devel/avr-binutils
+
+# GCC 4.x doesn't want to be built in its own source directory.
+WRKSRC= ${WRKDIR}/gcc-${PORTVERSION}
+BUILD_WRKSRC= ${WRKDIR}/build
+CONFIGURE_WRKSRC= ${BUILD_WRKSRC}
+INSTALL_WRKSRC= ${BUILD_WRKSRC}
+CONFIGURE_SCRIPT= ../gcc-${PORTVERSION}/configure
+
+USE_PERL5_BUILD= yes
+USE_BZIP2= yes
+USE_GMAKE= yes
+USE_BISON= yes
+GNU_CONFIGURE= yes
+
+.include <bsd.port.pre.mk>
+
+.if (${ARCH} == "amd64")
+ARCH= x86_64
+.endif
+
+CONFLICTS= avr-gcc-3*
+
+CONFIGURE_ARGS= --target=avr --disable-libssp
+
+MAKE_FLAGS= LANGUAGES="c c++"
+# get rid of that silly -mcpu=pentiumpro FreeBSD 5+ is so fond of. :-(
+MAKE_ENV= MACHINE_ARCH=avr
+
+MAN1= avr-cpp.1 avr-gcc.1 avr-g++.1 avr-gcov.1
+MAN7= fsf-funding.7 gfdl.7 gpl.7
+INFO= cpp gcc gccint cppinternals gccinstall
+
+post-extract:
+ cd ${WRKDIR} && ${MKDIR} build
+
+.if ${PERL_LEVEL} < 500600
+BROKEN= system's Pod::Man too old to generate the documentation.
+IGNORE= you need a newer version of Perl to build the documentation
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/avr-gcc-devel/distinfo b/devel/avr-gcc-devel/distinfo
new file mode 100644
index 000000000000..a0576b82b6af
--- /dev/null
+++ b/devel/avr-gcc-devel/distinfo
@@ -0,0 +1,6 @@
+MD5 (gcc-core-4.1.0.tar.bz2) = 15efa164579c7cf4a48859ee87d2a1fa
+SHA256 (gcc-core-4.1.0.tar.bz2) = 14d3056034cc7e7f2627f9b911e57041d135fe75b54aa20f9ab40737d5f13f21
+SIZE (gcc-core-4.1.0.tar.bz2) = 16634582
+MD5 (gcc-g++-4.1.0.tar.bz2) = 8b7006a73d62b43f2add695fbbe0584c
+SHA256 (gcc-g++-4.1.0.tar.bz2) = 4fde8de2c03a6af0f712b3f58a96bb32cb6877bcdcfb630cd005b0878ff030d7
+SIZE (gcc-g++-4.1.0.tar.bz2) = 3808683
diff --git a/devel/avr-gcc-devel/files/patch-0b-constants b/devel/avr-gcc-devel/files/patch-0b-constants
new file mode 100644
index 000000000000..3f21cb6fdbaf
--- /dev/null
+++ b/devel/avr-gcc-devel/files/patch-0b-constants
@@ -0,0 +1,144 @@
+--- ./gcc/doc/extend.texi.orig Sat Aug 6 15:26:27 2005
++++ ./gcc/doc/extend.texi Mon Aug 22 00:14:05 2005
+@@ -79,6 +79,7 @@
+ * Pragmas:: Pragmas accepted by GCC.
+ * Unnamed Fields:: Unnamed struct/union fields within structs/unions.
+ * Thread-Local:: Per-thread variables.
++* Binary constants:: Binary constants using the @samp{0b} prefix.
+ @end menu
+
+ @node Statement Exprs
+@@ -9742,6 +9743,28 @@
+ Non-@code{static} members shall not be @code{__thread}.
+ @end quotation
+ @end itemize
++
++@node Binary constants
++@section Binary constants using the @samp{0b} prefix
++@cindex Binary constants using the @samp{0b} prefix
++
++Integer constants can be written as binary constants, consisting of a
++sequence of @samp{0} and @samp{1} digits, prefixed by @samp{0b} or
++@samp{0B}. This is particularly useful in environments that operate a
++lot on the bit-level (like microcontrollers).
++
++The following statements are identical:
++
++@smallexample
++i = 42;
++i = 0x2a;
++i = 052;
++i = 0b101010;
++@end smallexample
++
++The type of these constants follows the same rules as for octal or
++hexadecimal integer constants, so suffixes like @samp{L} or @samp{UL}
++can be applied.
+
+ @node C++ Extensions
+ @chapter Extensions to the C++ Language
+--- ./libcpp/include/cpplib.h.orig Wed Jun 29 04:34:39 2005
++++ ./libcpp/include/cpplib.h Mon Aug 22 00:14:05 2005
+@@ -729,6 +729,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
+--- ./libcpp/expr.c.orig Wed Jun 29 04:34:36 2005
++++ ./libcpp/expr.c Mon Aug 22 12:02:28 2005
+@@ -171,6 +171,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,10 +214,22 @@
+ radix = 10;
+
+ if (max_digit >= radix)
+- SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit);
++ {
++ if (radix == 2)
++ SYNTAX_ERROR2 ("invalid digit \"%c\" in binary constant", '0' + max_digit);
++ else
++ SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit);
++ }
+
+ if (float_flag != NOT_FLOAT)
+ {
++ if (radix == 2)
++ {
++ cpp_error (pfile, CPP_DL_ERROR,
++ "invalid prefix \"0b\" for floating constant");
++ return CPP_N_INVALID;
++ }
++
+ if (radix == 16 && CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, c99))
+ cpp_error (pfile, CPP_DL_PEDWARN,
+ "use of C99 hexadecimal floating constant");
+@@ -288,11 +305,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;
+
+@@ -343,6 +365,11 @@
+ base = 16;
+ p += 2;
+ }
++ else if ((type & CPP_N_RADIX) == CPP_N_BINARY)
++ {
++ base = 2;
++ p += 2;
++ }
+
+ /* We can add a digit to numbers strictly less than this without
+ needing the precision and slowness of double integers. */
+@@ -398,12 +425,25 @@
+ append_digit (cpp_num num, int digit, int base, size_t precision)
+ {
+ cpp_num result;
+- unsigned int shift = 3 + (base == 16);
++ unsigned int shift;
+ bool overflow;
+ cpp_num_part add_high, add_low;
+
+- /* Multiply by 8 or 16. Catching this overflow here means we don't
++ /* Multiply by 2, 8 or 16. Catching this overflow here means we don't
+ need to worry about add_high overflowing. */
++ switch (base)
++ {
++ case 2:
++ shift = 1;
++ break;
++
++ case 16:
++ shift = 4;
++ break;
++
++ default:
++ shift = 3;
++ }
+ overflow = !!(num.high >> (PART_PRECISION - shift));
+ result.high = num.high << shift;
+ result.low = num.low << shift;
diff --git a/devel/avr-gcc-devel/files/patch-libiberty-Makefile.in b/devel/avr-gcc-devel/files/patch-libiberty-Makefile.in
new file mode 100644
index 000000000000..0e0b3ce31173
--- /dev/null
+++ b/devel/avr-gcc-devel/files/patch-libiberty-Makefile.in
@@ -0,0 +1,12 @@
+--- libiberty/Makefile.in.orig Mon Sep 26 22:55:10 2005
++++ libiberty/Makefile.in Wed Mar 22 22:13:44 2006
+@@ -275,7 +275,8 @@
+ @MAINT@ echo stamp > stamp-functions
+
+ INSTALL_DEST = @INSTALL_DEST@
+-install: install_to_$(INSTALL_DEST) install-subdir
++#install: install_to_$(INSTALL_DEST) install-subdir
++install:
+
+ install_to_libdir: all
+ ${mkinstalldirs} $(DESTDIR)$(libdir)$(MULTISUBDIR)
diff --git a/devel/avr-gcc-devel/files/patch-newdevices b/devel/avr-gcc-devel/files/patch-newdevices
new file mode 100644
index 000000000000..b03b8d1e603b
--- /dev/null
+++ b/devel/avr-gcc-devel/files/patch-newdevices
@@ -0,0 +1,212 @@
+diff -ur ../gcc-4.1.0.orig/gcc/config/avr/avr.c ./gcc/config/avr/avr.c
+--- ../gcc-4.1.0.orig/gcc/config/avr/avr.c Thu Jul 28 00:29:46 2005
++++ ./gcc/config/avr/avr.c Wed Mar 22 15:37:50 2006
+@@ -170,9 +170,18 @@
+ { "at90c8534", 2, "__AVR_AT90C8534__" },
+ { "at90s8535", 2, "__AVR_AT90S8535__" },
+ { "at86rf401", 2, "__AVR_AT86RF401__" },
++ { "attiny261", 2, "__AVR_ATtiny261__" },
++ { "attiny461", 2, "__AVR_ATtiny461__" },
++ { "attiny861", 2, "__AVR_ATtiny861__" },
+ /* Classic + MOVW, <= 8K. */
+ { "attiny13", 2, "__AVR_ATtiny13__" },
+ { "attiny2313", 2, "__AVR_ATtiny2313__" },
++ { "attiny24", 2, "__AVR_ATtiny24__" },
++ { "attiny44", 2, "__AVR_ATtiny44__" },
++ { "attiny84", 2, "__AVR_ATtiny84__" },
++ { "attiny25", 2, "__AVR_ATtiny25__" },
++ { "attiny45", 2, "__AVR_ATtiny45__" },
++ { "attiny85", 2, "__AVR_ATtiny85__" },
+ /* Classic, > 8K. */
+ { "avr3", 3, NULL },
+ { "atmega103", 3, "__AVR_ATmega103__" },
+@@ -187,24 +196,42 @@
+ { "atmega88", 4, "__AVR_ATmega88__" },
+ { "atmega8515", 4, "__AVR_ATmega8515__" },
+ { "atmega8535", 4, "__AVR_ATmega8535__" },
++ { "at90pwm2", 4, "__AVR_AT90PWM2__" },
++ { "at90pwm3", 4, "__AVR_AT90PWM3__" },
+ /* Enhanced, > 8K. */
+ { "avr5", 5, NULL },
+ { "atmega16", 5, "__AVR_ATmega16__" },
+ { "atmega161", 5, "__AVR_ATmega161__" },
+ { "atmega162", 5, "__AVR_ATmega162__" },
+ { "atmega163", 5, "__AVR_ATmega163__" },
++ { "atmega164", 5, "__AVR_ATmega164__" },
+ { "atmega165", 5, "__AVR_ATmega165__" },
+ { "atmega168", 5, "__AVR_ATmega168__" },
+ { "atmega169", 5, "__AVR_ATmega169__" },
+ { "atmega32", 5, "__AVR_ATmega32__" },
+ { "atmega323", 5, "__AVR_ATmega323__" },
++ { "atmega324", 5, "__AVR_ATmega324__" },
+ { "atmega325", 5, "__AVR_ATmega325__" },
+ { "atmega3250", 5, "__AVR_ATmega3250__" },
++ { "atmega329", 5, "__AVR_ATmega329__" },
++ { "atmega3290", 5, "__AVR_ATmega3290__" },
+ { "atmega64", 5, "__AVR_ATmega64__" },
++ { "atmega640", 5, "__AVR_ATmega640__" },
++ { "atmega644", 5, "__AVR_ATmega644__" },
+ { "atmega645", 5, "__AVR_ATmega645__" },
+ { "atmega6450", 5, "__AVR_ATmega6450__" },
++ { "atmega649", 5, "__AVR_ATmega649__" },
++ { "atmega6490", 5, "__AVR_ATmega6490__" },
+ { "atmega128", 5, "__AVR_ATmega128__" },
++ { "atmega1280",5, "__AVR_ATmega1280__" },
++ { "atmega1281",5, "__AVR_ATmega1281__" },
++ { "at90can32", 5, "__AVR_AT90CAN32__" },
++ { "at90can64", 5, "__AVR_AT90CAN64__" },
+ { "at90can128", 5, "__AVR_AT90CAN128__" },
++ { "at90usb646", 5, "__AVR_AT90USB646__" },
++ { "at90usb647", 5, "__AVR_AT90USB647__" },
++ { "at90usb1286", 5, "__AVR_AT90USB1286__" },
++ { "at90usb1287", 5, "__AVR_AT90USB1287__" },
+ { "at94k", 5, "__AVR_AT94K__" },
+ /* Assembler only. */
+ { "avr1", 1, NULL },
+diff -ur ../gcc-4.1.0.orig/gcc/config/avr/avr.h ./gcc/config/avr/avr.h
+--- ../gcc-4.1.0.orig/gcc/config/avr/avr.h Sat Jun 25 03:22:41 2005
++++ ./gcc/config/avr/avr.h Wed Mar 22 15:50:25 2006
+@@ -759,11 +759,12 @@
+
+ #define LINK_SPEC " %{!mmcu*:-m avr2}\
+ %{mmcu=at90s1200|mmcu=attiny11|mmcu=attiny12|mmcu=attiny15|mmcu=attiny28:-m avr1} \
+-%{mmcu=attiny22|mmcu=attiny26|mmcu=at90s2*|mmcu=at90s4*|mmcu=at90s8*|mmcu=at90c8*|mmcu=at86rf401|mmcu=attiny13|mmcu=attiny2313:-m avr2}\
++%{mmcu=attiny22|mmcu=attiny26|mmcu=at90s2*|mmcu=at90s4*|mmcu=at90s8*|mmcu=at90c8*|mmcu=at86rf401|mmcu=attiny13|mmcu=attiny2313|mmcu=attiny24|mmcu=attiny44|mmcu=attiny84|mmcu=attiny25|mmcu=attiny45|mmcu=attiny85|mmcu=attiny261|mmcu=attiny461|mmcu=attiny861:-m avr2}\
+ %{mmcu=atmega103|mmcu=atmega603|mmcu=at43*|mmcu=at76*:-m avr3}\
+-%{mmcu=atmega8*|mmcu=atmega48:-m avr4}\
+-%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64*|mmcu=atmega128|mmcu=at90can128|mmcu=at94k:-m avr5}\
+-%{mmcu=atmega325|mmcu=atmega3250|mmcu=atmega48|mmcu=atmega88|mmcu=atmega64|mmcu=atmega645|mmcu=atmega6450|mmcu=atmega128|mmcu=at90can128|mmcu=at90can128|mmcu=atmega162|mmcu=atmega165|mmcu=atmega168|mmcu=atmega169: -Tdata 0x800100} "
++%{mmcu=atmega8*|mmcu=atmega48|mmcu=at90pwm*:-m avr4}\
++%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega406|mmcu=atmega64*|mmcu=atmega128|mmcu=at90can*|mmcu=at90usb*|mmcu=at94k:-m avr5}\
++%{mmcu=atmega324|mmcu=atmega325|mmcu=atmega3250|mmcu=atmega329|mmcu=atmega3290|mmcu=atmega406|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*|mmcu=at90usb*: -Tdata 0x800100}\
++%{mmcu=atmega640|mmcu=atmega1280|mmcu=atmega1281: -Tdata 0x800200} "
+
+ #define LIB_SPEC \
+ "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}"
+@@ -799,6 +800,15 @@
+ %{mmcu=at86rf401:crt86401.o%s} \
+ %{mmcu=attiny13:crttn13.o%s} \
+ %{mmcu=attiny2313:crttn2313.o%s} \
++%{mmcu=attiny24:crttn24.o%s} \
++%{mmcu=attiny44:crttn44.o%s} \
++%{mmcu=attiny84:crttn84.o%s} \
++%{mmcu=attiny25:crttn25.o%s} \
++%{mmcu=attiny45:crttn45.o%s} \
++%{mmcu=attiny85:crttn85.o%s} \
++%{mmcu=attiny261:crttn261.o%s} \
++%{mmcu=attiny461:crttn461.o%s} \
++%{mmcu=attiny861:crttn861.o%s} \
+ %{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \
+ %{mmcu=atmega603:crtm603.o%s} \
+ %{mmcu=at43usb320:crt43320.o%s} \
+@@ -809,22 +819,41 @@
+ %{mmcu=atmega88:crtm88.o%s} \
+ %{mmcu=atmega8515:crtm8515.o%s} \
+ %{mmcu=atmega8535:crtm8535.o%s} \
++%{mmcu=at90pwm2:crt90pwm2.o%s} \
++%{mmcu=at90pwm3:crt90pwm3.o%s} \
+ %{mmcu=atmega16:crtm16.o%s} \
+ %{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \
+ %{mmcu=atmega162:crtm162.o%s} \
+ %{mmcu=atmega163:crtm163.o%s} \
++%{mmcu=atmega164:crtm164.o%s} \
+ %{mmcu=atmega165:crtm165.o%s} \
+ %{mmcu=atmega168:crtm168.o%s} \
+ %{mmcu=atmega169:crtm169.o%s} \
+ %{mmcu=atmega32:crtm32.o%s} \
+ %{mmcu=atmega323:crtm323.o%s} \
++%{mmcu=atmega324:crtm324.o%s} \
+ %{mmcu=atmega325:crtm325.o%s} \
+ %{mmcu=atmega3250:crtm3250.o%s} \
++%{mmcu=atmega329:crtm329.o%s} \
++%{mmcu=atmega3290:crtm3290.o%s} \
++%{mmcu=atmega406:crtm406.o%s} \
+ %{mmcu=atmega64:crtm64.o%s} \
+-%{mmcu=atmega645:crtm6450.o%s} \
++%{mmcu=atmega640:crtm640.o%s} \
++%{mmcu=atmega644:crtm644.o%s} \
++%{mmcu=atmega645:crtm645.o%s} \
+ %{mmcu=atmega6450:crtm6450.o%s} \
++%{mmcu=atmega649:crtm649.o%s} \
++%{mmcu=atmega6490:crtm6490.o%s} \
+ %{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=at90usb646:crtusb646.o%s} \
++%{mmcu=at90usb647:crtusb647.o%s} \
++%{mmcu=at90usb1286:crtusb1286.o%s} \
++%{mmcu=at90usb1287:crtusb1287.o%s} \
+ %{mmcu=at94k:crtat94k.o%s}"
+
+ #define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},
+diff -ur ../gcc-4.1.0.orig/gcc/config/avr/t-avr ./gcc/config/avr/t-avr
+--- ../gcc-4.1.0.orig/gcc/config/avr/t-avr Wed Apr 6 07:34:30 2005
++++ ./gcc/config/avr/t-avr Wed Mar 22 15:55:57 2006
+@@ -42,21 +42,52 @@
+
+ # The many avr2 matches are not listed here - this is the default.
+ MULTILIB_MATCHES = \
+- mmcu?avr3=mmcu?atmega103 mmcu?avr3=mmcu?atmega603 \
+- mmcu?avr3=mmcu?at43usb320 mmcu?avr3=mmcu?at43usb355 \
++ mmcu?avr3=mmcu?atmega103 \
++ mmcu?avr3=mmcu?atmega603 \
++ mmcu?avr3=mmcu?at43usb320 \
++ mmcu?avr3=mmcu?at43usb355 \
+ mmcu?avr3=mmcu?at76c711 \
+- mmcu?avr4=mmcu?atmega8515 mmcu?avr4=mmcu?atmega8535 \
+- mmcu?avr4=mmcu?atmega8 mmcu?avr4=mmcu?atmega48 \
++ mmcu?avr4=mmcu?atmega48 \
++ mmcu?avr4=mmcu?atmega8 \
++ mmcu?avr4=mmcu?atmega8515 \
++ mmcu?avr4=mmcu?atmega8535 \
+ mmcu?avr4=mmcu?atmega88 \
+- mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega162 \
+- mmcu?avr5=mmcu?atmega163 mmcu?avr5=mmcu?atmega169 \
+- mmcu?avr5=mmcu?atmega16 mmcu?avr5=mmcu?atmega168 \
++ mmcu?avr4=mmcu?at90pwm2 \
++ mmcu?avr4=mmcu?at90pwm3 \
++ mmcu?avr5=mmcu?atmega16 \
++ mmcu?avr5=mmcu?atmega161 \
++ mmcu?avr5=mmcu?atmega162 \
++ mmcu?avr5=mmcu?atmega163 \
++ mmcu?avr5=mmcu?atmega164 \
+ mmcu?avr5=mmcu?atmega165 \
+- mmcu?avr5=mmcu?atmega323 mmcu?avr5=mmcu?atmega32 \
+- mmcu?avr5=mmcu?atmega325 mmcu?avr5=mmcu?atmega3250 \
+- mmcu?avr5=mmcu?atmega64 mmcu?avr5=mmcu?atmega128 \
+- mmcu?avr5=mmcu?atmega645 mmcu?avr5=mmcu?atmega6450 \
+- mmcu?avr5=mmcu?at94k mmcu?avr5=mmcu?at90can128
++ mmcu?avr5=mmcu?atmega168 \
++ mmcu?avr5=mmcu?atmega169 \
++ mmcu?avr5=mmcu?atmega32 \
++ mmcu?avr5=mmcu?atmega323 \
++ mmcu?avr5=mmcu?atmega324 \
++ mmcu?avr5=mmcu?atmega325 \
++ mmcu?avr5=mmcu?atmega3250 \
++ mmcu?avr5=mmcu?atmega329 \
++ mmcu?avr5=mmcu?atmega3290 \
++ mmcu?avr5=mmcu?atmega406 \
++ mmcu?avr5=mmcu?atmega64 \
++ mmcu?avr5=mmcu?atmega640 \
++ mmcu?avr5=mmcu?atmega644 \
++ mmcu?avr5=mmcu?atmega645 \
++ mmcu?avr5=mmcu?atmega6450 \
++ mmcu?avr5=mmcu?atmega649 \
++ mmcu?avr5=mmcu?atmega6490 \
++ mmcu?avr5=mmcu?atmega128 \
++ mmcu?avr5=mmcu?atmega1280 \
++ mmcu?avr5=mmcu?atmega1281 \
++ mmcu?avr5=mmcu?at90can32 \
++ mmcu?avr5=mmcu?at90can64 \
++ mmcu?avr5=mmcu?at90can128 \
++ mmcu?avr5=mmcu?at90usb646 \
++ mmcu?avr5=mmcu?at90usb647 \
++ mmcu?avr5=mmcu?at90usb1286 \
++ mmcu?avr5=mmcu?at90usb1287 \
++ mmcu?avr5=mmcu?at94k
+
+ MULTILIB_EXCEPTIONS =
+
diff --git a/devel/avr-gcc-devel/pkg-descr b/devel/avr-gcc-devel/pkg-descr
new file mode 100644
index 000000000000..aad7578613c6
--- /dev/null
+++ b/devel/avr-gcc-devel/pkg-descr
@@ -0,0 +1,21 @@
+FSF gcc-4.x for Atmel AVR cross-development
+
+Included is the basic C++ compiler, although this is only of limited
+use without a libstdc++, and it is little tested.
+
+Supported debugging formats: -gstabs (DWARF-2 not yet working)
+Locally hack added: recognizes 0bXXX binary constants
+
+Locally added support for the following AVR devices:
+
+ ATtiny24/ATtiny44/ATtiny84
+ ATtiny25/ATtiny45/ATtiny85 ATtiny261/ATtiny461/ATtiny861
+ ATmega164/ATmega324/ATmega644
+ ATmega329/ATmega3290/ATmega649/ATmega6490
+ ATmega406
+ ATmega640/ATmega1280/ATmega1281
+ AT90PWM2/AT90PWM3 AT90CAN32/64
+ AT90USB646/647/1286/1287
+
+WWW: http://gcc.gnu.org/
+WWW: http://www.nongnu.org/avr-libc/
diff --git a/devel/avr-gcc-devel/pkg-plist b/devel/avr-gcc-devel/pkg-plist
new file mode 100644
index 000000000000..abf6c2717cad
--- /dev/null
+++ b/devel/avr-gcc-devel/pkg-plist
@@ -0,0 +1,88 @@
+avr/bin/c++
+avr/bin/g++
+avr/bin/gcc
+bin/avr-c++
+bin/avr-cpp
+bin/avr-g++
+bin/avr-gcc
+bin/avr-gcc-4.1.0
+bin/avr-gccbug
+lib/gcc/avr/4.1.0/avr3/libgcc.a
+lib/gcc/avr/4.1.0/avr3/libgcov.a
+lib/gcc/avr/4.1.0/avr4/libgcc.a
+lib/gcc/avr/4.1.0/avr4/libgcov.a
+lib/gcc/avr/4.1.0/avr5/libgcc.a
+lib/gcc/avr/4.1.0/avr5/libgcov.a
+lib/gcc/avr/4.1.0/include/README
+lib/gcc/avr/4.1.0/include/fixed
+lib/gcc/avr/4.1.0/include/float.h
+lib/gcc/avr/4.1.0/include/iso646.h
+lib/gcc/avr/4.1.0/include/limits.h
+lib/gcc/avr/4.1.0/include/stdarg.h
+lib/gcc/avr/4.1.0/include/stdbool.h
+lib/gcc/avr/4.1.0/include/stddef.h
+lib/gcc/avr/4.1.0/include/syslimits.h
+lib/gcc/avr/4.1.0/include/unwind.h
+lib/gcc/avr/4.1.0/include/varargs.h
+lib/gcc/avr/4.1.0/install-tools/gsyslimits.h
+lib/gcc/avr/4.1.0/install-tools/include/README
+lib/gcc/avr/4.1.0/install-tools/include/float.h
+lib/gcc/avr/4.1.0/install-tools/include/iso646.h
+lib/gcc/avr/4.1.0/install-tools/include/limits.h
+lib/gcc/avr/4.1.0/install-tools/include/stdarg.h
+lib/gcc/avr/4.1.0/install-tools/include/stdbool.h
+lib/gcc/avr/4.1.0/install-tools/include/stddef.h
+lib/gcc/avr/4.1.0/install-tools/include/unwind.h
+lib/gcc/avr/4.1.0/install-tools/include/varargs.h
+lib/gcc/avr/4.1.0/install-tools/macro_list
+lib/gcc/avr/4.1.0/install-tools/mkheaders.conf
+lib/gcc/avr/4.1.0/libgcc.a
+lib/gcc/avr/4.1.0/libgcov.a
+libexec/gcc/avr/4.1.0/cc1
+libexec/gcc/avr/4.1.0/cc1plus
+libexec/gcc/avr/4.1.0/collect2
+libexec/gcc/avr/4.1.0/install-tools/fix-header
+libexec/gcc/avr/4.1.0/install-tools/fixinc.sh
+libexec/gcc/avr/4.1.0/install-tools/fixincl
+libexec/gcc/avr/4.1.0/install-tools/fixproto
+libexec/gcc/avr/4.1.0/install-tools/mkheaders
+share/locale/be/LC_MESSAGES/cpplib.mo
+share/locale/be/LC_MESSAGES/gcc.mo
+share/locale/ca/LC_MESSAGES/cpplib.mo
+share/locale/ca/LC_MESSAGES/gcc.mo
+share/locale/da/LC_MESSAGES/cpplib.mo
+share/locale/da/LC_MESSAGES/gcc.mo
+share/locale/de/LC_MESSAGES/cpplib.mo
+share/locale/de/LC_MESSAGES/gcc.mo
+share/locale/el/LC_MESSAGES/cpplib.mo
+share/locale/el/LC_MESSAGES/gcc.mo
+share/locale/es/LC_MESSAGES/cpplib.mo
+share/locale/es/LC_MESSAGES/gcc.mo
+share/locale/fr/LC_MESSAGES/cpplib.mo
+share/locale/fr/LC_MESSAGES/gcc.mo
+share/locale/ja/LC_MESSAGES/cpplib.mo
+share/locale/ja/LC_MESSAGES/gcc.mo
+share/locale/nl/LC_MESSAGES/cpplib.mo
+share/locale/nl/LC_MESSAGES/gcc.mo
+share/locale/rw/LC_MESSAGES/cpplib.mo
+share/locale/rw/LC_MESSAGES/gcc.mo
+share/locale/sv/LC_MESSAGES/cpplib.mo
+share/locale/sv/LC_MESSAGES/gcc.mo
+share/locale/tr/LC_MESSAGES/cpplib.mo
+share/locale/tr/LC_MESSAGES/gcc.mo
+share/locale/vi/LC_MESSAGES/cpplib.mo
+share/locale/zh_CN/LC_MESSAGES/cpplib.mo
+share/locale/zh_CN/LC_MESSAGES/gcc.mo
+@dirrm lib/gcc/avr/4.1.0/avr3
+@dirrm lib/gcc/avr/4.1.0/avr4
+@dirrm lib/gcc/avr/4.1.0/avr5
+@dirrm lib/gcc/avr/4.1.0/include
+@dirrm lib/gcc/avr/4.1.0/install-tools/include
+@dirrm lib/gcc/avr/4.1.0/install-tools
+@dirrm lib/gcc/avr/4.1.0
+@dirrm lib/gcc/avr
+@dirrm lib/gcc
+@dirrm libexec/gcc/avr/4.1.0/install-tools
+@dirrm libexec/gcc/avr/4.1.0
+@dirrm libexec/gcc/avr
+@dirrm libexec/gcc