aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/avr-libc/avr-libc_1.8.1.bb31
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-target-avr_2.24.bb37
-rw-r--r--meta/recipes-devtools/binutils/binutils-target-avr_2.24.bb57
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-target-avr_4.8.bb41
-rw-r--r--meta/recipes-devtools/gcc/gcc-target-avr_4.8.bb50
5 files changed, 216 insertions, 0 deletions
diff --git a/meta/recipes-devtools/avr-libc/avr-libc_1.8.1.bb b/meta/recipes-devtools/avr-libc/avr-libc_1.8.1.bb
new file mode 100644
index 00000000000..81481ba6655
--- /dev/null
+++ b/meta/recipes-devtools/avr-libc/avr-libc_1.8.1.bb
@@ -0,0 +1,31 @@
+SRC_URI = "http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.8.1.tar.bz2"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8d91a8f153d3de715f67a5df0d841c43"
+
+SRC_URI[md5sum] = "0caccead59eaaa61ac3f060ca3a803ef"
+SRC_URI[sha256sum] = "c3062a481b6b2c6959dc708571c00b0e26301897ba21171ed92acd0af7c4a969"
+
+inherit autotools
+
+TOOLCHAIN_OPTIONS = ""
+
+TARGET_CFLAGS = ""
+TARGET_LDFLAGS = ""
+
+export CC = "avr-gcc"
+export AS = "avr-as"
+export RANLIB = "avr-ranlib"
+export AR = "avr-ar"
+
+FILES_${PN} += "${exec_prefix}/avr"
+INSANE_SKIP_${PN} = "arch staticdev"
+
+python () {
+ def replace(var, x, y):
+ d.setVar(var, d.getVar(var, True).replace(d.expand(x),y))
+
+ replace('CONFIGUREOPTS', '--host=${HOST_SYS}','--host=avr')
+ replace('CONFIGUREOPTS', '--target=${TARGET_SYS}','--target=avr')
+}
+
+
diff --git a/meta/recipes-devtools/binutils/binutils-cross-target-avr_2.24.bb b/meta/recipes-devtools/binutils/binutils-cross-target-avr_2.24.bb
new file mode 100644
index 00000000000..e19cf540096
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-target-avr_2.24.bb
@@ -0,0 +1,37 @@
+require binutils.inc
+require binutils-${PV}.inc
+require binutils-cross.inc
+
+DEPENDS += "flex bison zlib"
+PROVIDES = "virtual/binutils-target-avr"
+
+BPN = "binutils"
+
+
+
+python () {
+ def replace(var, x, y):
+ d.setVar(var, d.getVar(var, True).replace(d.expand(x),y))
+
+ replace('CONFIGUREOPTS', '--target=${TARGET_SYS}','--target=avr')
+ replace('EXTRA_OECONF', '--program-prefix=${TARGET_PREFIX}' ,'--program-prefix=avr-')
+ replace('do_install', '${TARGET_PREFIX}' ,'avr-')
+ replace('do_install', '${TARGET_SYS}' ,'avr')
+}
+
+EXTRA_OECONF += "--with-sysroot=/ \
+ --enable-install-libbfd \
+ --enable-install-libiberty \
+ --enable-shared \
+ "
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+sysroot_stage_all() {
+ sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR}
+ sysroot_stage_dir ${D}${STAGING_DIR_NATIVE}${prefix_native}/avr ${SYSROOT_DESTDIR}${STAGING_DIR_NATIVE}${prefix_native}/avr
+ sysroot_stage_dir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${BUILD_SYS} ${SYSROOT_DESTDIR}${STAGING_DIR_NATIVE}${prefix_native}/${BUILD_SYS}
+}
+
diff --git a/meta/recipes-devtools/binutils/binutils-target-avr_2.24.bb b/meta/recipes-devtools/binutils/binutils-target-avr_2.24.bb
new file mode 100644
index 00000000000..66a899c78ea
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-target-avr_2.24.bb
@@ -0,0 +1,57 @@
+require binutils.inc
+require binutils-${PV}.inc
+
+DEPENDS += "flex bison zlib"
+
+BPN = "binutils"
+
+FILES_${PN}-dev += " \
+ ${exec_prefix}/${HOST_SYS}/avr/lib/lib*.la \
+ ${exec_prefix}/${HOST_SYS}/avr/lib/libopcodes.so \
+ ${exec_prefix}/${HOST_SYS}/avr/lib/libbfd.so \
+ ${exec_prefix}/${HOST_SYS}/avr/include \
+"
+FILES_${PN}-staticdev += " \
+ ${exec_prefix}/${HOST_SYS}/avr/lib/lib*.a \
+"
+
+USE_ALTERNATIVES_FOR = ""
+
+python () {
+ def replace(var, x, y):
+ d.setVar(var, d.getVar(var, True).replace(d.expand(x),y))
+
+ replace('CONFIGUREOPTS', '--target=${TARGET_SYS}','--target=avr')
+ replace('EXTRA_OECONF', '--program-prefix=${TARGET_PREFIX}' ,'--program-prefix=avr-')
+ replace('do_install', '${TARGET_PREFIX}' ,'avr-')
+ replace('do_install', '${TARGET_SYS}' ,'avr')
+ replace(d.expand('FILES_${PN}'), '${TARGET_PREFIX}' ,'avr-')
+ replace(d.expand('FILES_${PN}'), '${TARGET_SYS}' ,'avr')
+ d.appendVar(d.expand('FILES_${PN}'), " ${exec_prefix}/${HOST_SYS}/avr/lib/*-*.so ${libdir}/ldscripts")
+ d.appendVar(d.expand('FILES_${PN}-dbg'), " ${exec_prefix}/${HOST_SYS}/avr/lib/.debug")
+}
+
+EXTRA_OECONF += "--with-sysroot=/ \
+ --enable-install-libbfd \
+ --enable-install-libiberty \
+ --enable-shared \
+ "
+
+#do_install_append() {
+# # Remove symlinks created by do_install
+# for p in ${TARGET_PREFIX}* ; do
+# rm `echo $p | sed -e s,${TARGET_PREFIX},,`
+# done
+#}
+
+do_install () {
+ autotools_do_install
+
+ # Fix the /usr/${TARGET_SYS}/bin/* links
+ for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
+ rm -f $l
+ ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
+ | tr -s / \
+ | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
+ done
+} \ No newline at end of file
diff --git a/meta/recipes-devtools/gcc/gcc-cross-target-avr_4.8.bb b/meta/recipes-devtools/gcc/gcc-cross-target-avr_4.8.bb
new file mode 100644
index 00000000000..aa5c469df10
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-cross-target-avr_4.8.bb
@@ -0,0 +1,41 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-cross.inc
+
+BPN = "gcc"
+PROVIDES = "virtual/gcc-target-avr"
+
+ARCH_FLAGS_FOR_TARGET = ""
+TARGET_CFLAGS = ""
+
+EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
+ --with-gnu-ld \
+ --enable-languages=c \
+ ${GCCMULTILIB} \
+ --disable-libssp \
+ --program-prefix=avr- \
+ --without-local-prefix \
+ ${OPTSPACE} \
+ --enable-lto \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --with-system-zlib \
+ --enable-linker-build-id \
+ --with-ppl=no \
+ --with-cloog=no \
+ --enable-checking=release \
+ ${EXTRA_OECONF_PATHS}"
+
+python () {
+ def replace(var, x, y):
+ #bb.warn(x)
+ #bb.warn(d.expand(x))
+ #bb.warn(d.getVar(var))
+ #bb.warn(d.getVar(var, True).replace(d.expand(x),y))
+ d.setVar(var, d.getVar(var, True).replace(d.expand(x),y))
+
+ replace('CONFIGUREOPTS', '--target=${TARGET_SYS}','--target=avr')
+ #replace('do_configure', '${HOST_PREFIX}' ,'avr-')
+ replace('do_install', '${TARGET_PREFIX}' ,'avr-')
+ replace('do_install', '${TARGET_SYS}' ,'avr')
+}
+
diff --git a/meta/recipes-devtools/gcc/gcc-target-avr_4.8.bb b/meta/recipes-devtools/gcc/gcc-target-avr_4.8.bb
new file mode 100644
index 00000000000..b2be069a889
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-target-avr_4.8.bb
@@ -0,0 +1,50 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-target.inc
+
+BPN = "gcc"
+
+ARCH_FLAGS_FOR_TARGET = ""
+
+EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
+ --with-gnu-ld \
+ --enable-languages=c \
+ ${GCCMULTILIB} \
+ --disable-libssp \
+ --program-prefix=avr- \
+ --without-local-prefix \
+ ${OPTSPACE} \
+ --enable-lto \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --with-system-zlib \
+ --with-ppl=no \
+ --with-cloog=no \
+ --enable-checking=release \
+ ${EXTRA_OECONF_PATHS}"
+
+
+python () {
+ def replace(var, x, y, d):
+ d.setVar(var, d.getVar(var, True).replace(d.expand(x),y))
+
+ ld = bb.data.createCopy(d)
+ ld.setVar("TARGET_CFLAGS", "")
+ ld.setVar("HOST_CC_ARCH", "")
+ ld.setVar("TOOLCHAIN_OPTIONS", "")
+
+ replace('CONFIGUREOPTS', '--target=${TARGET_SYS}','--target=avr', d)
+ replace('EXTRA_OECONF', '--program-prefix=${TARGET_PREFIX}' ,'--program-prefix=avr-', d)
+ replace('do_configure', '${HOST_PREFIX}' ,'avr-', ld)
+ d.setVar('do_configure', ld.getVar('do_configure'))
+ replace('do_install', '${TARGET_PREFIX}' ,'avr-', d)
+ replace('do_install', '${TARGET_SYS}' ,'avr', d)
+ replace(d.expand('FILES_${PN}'), '${TARGET_PREFIX}' ,'avr-', d)
+ replace(d.expand('FILES_cpp'), '${TARGET_PREFIX}' ,'avr-', d)
+ replace(d.expand('FILES_gcov'), '${TARGET_PREFIX}' ,'avr-', d)
+ replace(d.expand('FILES_${PN}'), '${TARGET_SYS}' ,'avr', d)
+ replace(d.expand('FILES_${PN}-plugin-dev'), '${TARGET_SYS}' ,'avr', d)
+ replace(d.expand('FILES_${PN}-dbg'), '${TARGET_SYS}' ,'avr', d)
+ replace(d.expand('FILES_${PN}-dev'), '${TARGET_SYS}' ,'avr', d)
+ #d.appendVar(d.expand('FILES_${PN}'), " ${exec_prefix}/${HOST_SYS}/avr/lib/*-*.so")
+ #d.appendVar(d.expand('FILES_${PN}-dbg'), " ${exec_prefix}/${HOST_SYS}/avr/lib/.debug")
+}