From 310061f90263dd9b7e095cdc7b18e30e7b69fc62 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 10 Jan 2005 11:26:22 +0000 Subject: [PATCH] Moved src_install, pkg_preinst, and pkg_postinst into eclass using gcc-3.3.5-r1 and gcc-3.4.3-r1 as a base. Made env.d script creation more abstract. Fixed up multilib support. Fixed some problems moving libs to incorrect destinations or not moving some libs. Fixed a few cross-compilation problems (but not all yet). Closes bug #76884. Updated src_unpack to do patches based on instead of . --- sys-devel/gcc/ChangeLog | 11 +- sys-devel/gcc/Manifest | 72 ++--- sys-devel/gcc/gcc-3.3.5-r1.ebuild | 328 +--------------------- sys-devel/gcc/gcc-3.4.3-r1.ebuild | 437 +++--------------------------- 4 files changed, 100 insertions(+), 748 deletions(-) diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog index efdc6a2c2b4b..a2c997b416ae 100644 --- a/sys-devel/gcc/ChangeLog +++ b/sys-devel/gcc/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-devel/gcc # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.366 2005/01/09 19:02:53 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.367 2005/01/10 11:26:22 eradicator Exp $ + + 10 Jan 2005; Jeremy Huddleston + gcc-3.3.5-r1.ebuild, gcc-3.4.3-r1.ebuild: + Moved src_install, pkg_preinst, and pkg_postinst into eclass using + gcc-3.3.5-r1 and gcc-3.4.3-r1 as a base. Made env.d script creation more + abstract. Fixed up multilib support. Fixed some problems moving libs to + incorrect destinations or not moving some libs. Fixed a few + cross-compilation problems (but not all yet). Closes bug #76884. Updated + src_unpack to do patches based on instead of . 09 Jan 2005; Joshua Kinard +files/3.4.2/gcc-3.4.2-mips-ip28_cache_barriers.patch, gcc-3.4.3-r1.ebuild: diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index c7c55496187f..a7e218a3ad5c 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -1,50 +1,58 @@ -MD5 1e1f16a6323039d80ce92fab4eabefad ChangeLog 76639 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 02157709ea2501691a702088d544b5ab ChangeLog 77150 MD5 1cc192aba411ac83ab6905c2d3c1cb2d gcc-2.95.3-r8.ebuild 8432 +MD5 a19ba7542bc8429c2662cdc9fb852190 gcc-3.4.3-r1.ebuild 5364 MD5 4ae030bd0b7fd0ef5c859b8ca2d32436 gcc-3.2.3-r4.ebuild 19729 -MD5 a19b796e70f4c208766e6c3783ba0698 gcc-3.4.3-r1.ebuild 16226 +MD5 1fef307d644a7f84c935236c8b6be083 gcc-3.4.2-r2.ebuild 13486 +MD5 a8802bfe958c49e8393972d727b7edf2 gcc-3.3.5-r1.ebuild 3637 MD5 b722492a21537c1ec3a15acb8f11a387 gcc-3.3.2-r2.ebuild 17859 -MD5 c95b8ce242223591493672f9540b387a gcc-3.3.5-r1.ebuild 12485 MD5 e8b561dbb0d86dcee9ca99b835813d92 gcc-3.3.2-r5.ebuild 21183 +MD5 32a49c379c995aa266bd40448f16480c gcc-3.3.4-r2.ebuild 24489 MD5 778e3f9f0a84fb7e8c477880027fe39d gcc-3.3.2-r7.ebuild 21588 MD5 3384a275321a4ed8869bfb2d740eb74b gcc-3.3.2.ebuild 16693 MD5 9480816d969717d52d56af9da7b2df12 gcc-3.3.3-r3.ebuild 23403 -MD5 521e5a311811e8eb920198e20a7c433f gcc-3.3.3-r6.ebuild 24793 -MD5 5b214acf30ab089dfd7d79f8115bbdd6 gcc-3.3.4-r1.ebuild 24684 -MD5 32a49c379c995aa266bd40448f16480c gcc-3.3.4-r2.ebuild 24489 MD5 8d5444efd838da5c75c82e64e2625dfd gcc-3.4.1-r3.ebuild 31269 -MD5 1fef307d644a7f84c935236c8b6be083 gcc-3.4.2-r2.ebuild 13486 +MD5 521e5a311811e8eb920198e20a7c433f gcc-3.3.3-r6.ebuild 24793 MD5 d81ef073d429d7ed3d5393ecffc4e610 gcc-3.4.3.ebuild 13254 MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 +MD5 5b214acf30ab089dfd7d79f8115bbdd6 gcc-3.3.4-r1.ebuild 24684 MD5 f7e7042c2ddf66e344b30cbc66ebaf73 files/cc 24 MD5 80d122265d3062847a4a1b161abe1d26 files/cpp 24 MD5 3213bd50acdbbd71ce7dd3e40710e30e files/digest-gcc-2.95.3-r8 64 -MD5 a3edf5e9d8bb500178f8dd29c1f9eadd files/digest-gcc-3.3.5-r1 442 -MD5 40e6872c09149a81973f01a78c80bbb7 files/digest-gcc-3.2.3-r4 279 +MD5 69687aac826654ad375b7eae45a01e0b files/digest-gcc-3.4.2-r2 443 MD5 9b68e03bb1a6a1494399c8a6537bb766 files/digest-gcc-3.4.3-r1 527 +MD5 40e6872c09149a81973f01a78c80bbb7 files/digest-gcc-3.2.3-r4 279 +MD5 60e02a7ee2f579ac72ab223679d81e7a files/gcc-spec-env.patch 819 MD5 cf81ae4b2da79c34a005da1182c40134 files/digest-gcc-3.3.2 130 +MD5 a3edf5e9d8bb500178f8dd29c1f9eadd files/digest-gcc-3.3.5-r1 442 MD5 f48105f24e5c714530e66a94aa56d615 files/digest-gcc-3.3.2-r2 361 MD5 01c41c9e6857eb40d402f2acb2bd96f9 files/digest-gcc-3.3.2-r5 361 +MD5 6df16eb92245a931ecfc4cbcc73c84cf files/digest-gcc-3.3.4-r2 442 MD5 e58b6c1f3122b79a5d0d273acc3c008c files/digest-gcc-3.3.2-r7 361 MD5 5a9db19cd5ad6ad16b0f838d525d842a files/digest-gcc-3.3.3-r3 522 -MD5 3fd5a29d44b89f4fb220fccaa968fc05 files/digest-gcc-3.3.3-r6 442 -MD5 6df16eb92245a931ecfc4cbcc73c84cf files/digest-gcc-3.3.4-r1 442 -MD5 6df16eb92245a931ecfc4cbcc73c84cf files/digest-gcc-3.3.4-r2 442 MD5 c6ea8a92bac6d2638c54c011f98bc5b8 files/digest-gcc-3.4.1-r3 442 -MD5 69687aac826654ad375b7eae45a01e0b files/digest-gcc-3.4.2-r2 443 +MD5 3fd5a29d44b89f4fb220fccaa968fc05 files/digest-gcc-3.3.3-r6 442 MD5 d197c7ddd1a614b89bddbc3babb31c3b files/digest-gcc-3.4.3 442 MD5 9bb4a999eb75c9e3eadab9aa71e91879 files/fix_libtool_files.sh 1731 -MD5 60e02a7ee2f579ac72ab223679d81e7a files/gcc-spec-env.patch 819 MD5 8baffb486c75efe253bd2daa88daa7d6 files/gcc331_use_multilib.amd64.patch 352 MD5 e3193bdffb435b77a21bfb504ff6f591 files/mkinfodir 7324 -MD5 ea2cf3df0d89a26d5fdc1a531176e395 files/pro-police-docs.patch 3287 MD5 07b57d62aa1a8cd4d1cd37984ebe2053 files/scan_libgcc_linked_ssp.sh 861 +MD5 6df16eb92245a931ecfc4cbcc73c84cf files/digest-gcc-3.3.4-r1 442 +MD5 ea2cf3df0d89a26d5fdc1a531176e395 files/pro-police-docs.patch 3287 MD5 b1a242694f56184cbcdd40ba25800d50 files/2.95.3/gcc-2.95.3-alpha.diff 14345 MD5 523970c128b929fe7c7cf36508ebd1d5 files/2.95.3/gcc-2.95.3-new-atexit.diff 13604 -MD5 3f6d070c2a4a899e7d879fdb55eecba4 files/3.4.3/libffi-nogcj-lib-path-fix.patch 1691 +MD5 7c29f54dd8d50385ac42fae65459c744 files/3.3.5/gcc-3.3.5-ffecom_gfrt_basictype-prototype.patch 538 MD5 007c62d92efd70fd44c4d2e6a326036b files/3.4.3/libffi-without-libgcj.patch 1658 MD5 7434140298091f759eba5e9706264130 files/3.4.3/libssp.patch 2029 +MD5 3f6d070c2a4a899e7d879fdb55eecba4 files/3.4.3/libffi-nogcj-lib-path-fix.patch 1691 MD5 57ea5e7145dc1322b30f3ce6d6683978 files/3.4.3/gcc-3.4.3-cross-compile.patch 628 -MD5 7c29f54dd8d50385ac42fae65459c744 files/3.3.5/gcc-3.3.5-ffecom_gfrt_basictype-prototype.patch 538 +MD5 b2922cfe76692e7d2b373a0a255f405e files/3.4.2/gcc-3.4.x-mips-add-march-r10k.patch 14248 +MD5 2970ce4d26f78bbb7e76f1d41a177bfb files/3.4.2/gcc34-fix-sse2_pinsrw.patch 901 +MD5 2c1ce849de55d8c81af4e081dbb2f5e4 files/3.4.2/gcc34-m32-no-sse2.patch 1058 +MD5 f3a1b668077c6486c542dcef1cdd9672 files/3.4.2/gcc-3.4.2-mips-ip28_cache_barriers.patch 12545 +MD5 a720c913b78bcfbd7f63319130fadd4a files/3.4.2/810-arm-bigendian-uclibc.patch 1139 MD5 8ec9b0352d226e4693cabffe0fa5bba6 files/3.2.1/gcc31-loop-load-final-value.patch 3324 MD5 5e8f2122ef7f9ce187b0a0d50ac9d24a files/3.2.1/gcc32-arm-disable-mathf.patch 2229 MD5 044a164462d9392aa67cde6f9fd5c1bc files/3.2.1/gcc32-arm-reload1-fix.patch 932 @@ -71,13 +79,11 @@ MD5 b398b7415b93423ff04952c6e69bdb4d files/3.3.1/gcc331-pp-fixup.patch 407 MD5 9e7ed6184a1cdcb69db29f1de26c2d18 files/3.3.2/gcc332-altivec-fix.patch 1607 MD5 d9ae122db2768f8e504dfef256d4991f files/3.3.2/gcc332-gentoo-branding.patch 874 MD5 66df5567226338b7504bbd3c25cea92c files/3.3.3/gcc-3.3.3-libiberty-pic.patch 370 -MD5 ee700275f341541af37d56bd15dcf863 files/3.3.3/gcc-3.3.3-norelro.patch 606 MD5 ff6d7b5082c5e39fab8a5d8932c1a8b7 files/3.3.3/gcc-3.3.3-uclibc-add-ssp.patch 461 MD5 308a0e53f03e9cb74b3d12c2633cbee2 files/3.3.3/gcc-uclibc-3.3-loop.patch 433 MD5 9ba0bd0b103cf9535927ad7c482fe780 files/3.3.3/gcc333-debian-arm-getoff.patch 3501 MD5 25eda9981106a55c413d1df3d3a87db5 files/3.3.3/gcc333-debian-arm-ldm.patch 3383 MD5 cd87c02e4896f47bf6029eef0dc29468 files/3.3.3/gcc333-gentoo-branding.patch 874 -MD5 e5812da37c1862908a29cdae004c4e52 files/3.3.3/gcc333-pr15693.patch 3927 MD5 bb0078854a778b2a279cfb15d8933c29 files/3.3.3/gcc333-ssp-3.3.2_1-fixup.patch 2598 MD5 0e8d94bbc14fbb3fbad1df4f404b39ef files/3.3.3/gcc333-ssp-3.3_7-fixup.patch 2616 MD5 4b249bff27ab6328436e6289ac9f9cfc files/3.3.3/gcc333_pre20040215-gentoo-branding.patch 839 @@ -85,9 +91,8 @@ MD5 f317331e0b196ca455ca9554479cd8eb files/3.3.3/gcc333_pre20040322-gentoo-brand MD5 43c60f04779324d74d3aac52224bed95 files/3.3.3/gcc333_pre20040408-gentoo-branding.patch 820 MD5 3210d5fd70806c44d4426c3dceebd480 files/3.3.3/gcc333_pre20040408-stack-size.patch 653 MD5 43c60f04779324d74d3aac52224bed95 files/3.3.3/gcc333_pre20040426-gentoo-branding.patch 820 -MD5 8c779f2dca6ab1b5b95e2ee211d26c8c files/3.3.4/gcc-3.3.4-spec-env.patch 786 -MD5 27120401d2355e5d959b8d2d55eba310 files/3.3.4/gcc334-gentoo-branding.patch 876 -MD5 5fb5b49f3f16cc9e7e27e582c92ffa2f files/3.3.4/libffi-without-libgcj.patch 890 +MD5 ee700275f341541af37d56bd15dcf863 files/3.3.3/gcc-3.3.3-norelro.patch 606 +MD5 e5812da37c1862908a29cdae004c4e52 files/3.3.3/gcc333-pr15693.patch 3927 MD5 17b3190d64e34ed7709d022b326d08ae files/3.4.0/gcc-3.4.0-cc1-no-stack-protector.patch 563 MD5 66edf32babf498517ca56fa44c901f26 files/3.4.0/gcc-3.4.0-move-propolice-into-glibc.patch 894 MD5 06580106a905e8fa2ff23aa190f9d82c files/3.4.0/gcc-3.4.0-r6-gentoo-branding.patch 781 @@ -96,17 +101,22 @@ MD5 c919e0a2cd429d0121b6133c1b4e41a6 files/3.4.0/gcc34-ice-hack.patch 8605 MD5 31470a0e018eb2cdfe68c71039ede80f files/3.4.0/gcc34-multi32-hack.patch 2445 MD5 bae93db3186aa0fc25d659b7799ef499 files/3.4.0/gcc34-ppc64-m32-m64-multilib-only.patch 825 MD5 4edccdf0b4f6dbbc9f7bc9370c255e0c files/3.4.0/gcc34-reiser4-fix.patch 587 +MD5 40eea3a959b76abb57fc629c029a3427 files/awk/fixlafiles.awk 7753 +MD5 c672adb59a1f452475ab0a864b9d1bd1 files/awk/scanforssp.awk 5830 +MD5 27120401d2355e5d959b8d2d55eba310 files/3.3.4/gcc334-gentoo-branding.patch 876 +MD5 8c779f2dca6ab1b5b95e2ee211d26c8c files/3.3.4/gcc-3.3.4-spec-env.patch 786 +MD5 5fb5b49f3f16cc9e7e27e582c92ffa2f files/3.3.4/libffi-without-libgcj.patch 890 MD5 86ae592deb82c4564eb61f770fe5f8a7 files/3.4.1/gcc-3.4.1-gentoo-branding.patch 759 +MD5 df06b1cf70425c78e2e59136ed372ab4 files/3.4.1/gcc341-ppc64-mozilla-ICE-fix.patch 729 +MD5 14fec2000fc63536d4cf22195e88e14f files/3.4.1/gcc-3.4.1-r2-gentoo-branding.patch 781 MD5 cd770c23ece7458db5e6c5067f262ce0 files/3.4.1/gcc-3.4.1-glibc-is-native.patch 760 MD5 7cb2138ac2df6f8674d19974e966a45b files/3.4.1/gcc-3.4.1-mips-n32only.patch 614 MD5 aa8e15a63d797df37bbd4e489ed0267f files/3.4.1/gcc-3.4.1-mips-n64only.patch 614 -MD5 14fec2000fc63536d4cf22195e88e14f files/3.4.1/gcc-3.4.1-r2-gentoo-branding.patch 781 MD5 97d7409ba5038bea85f9cabe023e28a6 files/3.4.1/gcc-3.4.1-spec-env.patch 755 -MD5 df06b1cf70425c78e2e59136ed372ab4 files/3.4.1/gcc341-ppc64-mozilla-ICE-fix.patch 729 -MD5 a720c913b78bcfbd7f63319130fadd4a files/3.4.2/810-arm-bigendian-uclibc.patch 1139 -MD5 b2922cfe76692e7d2b373a0a255f405e files/3.4.2/gcc-3.4.x-mips-add-march-r10k.patch 14248 -MD5 2970ce4d26f78bbb7e76f1d41a177bfb files/3.4.2/gcc34-fix-sse2_pinsrw.patch 901 -MD5 2c1ce849de55d8c81af4e081dbb2f5e4 files/3.4.2/gcc34-m32-no-sse2.patch 1058 -MD5 f3a1b668077c6486c542dcef1cdd9672 files/3.4.2/gcc-3.4.2-mips-ip28_cache_barriers.patch 12545 -MD5 40eea3a959b76abb57fc629c029a3427 files/awk/fixlafiles.awk 7753 -MD5 c672adb59a1f452475ab0a864b9d1bd1 files/awk/scanforssp.awk 5830 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.0 (GNU/Linux) + +iD8DBQFB4mZqArHZZzCEUG0RAhA4AJ9tj3CABE6RYoNARFt/6kN0zRH60gCeJsVe +T7reHVmYKe3ncqH+lbQPR50= +=qPSL +-----END PGP SIGNATURE----- diff --git a/sys-devel/gcc/gcc-3.3.5-r1.ebuild b/sys-devel/gcc/gcc-3.3.5-r1.ebuild index 3e865d07c7be..638804eadd4b 100644 --- a/sys-devel/gcc/gcc-3.3.5-r1.ebuild +++ b/sys-devel/gcc/gcc-3.3.5-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.5-r1.ebuild,v 1.5 2005/01/07 15:33:40 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.5-r1.ebuild,v 1.6 2005/01/10 11:26:22 eradicator Exp $ DESCRIPTION="The GNU Compiler Collection. Includes C/C++, java compilers, pie+ssp extensions, Haj Ten Brugge runtime bounds checking" @@ -69,51 +69,6 @@ SPLIT_SPECS="${SPLIT_SPECS:="true"}" inherit eutils flag-o-matic libtool gnuconfig toolchain -gcc_do_filter_flags() { - strip-flags - - # In general gcc does not like optimization, and add -O2 where - # it is safe. This is especially true for gcc 3.3 + 3.4 - replace-flags -O? -O2 - - strip-unsupported-flags - - # If we use multilib on mips, we shouldn't pass -mabi flag - it breaks - # build of non-default-abi libraries. - use mips && use multilib && filter-flags "-mabi*" - - # Compile problems with these (bug #6641 among others)... - #filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr" - - export GCJFLAGS="${CFLAGS}" -} - - -chk_gcc_version() { - mkdir -p "${WORKDIR}" - - # This next bit is for updating libtool linker scripts ... - local OLD_GCC_VERSION="`gcc -dumpversion`" - local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\ - sed -e 's:^.*/gcc[^/]*/\([^/]*\)/[0-9]\+.*$:\1:')" - - if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ] - then - echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion" - fi - - if [ -n "${OLD_GCC_CHOST}" ] - then - if [ "${CHOST}" = "${CTARGET}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ] - then - echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost" - fi - fi - - # Did we check the version ? - touch "${WORKDIR}/.chkgccversion" -} - src_unpack() { gcc_src_unpack @@ -130,14 +85,16 @@ src_unpack() { # 3.3.5 to not compile on some configurations. epatch ${FILESDIR}/3.3.5/gcc-3.3.5-ffecom_gfrt_basictype-prototype.patch - if [ "${ARCH}" = "ppc" -o "${ARCH}" = "ppc64" ] ; then - epatch ${FILESDIR}/3.3.3/gcc333_pre20040408-stack-size.patch - fi - - if [ "${ARCH}" = "arm" ] ; then - epatch ${FILESDIR}/3.3.3/gcc333-debian-arm-getoff.patch - epatch ${FILESDIR}/3.3.3/gcc333-debian-arm-ldm.patch - fi + einfo "Applying CTARGET based patches: ${CTARGET}" + case "${CTARGET}" in + powerpc*-*) + epatch ${FILESDIR}/3.3.3/gcc333_pre20040408-stack-size.patch + ;; + arm-*) + epatch ${FILESDIR}/3.3.3/gcc333-debian-arm-getoff.patch + epatch ${FILESDIR}/3.3.3/gcc333-debian-arm-ldm.patch + ;; + esac # Anything useful and objc will require libffi. Seriously. Lets just force # libffi to install with USE="objc", even though it normally only installs @@ -147,266 +104,3 @@ src_unpack() { #epatch ${FILESDIR}/3.4.3/libffi-nogcj-lib-path-fix.patch fi } - - -src_install() { - local x= - - # Do allow symlinks in ${PREFIX}/lib/gcc-lib/${CHOST}/${PV}/include as - # this can break the build. - for x in ${WORKDIR}/build/gcc/include/* - do - if [ -L ${x} ] - then - rm -f ${x} - continue - fi - done - # Remove generated headers, as they can cause things to break - # (ncurses, openssl, etc). - for x in `find ${WORKDIR}/build/gcc/include/ -name '*.h'` - do - if grep -q 'It has been auto-edited by fixincludes from' ${x} - then - rm -f ${x} - fi - done - - einfo "Installing GCC..." - # Do the 'make install' from the build directory - cd ${WORKDIR}/build - S="${WORKDIR}/build" \ - make DESTDIR="${D}" install || die - - if [ "${CHOST}" == "${CTARGET}" ] ; then - [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}" - fi - - dodir /lib /usr/bin - dodir /etc/env.d/gcc - create_gcc_env_entry - - if want_split_specs ; then - if use hardened ; then - create_gcc_env_entry vanilla - fi - use !hardened && hardened_gcc_works && create_gcc_env_entry hardened - if hardened_gcc_works || hardened_gcc_works pie ; then - create_gcc_env_entry hardenednossp - fi - if hardened_gcc_works || hardened_gcc_works ssp ; then - create_gcc_env_entry hardenednopie - fi - - cp ${WORKDIR}/build/*.specs ${D}/${LIBPATH} - fi - - # This one comes with binutils - rm -f ${D}${PREFIX}/lib/libiberty.a - rm -f ${D}${LIBPATH}/libiberty.a - [ -e ${D}/${PREFIX}/lib/32 ] && rm -rf ${D}/${PREFIX}/lib/32 - - # we dont want these in freaky non-versioned paths that dont ever get used - fix_freaky_non_versioned_library_paths_that_dont_ever_get_used 32 - fix_freaky_non_versioned_library_paths_that_dont_ever_get_used 64 - # and mips is just freaky in general ;p - fix_freaky_non_versioned_library_paths_that_dont_ever_get_used o32 - # and finally, the non-bitdepth-or-ABI-specific freaky path - if [ -d ${D}/${LIBPATH}/../lib ] ; then - mv ${D}/${LIBPATH}/../lib/* ${D}/${LIBPATH}/ - rm -rf ${D}/${LIBPATH}/../lib - fi - # we also dont want libs in /usr/lib* - if [ -d ${D}/${PREFIX}/lib32 -a -d ${D}/${LIBPATH}/32 ] ; then - mv ${D}/${PREFIX}/lib32/* ${D}/${LIBPATH}/32/ - rm -rf ${D}/${PREFIX}/lib32/ - elif [ -d ${D}/${PREFIX}/lib32 -a ! -d ${D}/${LIBPATH}/32 ] ; then - mv ${D}/${PREFIX}/lib32/* ${D}/${LIBPATH}/ - rm -rf ${D}/${PREFIX}/lib32/ - fi - if [ -d ${D}/${PREFIX}/lib64 -a -d ${D}/${LIBPATH}/64 ] ; then - mv ${D}/${PREFIX}/lib64/* ${D}/${LIBPATH}/64/ - rm -rf ${D}/${PREFIX}/lib64/ - elif [ -d ${D}/${PREFIX}/lib64 -a ! -d ${D}/${LIBPATH}/64 ] ; then - mv ${D}/${PREFIX}/lib64/* ${D}/${LIBPATH}/ - rm -rf ${D}/${PREFIX}/lib64/ - fi - if [ "$(get_multilibdir)" != "lib" ] ; then - mv ${D}/${PREFIX}/lib/*so* ${D}/${PREFIX}/lib/*\.la \ - ${D}/${PREFIX}/lib/*\.a ${D}/${LIBPATH} - else - mv ${D}/${PREFIX}/lib/*so* ${D}/${PREFIX}/lib/*\.la \ - ${D}/${PREFIX}/lib/*\.a ${D}/${LIBPATH}/32/ - fi - # and sometimes crap ends up here too :| - mv ${D}/${LIBPATH}/../*.a ${D}/${LIBPATH}/../*.la ${D}/${LIBPATH}/../*so* \ - ${D}/${LIBPATH}/ - - # make sure the libtool archives have libdir set to where they actually - # -are-, and not where they -used- to be. - fix_libtool_libdir_paths "$(find ${D}/${LIBPATH} -name *.la)" - - # Make sure we dont have stuff lying around that - # can nuke multiple versions of gcc - if ! use build - then - cd ${D}${LIBPATH} - - # Move Java headers to compiler-specific dir - for x in ${D}${PREFIX}/include/gc*.h ${D}${PREFIX}/include/j*.h - do - [ -f "${x}" ] && mv -f ${x} ${D}${LIBPATH}/include/ - done - for x in gcj gnu java javax org - do - if [ -d "${D}${PREFIX}/include/${x}" ] - then - dodir /${LIBPATH}/include/${x} - mv -f ${D}${PREFIX}/include/${x}/* ${D}${LIBPATH}/include/${x}/ - rm -rf ${D}${PREFIX}/include/${x} - fi - done - - if [ -d "${D}${PREFIX}/lib/security" ] - then - dodir /${LIBPATH}/security - mv -f ${D}${PREFIX}/lib/security/* ${D}${LIBPATH}/security - rm -rf ${D}${PREFIX}/lib/security - fi - - # Move libgcj.spec to compiler-specific directories - [ -f "${D}${PREFIX}/lib/libgcj.spec" ] && \ - mv -f ${D}${PREFIX}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec - - # Rename jar because it could clash with Kaffe's jar if this gcc is - # primary compiler (aka don't have the - extension) - cd ${D}${PREFIX}/${CTARGET}/gcc-bin/${MY_PV_FULL} - [ -f jar ] && mv -f jar gcj-jar - - # Move to compiler-specific directories - [ -f "${D}${STDCXX_INCDIR}/cxxabi.h" ] && \ - mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/ - - # These should be symlinks - cd ${D}${BINPATH} - for x in gcc g++ c++ g77 gcj - do - if [ "${CHOST}" == "${CTARGET}" ] && [ -f "${CTARGET}-${x}" ] - then - [ ! -f "${x}" ] && mv "${CTARGET}-${x}" "${x}" - ln -sf ${x} ${CTARGET}-${x} - fi - - if [ -f "${CTARGET}-${x}-${PV}" ] - then - rm -f ${CTARGET}-${x}-${PV} - ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${PV} - fi - done - fi - - cd ${S} - if ! use build && [ "${CHOST}" == "${CTARGET}" ] ; then - prepman ${DATAPATH} - prepinfo ${DATAPATH} - else - rm -rf ${D}/usr/share/{man,info} - rm -rf ${D}${DATAPATH}/{man,info} - fi - - # Rather install the script, else portage with changing $FILESDIR - # between binary and source package borks things .... - if [ "${CHOST}" == "${CTARGET}" ] ; then - insinto /lib/rcscripts/awk - doins ${FILESDIR}/awk/fixlafiles.awk - exeinto /sbin - doexe ${FILESDIR}/fix_libtool_files.sh - fi -} - -fix_freaky_non_versioned_library_paths_that_dont_ever_get_used() { - # first the multilib case - if [ -d ${D}/${LIBPATH}/../$1 -a -d ${D}/${LIBPATH}/$1 ] ; then - mv ${D}/${LIBPATH}/../$1/* ${D}/${LIBPATH}/$1/ - rm -rf ${D}/${LIBPATH}/../$1 - fi - if [ -d ${D}/${LIBPATH}/../lib$1 -a -d ${D}/${LIBPATH}/$1 ] ; then - mv ${D}/${LIBPATH}/../lib$1/* ${D}/${LIBPATH}/$1/ - rm -rf ${D}/${LIBPATH}/../lib$1 - fi - # and now to fix up the non-multilib case - if [ -d ${D}/${LIBPATH}/../$1 -a ! -d ${D}/${LIBPATH}/$1 ] ; then - mv ${D}/${LIBPATH}/../$1/* ${D}/${LIBPATH}/ - rm -rf ${D}/${LIBPATH}/../$1 - fi - if [ -d ${D}/${LIBPATH}/../lib$1 -a ! -d ${D}/${LIBPATH}/$1 ] ; then - mv ${D}/${LIBPATH}/../lib$1/* ${D}/${LIBPATH}/ - rm -rf ${D}/${LIBPATH}/../lib$1 - fi -} - -fix_libtool_libdir_paths() { - local dirpath - for archive in ${*} ; do - dirpath=$(dirname ${archive} | sed -e "s:^${D}::") - sed -i ${archive} -e "s:^libdir.*:libdir=\'${dirpath}\':" - done -} - - -pkg_preinst() { - - if [ ! -f "${WORKDIR}/.chkgccversion" ] - then - mkdir -p ${WORKDIR} - chk_gcc_version - fi - - # Make again sure that the linker "should" be able to locate - # libstdc++.so ... - if use multilib && [ "${ARCH}" = "amd64" ] - then - # Can't always find libgcc_s.so.1, make it find it - export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}" - else - export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}" - fi - ${ROOT}/sbin/ldconfig -} - -pkg_postinst() { - - if use multilib && [ "${ARCH}" = "amd64" ] - then - # Can't always find libgcc_s.so.1, make it find it - export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}" - else - export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}" - fi - - should_we_gcc_config && do_gcc_config - - # Update libtool linker scripts to reference new gcc version ... - if [ "${ROOT}" = "/" ] && \ - [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ] - then - local OLD_GCC_VERSION= - local OLD_GCC_CHOST= - - if [ -f "${WORKDIR}/.oldgccversion" ] && \ - [ -n "$(cat "${WORKDIR}/.oldgccversion")" ] - then - OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")" - else - OLD_GCC_VERSION="${MY_PV_FULL}" - fi - - if [ -f "${WORKDIR}/.oldgccchost" ] && \ - [ -n "$(cat "${WORKDIR}/.oldgccchost")" ] - then - OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")" - fi - - /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST} - fi -} diff --git a/sys-devel/gcc/gcc-3.4.3-r1.ebuild b/sys-devel/gcc/gcc-3.4.3-r1.ebuild index 515f0a78895f..15f156f3baa5 100644 --- a/sys-devel/gcc/gcc-3.4.3-r1.ebuild +++ b/sys-devel/gcc/gcc-3.4.3-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.4.3-r1.ebuild,v 1.13 2005/01/09 19:02:54 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.4.3-r1.ebuild,v 1.14 2005/01/10 11:26:22 eradicator Exp $ DESCRIPTION="The GNU Compiler Collection. Includes C/C++, java compilers, pie+ssp extensions, Haj Ten Brugge runtime bounds checking" @@ -72,73 +72,7 @@ SPLIT_SPECS="${SPLIT_SPECS:="true"}" inherit eutils flag-o-matic libtool gnuconfig toolchain -gcc_do_filter_flags() { - strip-flags - - # In general gcc does not like optimization, and add -O2 where - # it is safe. This is especially true for gcc 3.3 + 3.4 - replace-flags -O? -O2 - - # -mcpu is deprecated on these archs, and possibly others - if use amd64 || use x86 ; then - setting="`get-flag mcpu`" - [ ! -z "${setting}" ] && \ - replace-flags -mcpu="${setting}" -mtune="${setting}" && \ - ewarn "-mcpu is deprecated on your arch\a\a\a" && \ - epause 5 - fi - - strip-unsupported-flags - - # If we use multilib on mips, we shouldn't pass -mabi flag - it breaks - # build of non-default-abi libraries. - use mips && use multilib && filter-flags "-mabi*" - - # Compile problems with these (bug #6641 among others)... - #filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr" - - export GCJFLAGS="${CFLAGS}" -} - - -chk_gcc_version() { - mkdir -p "${WORKDIR}" - - # This next bit is for updating libtool linker scripts ... - local OLD_GCC_VERSION="`gcc -dumpversion`" - local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\ - sed -e 's:^.*/gcc[^/]*/\([^/]*\)/[0-9]\+.*$:\1:')" - - if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ] - then - echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion" - fi - - if [ -n "${OLD_GCC_CHOST}" ] - then - if [ "${CHOST}" = "${CTARGET}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ] - then - echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost" - fi - fi - - # Did we check the version ? - touch "${WORKDIR}/.chkgccversion" -} - src_unpack() { - # if sandbox is enabled, and multilib is enabled, but we dont have a 32bit - # sandbox... installing gcc will fail as soon as it starts configuring the - # 32bit libstdc++. not fun. - if use amd64 && use multilib && hasq sandbox $FEATURES && [ ! -e /lib32/libsandbox.so ] ; then - eerror "You need a 32bit sandbox to install 32bit code with sandbox" - eerror "enabled. Either add FEATURES=-sandbox or disable multilib." - eerror "After installing a multilib gcc, you can re-emerge portage" - eerror "to get a 32bit sandbox, and this problem will go away." - ebeep - die "no 32bit sandbox" - fi - gcc_src_unpack # bah @@ -162,38 +96,6 @@ src_unpack() { #epatch ${FILESDIR}/3.4.3/libffi-nogcj-lib-path-fix.patch fi - # /* Begin mips bits */ - if use mips; then - # If mips, and we DON'T want multilib, then rig gcc to only use n32 OR n64 - if use !multilib; then - use n32 && epatch ${FILESDIR}/3.4.1/gcc-3.4.1-mips-n32only.patch - use n64 && epatch ${FILESDIR}/3.4.1/gcc-3.4.1-mips-n64only.patch - fi - - # Patch forward-ported from a gcc-3.0.x patch that adds -march=r10000 and - # -mtune=r10000 support to gcc (Allows the compiler to generate code to - # take advantage of R10k's second ALU, perform shifts, etc.. - # - # Needs re-porting to DFA in gcc-4.0 - Any Volunteers? :) - epatch ${FILESDIR}/3.4.2/gcc-3.4.x-mips-add-march-r10k.patch - - # This is a very special patch -- it allows us to build semi-usable kernels - # on SGI IP28 (Indigo2 Impact R10000) systems. The patch is henceforth - # regarded as a kludge by upstream, and thus, it will never get accepted upstream, - # but for our purposes of building a kernel, it works. - # Unless you're building an IP28 kernel, you really don't need care about what - # this patch does, because if you are, you are probably already aware of what - # it does. - # All that said, the abilities of this patch are disabled by default and need - # to be enabled by passing -mip28-cache-barrier. Only used to build kernels, - # There is the possibility it may be used for very specific userland apps too. - if use ip28; then - epatch ${FILESDIR}/3.4.2/gcc-3.4.2-mips-ip28_cache_barriers.patch - fi - fi - # /* End mips bits */ - - # hack around some ugly 32bit sse2 wrong-code bugs epatch ${FILESDIR}/3.4.2/gcc34-m32-no-sse2.patch epatch ${FILESDIR}/3.4.2/gcc34-fix-sse2_pinsrw.patch @@ -201,308 +103,45 @@ src_unpack() { # Fix cross-compiling epatch ${FILESDIR}/3.4.3/gcc-3.4.3-cross-compile.patch - if use amd64 && use multilib ; then - # this should hack around the GCC_NO_EXECUTABLES bug - epatch ${FILESDIR}/3.4.1/gcc-3.4.1-glibc-is-native.patch - cd ${S}/libstdc++-v3 - einfo "running autoreconf..." - autoreconf 2> /dev/null - cd ${S} - fi -} - -src_install() { - local x= - - # Do allow symlinks in ${PREFIX}/lib/gcc-lib/${CHOST}/${PV}/include as - # this can break the build. - for x in ${WORKDIR}/build/gcc/include/* - do - if [ -L ${x} ] - then - rm -f ${x} - continue - fi - done - # Remove generated headers, as they can cause things to break - # (ncurses, openssl, etc). - for x in `find ${WORKDIR}/build/gcc/include/ -name '*.h'` - do - if grep -q 'It has been auto-edited by fixincludes from' ${x} - then - rm -f ${x} - fi - done - - einfo "Installing GCC..." - # Do the 'make install' from the build directory - cd ${WORKDIR}/build - S="${WORKDIR}/build" \ - make DESTDIR="${D}" install || die - - if [ "${CHOST}" == "${CTARGET}" ] ; then - [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}" - fi - - dodir /lib /usr/bin - dodir /etc/env.d/gcc - create_gcc_env_entry - - if want_split_specs ; then - if use hardened ; then - create_gcc_env_entry vanilla - fi - use !hardened && hardened_gcc_works && create_gcc_env_entry hardened - if hardened_gcc_works || hardened_gcc_works pie ; then - create_gcc_env_entry hardenednossp - fi - if hardened_gcc_works || hardened_gcc_works ssp ; then - create_gcc_env_entry hardenednopie - fi - - cp ${WORKDIR}/build/*.specs ${D}/${LIBPATH} - fi - - # we dont want these in freaky non-versioned paths that dont ever get used - fix_freaky_non_versioned_library_paths_that_dont_ever_get_used 32 - fix_freaky_non_versioned_library_paths_that_dont_ever_get_used 64 - # and mips is just freaky in general ;p - fix_freaky_non_versioned_library_paths_that_dont_ever_get_used o32 - # and finally, the non-bitdepth-or-ABI-specific freaky path - - if [ -d ${D}/${LIBPATH}/../lib ] ; then - if [ "${PROFILE_ARCH}" = "sparc64-multilib" ] && - [ "${CTARGET}" = "sparc64-unknown-linux-gnu" ]; then - if [ -d "${D}/${LIBPATH}/32" ]; then - mv ${D}/${LIBPATH}/../lib/* ${D}/${LIBPATH}/32 - rm -rf ${D}/${LIBPATH}/../lib - else - mv ${D}/${LIBPATH}/../lib ${D}/${LIBPATH}/32 - fi - else - mv ${D}/${LIBPATH}/../lib/* ${D}/${LIBPATH}/ - rm -rf ${D}/${LIBPATH}/../lib - fi - fi - - # we also dont want libs in /usr/lib* - if [ "${PROFILE_ARCH}" = "sparc64-multilib" ] && - [ "${CTARGET}" = "sparc64-unknown-linux-gnu" ]; then - [ ! -d "${D}/${LIBPATH}/32" ] && mkdir ${D}/${LIBPATH}/32 - mv ${D}/${PREFIX}/lib/*.a ${D}/${PREFIX}/lib/*.la ${D}/${PREFIX}/lib/*so* \ - ${D}/${LIBPATH}/32 - fi - - # FIXME: You're forgetting the libs in ${PREFIX}/lib ... - # see the sparc64-multilib hack ^^ - if [ -d ${D}/${PREFIX}/lib32 -a -d ${D}/${LIBPATH}/32 ] ; then - mv ${D}/${PREFIX}/lib32/* ${D}/${LIBPATH}/32/ - rm -rf ${D}/${PREFIX}/lib32/ - elif [ -d ${D}/${PREFIX}/lib32 -a ! -d ${D}/${LIBPATH}/32 ] ; then - mv ${D}/${PREFIX}/lib32/* ${D}/${LIBPATH}/ - rm -rf ${D}/${PREFIX}/lib32/ - fi - - if [ -d ${D}/${PREFIX}/lib64 -a -d ${D}/${LIBPATH}/64 ] ; then - mv ${D}/${PREFIX}/lib64/* ${D}/${LIBPATH}/64/ - rm -rf ${D}/${PREFIX}/lib64/ - elif [ -d ${D}/${PREFIX}/lib64 -a ! -d ${D}/${LIBPATH}/64 ] ; then - mv ${D}/${PREFIX}/lib64/* ${D}/${LIBPATH}/ - rm -rf ${D}/${PREFIX}/lib64/ - fi - - # and sometimes crap ends up here too :| - mv ${D}/${LIBPATH}/../*.a ${D}/${LIBPATH}/../*.la ${D}/${LIBPATH}/../*so* \ - ${D}/${LIBPATH}/ - - # make sure the libtool archives have libdir set to where they actually - # -are-, and not where they -used- to be. - fix_libtool_libdir_paths "$(find ${D}/${LIBPATH} -name *.la)" - - # Make sure we dont have stuff lying around that - # can nuke multiple versions of gcc - if ! use build - then - cd ${D}${LIBPATH} - - # Move Java headers to compiler-specific dir - for x in ${D}${PREFIX}/include/gc*.h ${D}${PREFIX}/include/j*.h - do - [ -f "${x}" ] && mv -f ${x} ${D}${LIBPATH}/include/ - done - for x in gcj gnu java javax org - do - if [ -d "${D}${PREFIX}/include/${x}" ] - then - dodir /${LIBPATH}/include/${x} - mv -f ${D}${PREFIX}/include/${x}/* ${D}${LIBPATH}/include/${x}/ - rm -rf ${D}${PREFIX}/include/${x} - fi - done - - if [ -d "${D}${PREFIX}/lib/security" ] - then - dodir /${LIBPATH}/security - mv -f ${D}${PREFIX}/lib/security/* ${D}${LIBPATH}/security - rm -rf ${D}${PREFIX}/lib/security - fi - - # Move libgcj.spec to compiler-specific directories - [ -f "${D}${PREFIX}/lib/libgcj.spec" ] && \ - mv -f ${D}${PREFIX}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec - - # Rename jar because it could clash with Kaffe's jar if this gcc is - # primary compiler (aka don't have the - extension) - cd ${D}${PREFIX}/${CTARGET}/gcc-bin/${MY_PV_FULL} - [ -f jar ] && mv -f jar gcj-jar - - # Move to compiler-specific directories - [ -f "${D}${STDCXX_INCDIR}/cxxabi.h" ] && \ - mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/ - - # These should be symlinks - cd ${D}${BINPATH} - for x in gcc g++ c++ g77 gcj - do - # For some reason, g77 gets made instead of ${CTARGET}-g77... this makes it safe - if [ -f "${x}" ] - then - mv "${x}" "${CTARGET}-${x}" + # If mips, and we DON'T want multilib, then rig gcc to only use n32 OR n64 + einfo "Applying CTARGET based patches: ${CTARGET}" + case "${CTARGET}" in + mips*-*) + # If mips, and we DON'T want multilib, then rig gcc to only use n32 OR n64 + if use !multilib; then + use n32 && epatch ${FILESDIR}/3.4.1/gcc-3.4.1-mips-n32only.patch + use n64 && epatch ${FILESDIR}/3.4.1/gcc-3.4.1-mips-n64only.patch fi - if [ "${CHOST}" == "${CTARGET}" ] && [ -f "${CTARGET}-${x}" ] - then - [ ! -f "${x}" ] && mv "${CTARGET}-${x}" "${x}" - ln -sf ${x} ${CTARGET}-${x} + # Patch forward-ported from a gcc-3.0.x patch that adds -march=r10000 and + # -mtune=r10000 support to gcc (Allows the compiler to generate code to + # take advantage of R10k's second ALU, perform shifts, etc.. + # + # Needs re-porting to DFA in gcc-4.0 - Any Volunteers? :) + epatch ${FILESDIR}/3.4.2/gcc-3.4.x-mips-add-march-r10k.patch + + # This is a very special patch -- it allows us to build semi-usable kernels + # on SGI IP28 (Indigo2 Impact R10000) systems. The patch is henceforth + # regarded as a kludge by upstream, and thus, it will never get accepted upstream, + # but for our purposes of building a kernel, it works. + # Unless you're building an IP28 kernel, you really don't need care about what + # this patch does, because if you are, you are probably already aware of what + # it does. + # All that said, the abilities of this patch are disabled by default and need + # to be enabled by passing -mip28-cache-barrier. Only used to build kernels, + # There is the possibility it may be used for very specific userland apps too. + if use ip28; then + epatch ${FILESDIR}/3.4.2/gcc-3.4.2-mips-ip28_cache_barriers.patch fi - - if [ -f "${CTARGET}-${x}-${PV}" ] - then - rm -f ${CTARGET}-${x}-${PV} - ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${PV} + ;; + x86_64-*) + if use multilib; then + epatch ${FILESDIR}/3.4.1/gcc-3.4.1-glibc-is-native.patch + cd ${S}/libstdc++-v3 + einfo "running autoreconf..." + autoreconf 2> /dev/null + cd ${S} fi - done - fi - - # This one comes with binutils - rm -f ${D}${PREFIX}/lib/libiberty.a - rm -f ${D}${LIBPATH}/libiberty.a - - [ -e ${D}/${PREFIX}/lib/32 ] && rm -rf ${D}/${PREFIX}/lib/32 - - cd ${S} - if ! use build && [ "${CHOST}" == "${CTARGET}" ] ; then - prepman ${DATAPATH} - prepinfo ${DATAPATH} - else - rm -rf ${D}/usr/share/{man,info} - rm -rf ${D}${DATAPATH}/{man,info} - fi - - # Rather install the script, else portage with changing $FILESDIR - # between binary and source package borks things .... - if [ "${CHOST}" == "${CTARGET}" ] ; then - insinto /lib/rcscripts/awk - doins ${FILESDIR}/awk/fixlafiles.awk - exeinto /sbin - doexe ${FILESDIR}/fix_libtool_files.sh - fi - - # I do not know if this will break gcj stuff, so I'll only do it for - # objc for now; basically "ffi.h" is the correct file to include, - # but it gets installed in .../GCCVER/include and yet it does - # "#include " which (correctly, as it's an "extra" file) - # is installed in .../GCCVER/include/libffi; the following fixes - # ffi.'s include of ffitarget.h - Armando Di Cianno - if use objc && ! use gcj; then - #dosed "s:::g" /${LIBPATH}/include/ffi.h - mv ${D}/${LIBPATH}/include/libffi/* ${D}/${LIBPATH}/include - rm -Rf ${D}/${LIBPATH}/include/libffi - fi -} - -fix_freaky_non_versioned_library_paths_that_dont_ever_get_used() { - # first the multilib case - if [ -d ${D}/${LIBPATH}/../$1 -a -d ${D}/${LIBPATH}/$1 ] ; then - mv ${D}/${LIBPATH}/../$1/* ${D}/${LIBPATH}/$1/ - rm -rf ${D}/${LIBPATH}/../$1 - fi - if [ -d ${D}/${LIBPATH}/../lib$1 -a -d ${D}/${LIBPATH}/$1 ] ; then - mv ${D}/${LIBPATH}/../lib$1/* ${D}/${LIBPATH}/$1/ - rm -rf ${D}/${LIBPATH}/../lib$1 - fi - # and now to fix up the non-multilib case - if [ -d ${D}/${LIBPATH}/../$1 -a ! -d ${D}/${LIBPATH}/$1 ] ; then - mv ${D}/${LIBPATH}/../$1/* ${D}/${LIBPATH}/ - rm -rf ${D}/${LIBPATH}/../$1 - fi - if [ -d ${D}/${LIBPATH}/../lib$1 -a ! -d ${D}/${LIBPATH}/$1 ] ; then - mv ${D}/${LIBPATH}/../lib$1/* ${D}/${LIBPATH}/ - rm -rf ${D}/${LIBPATH}/../lib$1 - fi -} - -fix_libtool_libdir_paths() { - local dirpath - for archive in ${*} ; do - dirpath=$(dirname ${archive} | sed -e "s:^${D}::") - sed -i ${archive} -e "s:^libdir.*:libdir=\'${dirpath}\':" - done -} - -pkg_preinst() { - - if [ ! -f "${WORKDIR}/.chkgccversion" ] - then - mkdir -p ${WORKDIR} - chk_gcc_version - fi - - # Make again sure that the linker "should" be able to locate - # libstdc++.so ... - if use multilib && [ "${ARCH}" = "amd64" ] - then - # Can't always find libgcc_s.so.1, make it find it - export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}" - else - export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}" - fi - ${ROOT}/sbin/ldconfig -} - -pkg_postinst() { - - if use multilib && [ "${ARCH}" = "amd64" ] - then - # Can't always find libgcc_s.so.1, make it find it - export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}" - else - export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}" - fi - - should_we_gcc_config && do_gcc_config - - # Update libtool linker scripts to reference new gcc version ... - if [ "${ROOT}" = "/" ] && \ - [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ] - then - local OLD_GCC_VERSION= - local OLD_GCC_CHOST= - - if [ -f "${WORKDIR}/.oldgccversion" ] && \ - [ -n "$(cat "${WORKDIR}/.oldgccversion")" ] - then - OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")" - else - OLD_GCC_VERSION="${MY_PV_FULL}" - fi - - if [ -f "${WORKDIR}/.oldgccchost" ] && \ - [ -n "$(cat "${WORKDIR}/.oldgccchost")" ] - then - OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")" - fi - - /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST} - fi + ;; + esac } -- 2.26.2