--- /usr/portage/eclass/toolchain.eclass 2014-11-15 11:01:10.000000000 +0200 +++ toolchain.eclass 2014-12-24 12:09:28.506062020 +0200 @@ -1034,52 +1034,52 @@ # users to control this feature in the event they need the support. tc_version_is_at_least 4.3 && confgcc+=( $(use_enable fixed-point) ) - case $(tc-is-softfloat) in - yes) confgcc+=( --with-float=soft ) ;; - softfp) confgcc+=( --with-float=softfp ) ;; - *) - # If they've explicitly opt-ed in, do hardfloat, - # otherwise let the gcc default kick in. - case ${CTARGET//_/-} in - *-hardfloat-*|*eabihf) confgcc+=( --with-float=hard ) ;; - esac - esac + # case $(tc-is-softfloat) in + # yes) confgcc+=( --with-float=soft ) ;; + # softfp) confgcc+=( --with-float=softfp ) ;; + # *) + # # If they've explicitly opt-ed in, do hardfloat, + # # otherwise let the gcc default kick in. + # case ${CTARGET//_/-} in + # *-hardfloat-*|*eabihf) confgcc+=( --with-float=hard ) ;; + # esac + # esac local with_abi_map=() case $(tc-arch) in arm) #264534 #414395 - local a arm_arch=${CTARGET%%-*} - # Remove trailing endian variations first: eb el be bl b l - for a in e{b,l} {b,l}e b l ; do - if [[ ${arm_arch} == *${a} ]] ; then - arm_arch=${arm_arch%${a}} - break - fi - done - # Convert armv7{a,r,m} to armv7-{a,r,m} - [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-} - # See if this is a valid --with-arch flag - if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch}; - . "${srcdir}"/config.gcc) &>/dev/null - then - confgcc+=( --with-arch=${arm_arch} ) - fi - - # Make default mode thumb for microcontroller classes #418209 - [[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb ) - - # Enable hardvfp - if [[ $(tc-is-softfloat) == "no" ]] && \ - [[ ${CTARGET} == armv[67]* ]] && \ - tc_version_is_at_least 4.5 - then - # Follow the new arm hardfp distro standard by default - confgcc+=( --with-float=hard ) - case ${CTARGET} in - armv6*) confgcc+=( --with-fpu=vfp ) ;; - armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;; - esac - fi + # local a arm_arch=${CTARGET%%-*} + # # Remove trailing endian variations first: eb el be bl b l + # for a in e{b,l} {b,l}e b l ; do + # if [[ ${arm_arch} == *${a} ]] ; then + # arm_arch=${arm_arch%${a}} + # break + # fi + # done + # # Convert armv7{a,r,m} to armv7-{a,r,m} + # [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-} + # # See if this is a valid --with-arch flag + # if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch}; + # . "${srcdir}"/config.gcc) &>/dev/null + # then + # confgcc+=( --with-arch=${arm_arch} ) + # fi + + # # Make default mode thumb for microcontroller classes #418209 + # [[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb ) + + # # Enable hardvfp + # if [[ $(tc-is-softfloat) == "no" ]] && \ + # [[ ${CTARGET} == armv[67]* ]] && \ + # tc_version_is_at_least 4.5 + # then + # # Follow the new arm hardfp distro standard by default + # confgcc+=( --with-float=hard ) + # case ${CTARGET} in + # armv6*) confgcc+=( --with-fpu=vfp ) ;; + # armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;; + # esac + # fi ;; mips) # Add --with-abi flags to set default ABI @@ -1478,6 +1478,19 @@ ;; esac fi + + ### Hack for ARM embedded targets... + ## ARM microcontrollers: + # * ARMv6-M (Cortex-M0, Cortex-M0+, Cortex-M1) + # * ARMv7-M (M3) + # * ARMv7E-M (M4, M7) + ## ARM real-time microcontrollers: + # * ARMv7-R (Cortex-R4, Cortex-R5, Cortex-R7) + case ${CTARGET} in + arm-*-elf|arm-*-eabi) + tc_version_is_at_least 4.7 && confgcc+=( --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r ) + ;; + esac } gcc-abi-map() {