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

(-)toolchain.eclass (-28 / +2 lines)
Lines 152-162 Link Here
152
		if tc_version_is_at_least 3 ; then
152
		if tc_version_is_at_least 3 ; then
153
			IUSE+=" bootstrap doc gcj gtk hardened libffi multilib objc"
153
			IUSE+=" bootstrap doc gcj gtk hardened libffi multilib objc"
154
154
155
			# gcc-{nios2,bfin} don't accept these
156
			if [[ ${PN} == "gcc" ]] ; then
157
				IUSE+=" n32 n64"
158
			fi
159
160
			tc_version_is_at_least "4.0" && IUSE+=" objc-gc mudflap"
155
			tc_version_is_at_least "4.0" && IUSE+=" objc-gc mudflap"
161
			tc_version_is_at_least "4.1" && IUSE+=" objc++"
156
			tc_version_is_at_least "4.1" && IUSE+=" objc++"
162
			tc_version_is_at_least "4.2" && IUSE+=" openmp"
157
			tc_version_is_at_least "4.2" && IUSE+=" openmp"
Lines 787-813 Link Here
787
	[[ -z ${ETYPE} ]] && die "Your ebuild needs to set the ETYPE variable"
782
	[[ -z ${ETYPE} ]] && die "Your ebuild needs to set the ETYPE variable"
788
783
789
	if [[ ${ETYPE} == "gcc-compiler" ]] ; then
784
	if [[ ${ETYPE} == "gcc-compiler" ]] ; then
790
		case $(tc-arch) in
791
		mips)
792
			# Must compile for mips64-linux target if we want n32/n64 support
793
			case "${CTARGET}" in
794
				mips64*) ;;
795
				*)
796
					if use n32 || use n64; then
797
						eerror "n32/n64 can only be used when target host is mips64*-*-linux-*";
798
						die "Invalid USE flags for CTARGET ($CTARGET)";
799
					fi
800
				;;
801
			esac
802
803
			#cannot have both n32 & n64 without multilib
804
			if use n32 && use n64 && ! is_multilib; then
805
				eerror "Please enable multilib if you want to use both n32 & n64";
806
				die "Invalid USE flag combination";
807
			fi
808
		;;
809
		esac
810
811
		# Setup variables which would normally be in the profile
785
		# Setup variables which would normally be in the profile
812
		if is_crosscompile ; then
786
		if is_crosscompile ; then
813
			multilib_env ${CTARGET}
787
			multilib_env ${CTARGET}
Lines 1234-1241 Link Here
1234
		# Add --with-abi flags to set default MIPS ABI
1208
		# Add --with-abi flags to set default MIPS ABI
1235
		mips)
1209
		mips)
1236
			local mips_abi=""
1210
			local mips_abi=""
1237
			use n64 && mips_abi="--with-abi=64"
1211
			[[ ${DEFAULT_ABI} == n64 ]] && mips_abi="--with-abi=64"
1238
			use n32 && mips_abi="--with-abi=n32"
1212
			[[ ${DEFAULT_ABI} == n32 ]] && mips_abi="--with-abi=n32"
1239
			[[ -n ${mips_abi} ]] && confgcc="${confgcc} ${mips_abi}"
1213
			[[ -n ${mips_abi} ]] && confgcc="${confgcc} ${mips_abi}"
1240
			;;
1214
			;;
1241
		# Default arch for x86 is normally i386, lets give it a bump
1215
		# Default arch for x86 is normally i386, lets give it a bump

Return to bug 370717