--- crossdev.sh.old 2004-06-02 07:48:40.000000000 -0500 +++ crossdev.sh 2004-06-02 11:05:47.000000000 -0500 @@ -423,6 +423,7 @@ echo -e " ${CYAN}ppc${XX}\t\t- PowerPC/Apple Macintosh Systems" echo -e " ${CYAN}ppc64${XX}\t\t- PowerPC Systems (64-bit)" echo -e " ${CYAN}ppc-eabi${XX}\t- PowerPC/Embedded Systems" + echo -e " ${CYAN}avr${XX}\t\t- Atmel AVR based Embedded Systems" echo -e "" echo -e "${WHITE}Options:${XX}" @@ -679,6 +679,14 @@ CROSS_CHOST="sparc64-unknown-linux-gnu" CROSS_KEYW="sparc" ;; + avr) + CROSS_CFLAGS="-mcpu=avr -mtune=avr" + CROSS_CHOST="avr" + USE_HEADERS="no" + CMDKERNEL="yes" + #// AVR is not supported by Linux at all, so use the x86 keyword + CROSS_KEYW="x86" + ;; *) showError "Invalid arch specified!" ;; Reproducible: Always Steps to Reproduce: I had to add the following to the patch so that crossdev.sh would build anything without the '-u' flag. GCC 3.3.3 is broken for the avr target on Gentoo. See bug 46401 ( http://bugs.gentoo.org/show_bug.cgi?id=46401 ) @@ -816,6 +824,9 @@ tmp_gentoo_keyw="~${tmp_gentoo_keyw} ${tmp_gentoo_keyw}" local GENTOO_KEYW_TMP="~${GENTOO_KEYW} ${GENTOO_KEYW}" local CROSS_KEYW_TMP="~${CROSS_KEYW} ${CROSS_KEYW}" + else + local GENTOO_KEYW_TMP="${GENTOO_KEYW}" + local CROSS_KEYW_TMP="${GENTOO_KEYW}" fi We still need an ebuild for avr-libc, but avr-gcc and avr-binutils can go away.
please :-)
grovell grovell :-). Please Joshua show us how good your stuff is.
Add to portage, please...
And what about adding support not only for avr, but for generic gcc target, which will compile only kernelgcc. I did this patch and compiled mips-dec-ultrix target as I was asked for :-) I will compile avr too, because I am using it. --- ./crossdev.sh.ps 2004-12-03 15:48:26.000000000 +0100 +++ ./crossdev.sh 2004-12-03 15:49:02.000000000 +0100 @@ -167,6 +167,9 @@ ParseCommandLine() { --arch=*) CMDARCH="$(echo ${CMDLINE} | cut -d\= -f2)" ;; + --ccflags=*) + CMDCCFLAGS="$(echo ${CMDLINE} | cut -d\= -f2)" + ;; --clean|-C) CMDCLEAN="yes" ;; @@ -423,6 +426,7 @@ displayHelp() { echo -e " ${CYAN}ppc${XX}\t\t- PowerPC/Apple Macintosh Systems" echo -e " ${CYAN}ppc64${XX}\t\t- PowerPC Systems (64-bit)" echo -e " ${CYAN}ppc-eabi${XX}\t- PowerPC/Embedded Systems" + echo -e " ${CYAN}other${XX}\t- full target spec, build only kernel compiler" echo -e "" echo -e "${WHITE}Options:${XX}" @@ -453,6 +457,10 @@ displayHelp() { echo -e " bugs." echo -e "" + echo -e " ${GREEN}--ccflags${XX}=${CYAN}'flag passed to cross compile r'${XX}" + echo -e " Add this options to cross compiler flags." + + echo -e "" echo -e " ${GREEN}--pretend${XX} (${GREEN}-p${XX} short option)" echo -e " Gather all information necessary to start buildi ng a cross-compile" echo -e " toolchain, but exit after displaying the informa tion." @@ -680,7 +688,15 @@ GetInfo() { CROSS_KEYW="sparc" ;; *) - showError "Invalid arch specified!" + #// asume arch is fully-specified target and build + #// only kernel compiler + CROSS_CHOST="${TARGETARCH}" + CROSS_CFLAGS="${CMDCCFLAGS}" + USE_HEADERS="no" + CMDKERNEL="yes" + CCONFIGURE="--with-gnu-as --with-gnu-ld --enable-obsolete" + #// use x86 sources + CROSS_KEYW="x86" ;; esac CROSS_CFLAGS="${CROSS_CFLAGS} -O2 -pipe" @@ -816,6 +832,9 @@ GetInfo() { tmp_gentoo_keyw="~${tmp_gentoo_keyw} ${tmp_gentoo_keyw}" local GENTOO_KEYW_TMP="~${GENTOO_KEYW} ${GENTOO_KEYW}" local CROSS_KEYW_TMP="~${CROSS_KEYW} ${CROSS_KEYW}" + else + local GENTOO_KEYW_TMP="${GENTOO_KEYW}" + local CROSS_KEYW_TMP="${CROSS_KEYW}" fi @@ -1333,6 +1352,7 @@ InstallGccBootstrap() { --enable-__cxa_atexit \ --with-headers=/usr/include \ --enable-static \ + ${CCONFIGURE} \ || showError "${func_name}: Failed to configure!" Pavel Semerad
<=crossdev-0.4 is no longer supported ... please upgrade to crossdev-0.9 and if you're still having problems, re-open the bug and re-assign to toolchain@gentoo.org