Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 474358 | Differences between
and this patch

Collapse All | Expand All

(-)toolchain.eclass (-28 / +22 lines)
Lines 23-29 Link Here
23
	inherit git-2
23
	inherit git-2
24
fi
24
fi
25
25
26
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_postinst pkg_postrm
26
EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
27
DESCRIPTION="The GNU Compiler Collection"
27
DESCRIPTION="The GNU Compiler Collection"
28
28
29
FEATURES=${FEATURES/multilib-strict/}
29
FEATURES=${FEATURES/multilib-strict/}
Lines 108-121 Link Here
108
108
109
	if tc_version_is_at_least 3 ; then
109
	if tc_version_is_at_least 3 ; then
110
		IUSE+=" doc gcj gtk hardened multilib objc"
110
		IUSE+=" doc gcj gtk hardened multilib objc"
111
		REQUIRED_USE+=" gcj? ( cxx )"
111
112
112
		tc_version_is_at_least "4.0" && IUSE+=" objc-gc mudflap"
113
		tc_version_is_at_least "4.0" && IUSE+=" objc-gc mudflap"
113
		tc_version_is_at_least "4.1" && IUSE+=" libssp objc++"
114
		tc_version_is_at_least "4.1" && IUSE+=" libssp objc++" && REQUIRED_USE+=" objc++? ( cxx )"
114
		tc_version_is_at_least "4.2" && IUSE+=" openmp"
115
		tc_version_is_at_least "4.2" && IUSE+=" openmp"
115
		tc_version_is_at_least "4.3" && IUSE+=" fixed-point"
116
		tc_version_is_at_least "4.3" && IUSE+=" fixed-point"
116
		tc_version_is_at_least "4.6" && IUSE+=" graphite"
117
		tc_version_is_at_least "4.6" && IUSE+=" graphite"
117
		tc_version_is_at_least "4.6" && IUSE+=" lto"
118
		tc_version_is_at_least "4.6" && IUSE+=" lto"
118
		tc_version_is_at_least "4.7" && IUSE+=" go"
119
		tc_version_is_at_least "4.7" && IUSE+=" go" && REQUIRED_USE+=" go? ( cxx )"
119
	fi
120
	fi
120
fi
121
fi
121
122
Lines 559-565 Link Here
559
#----<< specs + env.d logic >>----
560
#----<< specs + env.d logic >>----
560
561
561
#---->> pkg_* <<----
562
#---->> pkg_* <<----
562
toolchain_pkg_setup() {
563
toolchain-r1_pkg_pretend() {
563
	if [[ -n ${PRERELEASE}${SNAPSHOT} || ${PV} == *9999* ]] &&
564
	if [[ -n ${PRERELEASE}${SNAPSHOT} || ${PV} == *9999* ]] &&
564
	   [[ -z ${I_PROMISE_TO_SUPPLY_PATCHES_WITH_BUGS} ]]
565
	   [[ -z ${I_PROMISE_TO_SUPPLY_PATCHES_WITH_BUGS} ]]
565
	then
566
	then
Lines 567-587 Link Here
567
			"This is to try and cut down on people filing bugs for a compiler we do not currently support."
568
			"This is to try and cut down on people filing bugs for a compiler we do not currently support."
568
	fi
569
	fi
569
570
571
	[[ -z ${UCLIBC_VER} ]] && [[ ${CTARGET} == *-uclibc* ]] && die "Sorry, this version does not support uClibc"
572
}
573
574
toolchain-r1_pkg_setup() {
570
	# we dont want to use the installed compiler's specs to build gcc!
575
	# we dont want to use the installed compiler's specs to build gcc!
571
	unset GCC_SPECS
576
	unset GCC_SPECS
572
577
573
	if ! use_if_iuse cxx ; then
574
		use_if_iuse go && ewarn 'Go requires a C++ compiler, disabled due to USE="-cxx"'
575
		use_if_iuse objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="-cxx"'
576
		use_if_iuse gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="-cxx"'
577
	fi
578
579
	want_minispecs
578
	want_minispecs
580
579
581
	unset LANGUAGES #265283
580
	unset LANGUAGES #265283
582
}
581
}
583
582
584
toolchain_pkg_postinst() {
583
toolchain-r1_pkg_postinst() {
585
	do_gcc_config
584
	do_gcc_config
586
585
587
	if ! is_crosscompile ; then
586
	if ! is_crosscompile ; then
Lines 617-623 Link Here
617
	fi
616
	fi
618
}
617
}
619
618
620
toolchain_pkg_postrm() {
619
toolchain-r1_pkg_postrm() {
621
	# to make our lives easier (and saner), we do the fix_libtool stuff here.
620
	# to make our lives easier (and saner), we do the fix_libtool stuff here.
622
	# rather than checking SLOT's and trying in upgrade paths, we just see if
621
	# rather than checking SLOT's and trying in upgrade paths, we just see if
623
	# the common libstdc++.la exists in the ${LIBPATH} of the gcc that we are
622
	# the common libstdc++.la exists in the ${LIBPATH} of the gcc that we are
Lines 694-710 Link Here
694
			die "Failed to fixup file ${jfile} for rename to grmic"
693
			die "Failed to fixup file ${jfile} for rename to grmic"
695
	done
694
	done
696
}
695
}
697
toolchain_src_unpack() {
696
toolchain-r1_src_unpack() {
698
	[[ -z ${UCLIBC_VER} ]] && [[ ${CTARGET} == *-uclibc* ]] && die "Sorry, this version does not support uClibc"
699
700
	if [[ ${PV} == *9999* ]]; then
697
	if [[ ${PV} == *9999* ]]; then
701
		git-2_src_unpack
698
		git-2_src_unpack
702
	else
699
	else
703
		gcc_quick_unpack
700
		gcc_quick_unpack
704
	fi
701
	fi
702
}
705
703
704
toolchain-r1_src_prepare() {
706
	export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}"
705
	export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}"
707
	cd "${S}"
708
706
709
	if ! use vanilla ; then
707
	if ! use vanilla ; then
710
		if [[ -n ${PATCH_VER} ]] ; then
708
		if [[ -n ${PATCH_VER} ]] ; then
Lines 1466-1472 Link Here
1466
	export GCJFLAGS=${GCJFLAGS:-${CFLAGS}}
1464
	export GCJFLAGS=${GCJFLAGS:-${CFLAGS}}
1467
}
1465
}
1468
1466
1469
toolchain_src_compile() {
1467
toolchain-r1_src_configure() {
1470
	gcc_do_filter_flags
1468
	gcc_do_filter_flags
1471
	einfo "CFLAGS=\"${CFLAGS}\""
1469
	einfo "CFLAGS=\"${CFLAGS}\""
1472
	einfo "CXXFLAGS=\"${CXXFLAGS}\""
1470
	einfo "CXXFLAGS=\"${CXXFLAGS}\""
Lines 1482-1491 Link Here
1482
	fi
1480
	fi
1483
	# Build in a separate build tree
1481
	# Build in a separate build tree
1484
	mkdir -p "${WORKDIR}"/build
1482
	mkdir -p "${WORKDIR}"/build
1485
	pushd "${WORKDIR}"/build > /dev/null
1483
	cd "${WORKDIR}"/build
1486
1484
1487
	einfo "Configuring ${PN} ..."
1485
	einfo "Configuring ${PN} ..."
1488
	gcc_do_configure
1486
	gcc_do_configure
1487
}
1488
1489
toolchain-r1_src_compile() {
1490
	cd "${WORKDIR}"/build
1489
1491
1490
	touch "${S}"/gcc/c-gperf.h
1492
	touch "${S}"/gcc/c-gperf.h
1491
1493
Lines 1495-1512 Link Here
1495
1497
1496
	einfo "Compiling ${PN} ..."
1498
	einfo "Compiling ${PN} ..."
1497
	gcc_do_make ${GCC_MAKE_TARGET}
1499
	gcc_do_make ${GCC_MAKE_TARGET}
1498
1499
	popd > /dev/null
1500
}
1500
}
1501
1501
1502
toolchain_src_test() {
1502
toolchain-r1_src_test() {
1503
	if use regression-test ; then
1503
	if use regression-test ; then
1504
		cd "${WORKDIR}"/build
1504
		cd "${WORKDIR}"/build
1505
		emake -k check
1505
		emake -k check
1506
	fi
1506
	fi
1507
}
1507
}
1508
1508
1509
toolchain_src_install() {
1509
toolchain-r1_src_install() {
1510
	local x=
1510
	local x=
1511
1511
1512
	cd "${WORKDIR}"/build
1512
	cd "${WORKDIR}"/build
Lines 2096-2104 Link Here
2096
	#use treelang
2096
	#use treelang
2097
	return 0
2097
	return 0
2098
}
2098
}
2099
2100
# should kill these off once all the ebuilds are migrated
2101
gcc_pkg_setup() { toolchain_pkg_setup ; }
2102
gcc_src_unpack() { toolchain_src_unpack ; }
2103
gcc_src_compile() { toolchain_src_compile ; }
2104
gcc_src_test() { toolchain_src_test ; }

Return to bug 474358