Update eclass

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@315 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2007-12-02 12:01:59 +00:00
parent 61c0cd1312
commit f4aa884715
2 changed files with 35 additions and 11 deletions

View File

@ -16,31 +16,31 @@ DESCRIPTION="Based on the ${ECLASS} eclass"
FEATURES=${FEATURES/multilib-strict/}
toolchain_pkg_setup() {
toolchain-gcc_pkg_setup() {
gcc_pkg_setup
}
toolchain_src_unpack() {
toolchain-gcc_src_unpack() {
gcc_src_unpack
}
toolchain_src_compile() {
toolchain-gcc_src_compile() {
gcc_src_compile
}
toolchain_src_test() {
toolchain-gcc_src_test() {
gcc_src_test
}
toolchain_pkg_preinst() {
toolchain-gcc_pkg_preinst() {
${ETYPE}_pkg_preinst
}
toolchain_src_install() {
toolchain-gcc_src_install() {
${ETYPE}_src_install
}
toolchain_pkg_postinst() {
toolchain-gcc_pkg_postinst() {
${ETYPE}_pkg_postinst
}
toolchain_pkg_prerm() {
toolchain-gcc_pkg_prerm() {
${ETYPE}_pkg_prerm
}
toolchain_pkg_postrm() {
toolchain-gcc_pkg_postrm() {
${ETYPE}_pkg_postrm
}
#----<< eclass stuff >>----
@ -142,6 +142,7 @@ else
[[ -n ${PIE_VER} ]] && IUSE="${IUSE} nopie"
[[ -n ${PP_VER} ]] && IUSE="${IUSE} nossp"
[[ -n ${HTB_VER} ]] && IUSE="${IUSE} boundschecking"
[[ -n ${LLVM_VER} ]] && IUSE="${IUSE} llvm"
[[ -n ${D_VER} ]] && IUSE="${IUSE} d"
if version_is_at_least 3 ; then
@ -485,7 +486,7 @@ _want_stuff() {
return 1
}
want_boundschecking() { _want_stuff HTB_VER boundschecking ; }
want_llvm() { _want_stuff LLVM_VER Low Level Virtual Machine ; }
want_llvm() { _want_stuff LLVM_VER llvm ; }
want_pie() { _want_stuff PIE_VER !nopie ; }
want_ssp() { _want_stuff PP_VER !nossp ; }
@ -1268,6 +1269,23 @@ gcc_do_configure() {
confgcc="${confgcc} --disable-nls"
fi
# LLVM Support
if use llvm && ! use build ; then
einfo "Enabling LLVM"
confgcc="${confgcc} --enable-checking --program-prefix=llvm-"
sed -e 's,^LLVMSRCDIR.*,LLVMSRCDIR := $(shell llvm-config --src-root),' \
-e 's,\$(LLVMSRCDIR)/include,$(shell llvm-config --includedir),g' \
-e 's,^LLVMOBJDIR.*,LLVMOBJDIR := $(shell llvm-config --obj-root),' \
-e 's,\$(LLVMOBJDIR)/include,$(shell llvm-config --includedir),g' \
-e 's,^LLVMBINPATH.*,LLVMBINPATH = $(shell llvm-config --bindir),' \
-e 's,\$(LLVMBINPATH)/llvm-config,llvm-config,' \
-i "${S}"/gcc/Makefile.in || die "sed failed"
sed -e 's,^LLVMBASEPATH.*,LLVMBASEPATH = $(shell llvm-config --obj-root),' \
-i "${S}"/libcpp/Makefile.in || die "sed failed"
fi
# reasonably sane globals (hopefully)
# --disable-libunwind-exceptions needed till unwind sections get fixed. see ps.m for details
confgcc="${confgcc} \
@ -1985,6 +2003,11 @@ do_gcc_HTB_patches() {
}
do_gcc_LLVM_patches() {
if ! want_llvm
then
return 0
fi
epatch "${WORKDIR}/gcc-${LLVM_GCC_VER}-llvm${LLVM_VER}.patch"
release_version="${release_version}, LLVM-${LLVM_GCC_VER}-${LLVM_VER}"
}

View File

@ -198,6 +198,7 @@ toolchain-llvm_src_compile() {
--enable-assertions \
--enable-shared \
--enable-optimized \
--enable-pic \
${myconf} ${EXTRA_ECONF}"
echo ./configure ${myconf}
"${S}"/configure ${myconf} || die "configure failed"