diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2013-11-14 06:20:06 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2013-11-14 06:20:06 +0000 |
commit | ef934f90466152eb8126fe2fe9b4dc5f523cb708 (patch) | |
tree | cfd63a74b9ff5ce7a7548474a1fe374b50adb696 /eclass | |
parent | Fix bug number. (diff) | |
download | gentoo-2-ef934f90466152eb8126fe2fe9b4dc5f523cb708.tar.gz gentoo-2-ef934f90466152eb8126fe2fe9b4dc5f523cb708.tar.bz2 gentoo-2-ef934f90466152eb8126fe2fe9b4dc5f523cb708.zip |
updated gnatbuild for new ebuilds and lto use flag handling
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/gnatbuild.eclass | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/eclass/gnatbuild.eclass b/eclass/gnatbuild.eclass index 6f7261ed2496..6e6d185fbb8c 100644 --- a/eclass/gnatbuild.eclass +++ b/eclass/gnatbuild.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.56 2013/08/02 17:38:57 george Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.57 2013/11/14 06:20:06 nerdboy Exp $ # # Author: George Shapovalov <george@gentoo.org> # Belongs to: ada herd <ada@gentoo.org> @@ -485,12 +485,19 @@ gnatbuild_src_compile() { confgcc="${confgcc} --disable-nls" fi + if [ "${GNATMINOR}" -ge "6" ] ; then + confgcc+=( $(use_enable lto) ) + elif [ "${GNATMINOR}" -ge "5" ] ; then + confgcc+=( --disable-lto ) + fi + # reasonably sane globals (from toolchain) # also disable mudflap and ssp confgcc="${confgcc} \ --with-system-zlib \ --disable-checking \ --disable-werror \ + --disable-libgomp \ --disable-libmudflap \ --disable-libssp \ --disable-libunwind-exceptions" @@ -554,6 +561,11 @@ gnatbuild_src_compile() { cp "${S}"/gcc/ada/xeinfo.adb . cp "${S}"/gcc/ada/xnmake.adb . cp "${S}"/gcc/ada/xutil.ad{s,b} . + if [[ ${GNATMINOR} > 5 ]] ; then + cp "${S}"/gcc/ada/einfo.ad{s,b} . + cp "${S}"/gcc/ada/csinfo.adb . + cp "${S}"/gcc/ada/ceinfo.adb . + fi gnatmake xtreeprs && \ gnatmake xsinfo && \ gnatmake xeinfo && \ @@ -645,7 +657,7 @@ gnatbuild_src_install() { make DESTDIR="${D}" install || die #make a convenience info link - dosym ${DATAPATH}/info/gnat_ugn_unw.info ${DATAPATH}/info/gnat.info + dosym ${DATAPATH}/info/gnat_ugn.info ${DATAPATH}/info/gnat.info ;; move_libs) @@ -713,6 +725,14 @@ EOF # remove duplicate docs rm -f "${D}${DATAPATH}"/info/{dir,gcc,cpp}* rm -rf "${D}${DATAPATH}"/man/man7/ + + # fix .la path for lto plugin + if use lto ; then + sed -i -e \ + "/libdir=/c\libdir='${LIBEXECPATH}'" \ + "${D}${LIBEXECPATH}"/liblto_plugin.la \ + || die "sed update of .la file failed!" + fi ;; prep_env) |