Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 533322
Collapse All | Expand All

(-)/usr/portage/eclass/toolchain.eclass (-42 / +55 lines)
Lines 1034-1085 Link Here
1034
	# users to control this feature in the event they need the support.
1034
	# users to control this feature in the event they need the support.
1035
	tc_version_is_at_least 4.3 && confgcc+=( $(use_enable fixed-point) )
1035
	tc_version_is_at_least 4.3 && confgcc+=( $(use_enable fixed-point) )
1036
1036
1037
	case $(tc-is-softfloat) in
1037
	# case $(tc-is-softfloat) in
1038
	yes)    confgcc+=( --with-float=soft ) ;;
1038
	# yes)    confgcc+=( --with-float=soft ) ;;
1039
	softfp) confgcc+=( --with-float=softfp ) ;;
1039
	# softfp) confgcc+=( --with-float=softfp ) ;;
1040
	*)
1040
	# *)
1041
		# If they've explicitly opt-ed in, do hardfloat,
1041
	# 	# If they've explicitly opt-ed in, do hardfloat,
1042
		# otherwise let the gcc default kick in.
1042
	# 	# otherwise let the gcc default kick in.
1043
		case ${CTARGET//_/-} in
1043
	# 	case ${CTARGET//_/-} in
1044
		*-hardfloat-*|*eabihf) confgcc+=( --with-float=hard ) ;;
1044
	# 	*-hardfloat-*|*eabihf) confgcc+=( --with-float=hard ) ;;
1045
		esac
1045
	# 	esac
1046
	esac
1046
	# esac
1047
1047
1048
	local with_abi_map=()
1048
	local with_abi_map=()
1049
	case $(tc-arch) in
1049
	case $(tc-arch) in
1050
	arm)	#264534 #414395
1050
	arm)	#264534 #414395
1051
		local a arm_arch=${CTARGET%%-*}
1051
		# local a arm_arch=${CTARGET%%-*}
1052
		# Remove trailing endian variations first: eb el be bl b l
1052
		# # Remove trailing endian variations first: eb el be bl b l
1053
		for a in e{b,l} {b,l}e b l ; do
1053
		# for a in e{b,l} {b,l}e b l ; do
1054
			if [[ ${arm_arch} == *${a} ]] ; then
1054
		# 	if [[ ${arm_arch} == *${a} ]] ; then
1055
				arm_arch=${arm_arch%${a}}
1055
		# 		arm_arch=${arm_arch%${a}}
1056
				break
1056
		# 		break
1057
			fi
1057
		# 	fi
1058
		done
1058
		# done
1059
		# Convert armv7{a,r,m} to armv7-{a,r,m}
1059
		# # Convert armv7{a,r,m} to armv7-{a,r,m}
1060
		[[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
1060
		# [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
1061
		# See if this is a valid --with-arch flag
1061
		# # See if this is a valid --with-arch flag
1062
		if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch};
1062
		# if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch};
1063
		    . "${srcdir}"/config.gcc) &>/dev/null
1063
		#     . "${srcdir}"/config.gcc) &>/dev/null
1064
		then
1064
		# then
1065
			confgcc+=( --with-arch=${arm_arch} )
1065
		# 	confgcc+=( --with-arch=${arm_arch} )
1066
		fi
1066
		# fi
1067
1067
1068
		# Make default mode thumb for microcontroller classes #418209
1068
		# # Make default mode thumb for microcontroller classes #418209
1069
		[[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb )
1069
		# [[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb )
1070
1070
1071
		# Enable hardvfp
1071
		# # Enable hardvfp
1072
		if [[ $(tc-is-softfloat) == "no" ]] && \
1072
		# if [[ $(tc-is-softfloat) == "no" ]] && \
1073
		   [[ ${CTARGET} == armv[67]* ]] && \
1073
		#    [[ ${CTARGET} == armv[67]* ]] && \
1074
		   tc_version_is_at_least 4.5
1074
		#    tc_version_is_at_least 4.5
1075
		then
1075
		# then
1076
			# Follow the new arm hardfp distro standard by default
1076
		# 	# Follow the new arm hardfp distro standard by default
1077
			confgcc+=( --with-float=hard )
1077
		# 	confgcc+=( --with-float=hard )
1078
			case ${CTARGET} in
1078
		# 	case ${CTARGET} in
1079
			armv6*) confgcc+=( --with-fpu=vfp ) ;;
1079
		# 	armv6*) confgcc+=( --with-fpu=vfp ) ;;
1080
			armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
1080
		# 	armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
1081
			esac
1081
		# 	esac
1082
		fi
1082
		# fi
1083
		;;
1083
		;;
1084
	mips)
1084
	mips)
1085
		# Add --with-abi flags to set default ABI
1085
		# Add --with-abi flags to set default ABI
Lines 1478-1483 Link Here
1478
			;;
1478
			;;
1479
		esac
1479
		esac
1480
	fi
1480
	fi
1481
1482
	### Hack for ARM embedded targets...
1483
	## ARM microcontrollers:
1484
	#   * ARMv6-M (Cortex-M0, Cortex-M0+, Cortex-M1)
1485
	#   * ARMv7-M (M3)
1486
	#   * ARMv7E-M (M4, M7)
1487
	## ARM real-time microcontrollers:
1488
	#	* ARMv7-R (Cortex-R4, Cortex-R5, Cortex-R7)
1489
	case ${CTARGET} in
1490
	arm-*-elf|arm-*-eabi)
1491
		tc_version_is_at_least 4.7 && confgcc+=( --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r )
1492
		;;
1493
	esac
1481
}
1494
}
1482
1495
1483
gcc-abi-map() {
1496
gcc-abi-map() {

Return to bug 533322