diff options
Diffstat (limited to 'sys-devel')
39 files changed, 4011 insertions, 0 deletions
diff --git a/sys-devel/base-gcc/Manifest b/sys-devel/base-gcc/Manifest new file mode 100644 index 00000000..bb905ce5 --- /dev/null +++ b/sys-devel/base-gcc/Manifest @@ -0,0 +1,26 @@ +AUX awk/fixlafiles.awk 7807 RMD160 749402c9c0a0f1e8755067c0e001f69d73edb09f SHA1 5fc91ce11eb93e989ae64470dba602fe534ac409 SHA256 3cae4890a295adef50c6cf8a7e14d1be4e7a2356479c073e5c29433c3cdf9c5c +AUX awk/fixlafiles.awk-no_gcc_la 8596 RMD160 d34279d732586514b220ec0d583c5e634b5d97ef SHA1 95f07ff4d6c3196e682371f02e6d2207d921a1b5 SHA256 91e36c29133b6ff854bc84acd6cd2e9d07be6eaa73ef9b23e4f7bc6371107fab +AUX fix_libtool_files.sh 1735 RMD160 5035cd4a9995ea6207a8de95815921c3939395bd SHA1 57cd1babab4c6b142dd8cc58b36943442ff2af13 SHA256 b8d86b1db9453dff4c62b3467887bf1e04ecb483120185102122bda2581ed3f5 +AUX gcc-configure-LANG.patch 2052 RMD160 91f5b90600dfccb10c4e2308a5a1485275fdfeee SHA1 56ecd1d6f2e4bd0b35ac108be72a4f6f60212c38 SHA256 63de6d2dcfe14f21d147abeb1390405b9220c03f8e968f482d4b4c1cf279c88b +AUX gcc-configure-texinfo.patch 337 RMD160 d0e872a9f0ccb5ab51d10f129acd7a19d76a7b75 SHA1 7e267fac540175ce848e563539db8c951cab557b SHA256 74b73a7ecec2d88889876b4db480cd173632f49d5396bb8e5b3c93673f9b5b98 +AUX gcc-spec-env.patch 1544 RMD160 1f7747546513a6d8e16bd82c2824969b9a739dfb SHA1 bdc2736377813da4046ceea77922620dd69d8658 SHA256 64b01f29fb853fee5ecda998b66eeaa7ec86ff1fc3b21432bfd69eb543c93e6a +AUX mkinfodir 7324 RMD160 96bbe8860ae8c0a50db42fea01cc1c2216bd36c8 SHA1 3b8316da1a0fa94943e6b71be709827563af7058 SHA256 0565353e767e253207adb8b5c9be9ba215a628447e075a4dc7bb3183ed099d2a +AUX pro-police-docs.patch 3287 RMD160 eef412d92bed145db05bffa3a3e54e2ba74ee50d SHA1 ca58eda97d80f3d51f4e383ad3053fcb13f7a91b SHA256 ec012aed77285545b9d993cba1bc5fdb402c8dc9a17040f48b8b354746ede627 +DIST ecj-4.5.jar 1470676 RMD160 d3f4da657f086b6423f74e93f001132f4855368a SHA1 58c1d79c64c8cd718550f32a932ccfde8d1e6449 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 +DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 RMD160 0a013f95029a170eeea3cb6ccbfd65f64b66f465 SHA1 61bd3c13400772ec4d5d4fcee297e3d86adbd065 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 +DIST gcc-4.5.3-patches-1.1.tar.bz2 20627 RMD160 432101fa66d4be008b6a4c606aea98bd4ae217d3 SHA1 0272e461a5e511d9998085f2b6387d917a151a17 SHA256 171348adbdbf3eeb26f47be414a47591eb332271995a052ef57fccb5742361ec +DIST gcc-4.5.3-piepatches-v0.4.7.tar.bz2 14638 RMD160 3976e2390acb6d0ada68b697150522fa4bc67682 SHA1 326d230873059c635daf8120afeaeeef1bd3cd52 SHA256 fe3414a85b6b0a1e4ff758c008bbefc7411148ccb9af70cb1a0af179eba55a32 +DIST gcc-4.5.3-uclibc-patches-1.0.tar.bz2 3015 RMD160 af8fad2ca0a948f25bff2b4f4f9868a99c7ceae7 SHA1 679698942814c9b3caaa5d220d672c87df50fa26 SHA256 7ddb8ac57b42c0de07a9afb3338c05d884da3c606f80cf21ee767f9c4682e3f6 +DIST gcc-4.5.3.tar.bz2 66374586 RMD160 d07aa90f2186b4e082dfd5ad5d5188c097fb6247 SHA1 73c45dfda5eef6b124be53e56828b5925198cc1b SHA256 0a8847af44a9b33813b199997a73139517c96adfd519eaf24c79d4d9d09f65de +DIST gcc-4.6.2-patches-1.0.tar.bz2 12374 RMD160 84aa2e55a8762e2d38161943e1661fd7a89683a8 SHA1 582f0c4bf7b734bb5798b0b8b9deac898557789d SHA256 a6fd308469094095891ba003b9c3c2d4c8bf35713df987609b675f04a43e83df +DIST gcc-4.6.2-piepatches-v0.4.5.tar.bz2 14156 RMD160 101546367ae798f9080d111e4f9ccc0914ec74c8 SHA1 2ad14aa580d65cbc7dd35b5d05977890e9fb1679 SHA256 a18bea1bc2cad2efde5481a5777a97cf539d206dcbca33758d56d7fbdb43a554 +DIST gcc-4.6.2-uclibc-patches-1.0.tar.bz2 3019 RMD160 7e991775c15d4126bd8d85aceb677c675559606f SHA1 0d316aaf94966cc52b1582282723a932ac065639 SHA256 25e902a6d2db7181394df5ad11fafaad064bf28a6ffebd889033f744613ac201 +DIST gcc-4.6.2.tar.bz2 71995338 RMD160 e7041933b39629f9524848dcf81a1a4c02a225c6 SHA1 691974613b1c1f15ed0182ec539fa54a12dd6f93 SHA256 60b05463dfe18d40d68fb8a71b25b408a01f86cc6ceaf5e6b22238b6b0f450c2 +DIST gcc-4.6.3-patches-1.3.tar.bz2 83071 RMD160 4e8c94ce83421ed1138439f946321763803b3157 SHA1 b05f96f1741828fb13ca23f0bd057223de1908ab SHA256 0acc8494932259dbadc118587626bb2505fc565e1a862bb792116e08961c141a +DIST gcc-4.6.3-piepatches-v0.5.2.tar.bz2 15002 RMD160 75f25287ded26fd8ae88516b0b72d21fc0f17296 SHA1 8a1848819bc9c3e00513e68abded115410f25f78 SHA256 6606d47a8bbaa9cba0dd3b022cbf6ed14325b8560dd17f7601dbaa4697df3691 +DIST gcc-4.6.3-uclibc-patches-1.0.tar.bz2 3023 RMD160 6487e89d892687c51f4d764979c90133ae4c0a07 SHA1 26581caab046ba4a03041557db641f2899d518af SHA256 4219a3582c5f98bf8437bfc3feb8c264f8aabd8078caaddef46dd38be33f089f +DIST gcc-4.6.3.tar.bz2 71999439 RMD160 9abb2f940d08fc84f2d91b6a6ce8d662ca889269 SHA1 ce317ca5c8185b58bc9300182b534608c578637f SHA256 e8f5853d4eec2f5ebaf8a72ae4d53c436aacf98153b2499f8635b48c4718a093 +EBUILD base-gcc-4.5.3-r2.ebuild 4481 RMD160 253e913d84ea216f1f6f4ce6ba22db93b0158eab SHA1 fae5c11e489e17b4a3c8eeb19dad7a253d8ac259 SHA256 c3a139f9d4f8a96f96b50921ffd5aff131e949807dcad60480d883721cfcffff +EBUILD base-gcc-4.6.2.ebuild 4605 RMD160 b49258fd5e27cd84a2ea7b4ad0202daacd3f611a SHA1 fc5db91c140f26c995caf709239104f9460c92bc SHA256 ccd02cc3a9d6c8bac9ae9ee294c0744bc5173b92007d96b6bd9d0836225e7b1a +EBUILD base-gcc-4.6.3.ebuild 5972 RMD160 77181ebd015794f73c04aac7dd6e0f97f8618bee SHA1 889e2eefe229c4e3c51762065e3375ad7e4943a5 SHA256 5550e6d45454b2396704b0dfae3dbb856c4ef8fefe79492d5111192f9b226ee7 +MISC metadata.xml 1780 RMD160 0fa658c47436e17235cd03b5a9a3cbd8448e474b SHA1 127adff4704c040ee42d43bd9ea8218b408203cf SHA256 57d7428c3d0ef34e72e780a3cfa7a059202b5c80f2d61cc12f90f0d1e8f5f12e diff --git a/sys-devel/base-gcc/base-gcc-4.5.3-r2.ebuild b/sys-devel/base-gcc/base-gcc-4.5.3-r2.ebuild new file mode 100644 index 00000000..1b3ecc74 --- /dev/null +++ b/sys-devel/base-gcc/base-gcc-4.5.3-r2.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PATCH_VER="1.1" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.4.7" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" +SSP_STABLE="amd64 x86 ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +SSP_UCLIBC_STABLE="" +#end Hardened stuff + +inherit toolchain + +DESCRIPTION="The GNU Compiler Collection" + +LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" +KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" + +RDEPEND=">=sys-libs/zlib-1.1.4 + >=sys-devel/gcc-config-1.4 + virtual/libiconv + >=dev-libs/gmp-4.3.2 + >=dev-libs/mpfr-2.4.2 + >=dev-libs/mpc-0.8.1 + graphite? ( + >=dev-libs/ppl-0.10 + >=dev-libs/cloog-ppl-0.15.8 + ) + lto? ( || ( >=dev-libs/elfutils-0.143 dev-libs/libelf ) ) + !build? ( + >=sys-libs/ncurses-5.2-r2 + nls? ( sys-devel/gettext ) + )" + +DEPEND="${RDEPEND} + test? ( >=dev-util/dejagnu-1.4.4 >=sys-devel/autogen-5.5.4 ) + >=sys-apps/texinfo-4.8 + >=sys-devel/bison-1.875 + elibc_glibc? ( >=sys-libs/glibc-2.8 ) + ppc? ( >=${CATEGORY}/binutils-2.17 ) + ppc64? ( >=${CATEGORY}/binutils-2.17 ) + >=${CATEGORY}/binutils-2.15.94" +PDEPEND=">=sys-devel/gcc-config-1.4" + +## No changes +src_unpack() { + toolchain_src_unpack + + use vanilla && return 0 + + sed -i 's/use_fixproto=yes/:/' gcc/config.gcc #PR33200 + + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch +} + +## Remove lto conditional +pkg_setup() { + toolchain_pkg_setup +} + +## Just install libgcc stuff +src_install() { + cd "${WORKDIR}/build" + S="${WORKDIR}"/build \ + emake -j1 -C "${CTARGET}/libgcc" DESTDIR="${D}" install-shared || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgcc" DESTDIR="${D}" \ + install-shared || die + fi + + if use mudflap; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libmudflap" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libmudflap" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + fi + + if use openmp; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgomp" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + fi + + S="${WORKDIR}"/build \ + emake -j1 -C "${CTARGET}/libstdc++-v3/src" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libstdc++-v3/src" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + + + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libstdc++-v3/po" DESTDIR="${D}" install || die + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" install-info || die + + # GCC 4.6 only + #S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libquadmath || die + if use fortran; then + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libgfortran || die + fi + # TODO: what to do with USE objc++ and objc-gc ? + if use objc; then + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libobjc || die + fi + + # from toolchain.eclass yay + gcc_movelibs + + dodir /etc/env.d/gcc + create_gcc_env_entry + + # Setup the gcc_env_entry for hardened gcc 4 with minispecs + if want_minispecs ; then + copy_minispecs_gcc_specs + fi + + # drop any .la, .a + find "${D}" -name *.a -delete + find "${D}" -name *.la -delete + + # drop any include + rm "${D}${LIBPATH}"/include -rf + + # drop specs as well, provided by sys-devel/gcc-${PV}:${SLOT} + # unfortunately, the spec shit above does create the env.d/ + # file content... + rm "${D}${LIBPATH}"/{32/,}*.spec{s,} -rf + rm "${D}${LIBPATH}"/specs -rf + + # Now do the fun stripping stuff + env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}" + + cd "${S}" + if ! is_crosscompile; then + has noinfo ${FEATURES} \ + && rm -r "${D}/${DATAPATH}"/info \ + || prepinfo "${DATAPATH}" + fi + + # use gid of 0 because some stupid ports don't have + # the group 'root' set to gid 0 + chown -R root:0 "${D}"${LIBPATH} +} + +## Do nothing! +pkg_preinst() { + : +} + +## Do nothing! +pkg_postinst() { + : +} + +## Do nothing! +pkg_prerm() { + : +} + +## Do nothing! +pkg_postrm() { + : +} diff --git a/sys-devel/base-gcc/base-gcc-4.6.2.ebuild b/sys-devel/base-gcc/base-gcc-4.6.2.ebuild new file mode 100644 index 00000000..4dade5d1 --- /dev/null +++ b/sys-devel/base-gcc/base-gcc-4.6.2.ebuild @@ -0,0 +1,184 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PATCH_VER="1.0" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.4.5" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" +SSP_STABLE="amd64 x86 ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +SSP_UCLIBC_STABLE="" +#end Hardened stuff + +inherit eutils toolchain + +# This is here to redeclare is_gcc() in toolchain.eclass +# We don't even want to build gcj, which is a real hog +# on memory constrained hardware. base-gcc doesn't actually +# ship with it atm. +is_gcj() { + return 1 +} + +DESCRIPTION="The GNU Compiler Collection" + +LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" +KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" + +RDEPEND=">=sys-libs/zlib-1.1.4 + virtual/libiconv + >=dev-libs/gmp-4.3.2 + >=dev-libs/mpfr-2.4.2 + >=dev-libs/mpc-0.8.1 + graphite? ( + >=dev-libs/cloog-ppl-0.15.10 + >=dev-libs/ppl-0.11 + ) + !build? ( + nls? ( sys-devel/gettext ) + )" + +DEPEND="${RDEPEND} + test? ( + >=dev-util/dejagnu-1.4.4 + >=sys-devel/autogen-5.5.4 + ) + >=sys-apps/texinfo-4.8 + >=sys-devel/bison-1.875 + >=sys-devel/flex-2.5.4 + >=${CATEGORY}/binutils-2.18" +PDEPEND=">=sys-devel/gcc-config-1.4 + go? ( >=sys-devel/gcc-config-1.5 )" + +## No changes +src_unpack() { + toolchain_src_unpack + + use vanilla && return 0 + + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch +} + +## Remove lto conditional +pkg_setup() { + toolchain_pkg_setup + + ewarn + ewarn "LTO support is still experimental and unstable." + ewarn "Any bugs resulting from the use of LTO will not be fixed." + ewarn +} + +## Just install libgcc stuff +src_install() { + cd "${WORKDIR}/build" + S="${WORKDIR}"/build \ + emake -j1 -C "${CTARGET}/libgcc" DESTDIR="${D}" install-shared || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgcc" DESTDIR="${D}" \ + install-shared || die + fi + + if use mudflap; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libmudflap" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libmudflap" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + fi + + if use openmp; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgomp" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + fi + + S="${WORKDIR}"/build \ + emake -j1 -C "${CTARGET}/libstdc++-v3/src" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libstdc++-v3/src" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + + + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libstdc++-v3/po" DESTDIR="${D}" install || die + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" install-info || die + + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libquadmath || die + if use fortran; then + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libgfortran || die + fi + # TODO: what to do with USE objc++ and objc-gc ? + if use objc; then + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libobjc || die + fi + + # from toolchain.eclass yay + gcc_movelibs + + dodir /etc/env.d/gcc + create_gcc_env_entry + + # Setup the gcc_env_entry for hardened gcc 4 with minispecs + if want_minispecs ; then + copy_minispecs_gcc_specs + fi + + # drop any .la, .a + find "${D}" -name *.a -delete + find "${D}" -name *.la -delete + + # drop any include + rm "${D}${LIBPATH}"/include -rf + # drop specs as well, provided by sys-devel/gcc-${PV}:${SLOT} + # unfortunately, the spec shit above does create the env.d/ + # file content... + rm "${D}${LIBPATH}"/{32/,}*.spec{s,} -rf + rm "${D}${LIBPATH}"/specs -rf + + # Now do the fun stripping stuff + env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}" + + cd "${S}" + if ! is_crosscompile; then + has noinfo ${FEATURES} \ + && rm -r "${D}/${DATAPATH}"/info \ + || prepinfo "${DATAPATH}" + fi + + # use gid of 0 because some stupid ports don't have + # the group 'root' set to gid 0 + chown -R root:0 "${D}"${LIBPATH} +} + +## Do nothing! +pkg_preinst() { + : +} + +## Do nothing! +pkg_postinst() { + : +} + +## Do nothing! +pkg_prerm() { + : +} + +## Do nothing! +pkg_postrm() { + : +} diff --git a/sys-devel/base-gcc/base-gcc-4.6.3.ebuild b/sys-devel/base-gcc/base-gcc-4.6.3.ebuild new file mode 100644 index 00000000..51b07d01 --- /dev/null +++ b/sys-devel/base-gcc/base-gcc-4.6.3.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PATCH_VER="1.3" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.5.2" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" +SSP_STABLE="amd64 x86 mips ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +# uclibc need to be >= 0.9.32 +SSP_UCLIBC_STABLE="x86 amd64 ppc ppc64 arm" +#end Hardened stuff + +inherit eutils toolchain + +# This is here to redeclare is_gcc() in toolchain.eclass +# We don't even want to build gcj, which is a real hog +# on memory constrained hardware. base-gcc doesn't actually +# ship with it atm. +is_gcj() { + return 1 +} + +DESCRIPTION="The GNU Compiler Collection" + +LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" + +RDEPEND=">=sys-libs/zlib-1.1.4 + virtual/libiconv + >=dev-libs/gmp-4.3.2 + >=dev-libs/mpfr-2.4.2 + >=dev-libs/mpc-0.8.1 + graphite? ( + >=dev-libs/cloog-ppl-0.15.10 + >=dev-libs/ppl-0.11 + ) + !build? ( + nls? ( sys-devel/gettext ) + )" + +DEPEND="${RDEPEND} + test? ( + >=dev-util/dejagnu-1.4.4 + >=sys-devel/autogen-5.5.4 + ) + >=sys-apps/texinfo-4.8 + >=sys-devel/bison-1.875 + >=sys-devel/flex-2.5.4 + >=${CATEGORY}/binutils-2.18" +PDEPEND=">=sys-devel/gcc-config-1.4 + go? ( >=sys-devel/gcc-config-1.5 )" + +## Check for valid gcc profile. +src_unpack() { + # Since Sabayon's gcc ebuild are split into two parts, we have to + # build gcc with a different version of gcc, or terrible breakage + # will occur after sys-devel/base-gcc is installed, but the + # partner sys-devel/gcc still needs to be built. + + # While it is possible to rebuild Sabayon's split gcc from + # the same version, we have to disallow this also since + # we have no way of discerning if a configuration change + # is significant enough to cause breakage. + + GCC_PROFILE_VER=$(cat ${ROOT}/etc/env.d/gcc/config-$CHOST | awk -F- '{ print $NF }') + einfo "Checking for valid gcc profile to build ${P}" + + # Construct the Slot of the gcc version in the active profile. + GCC_PROFILE_SLOT_MAJOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $1 }') + GCC_PROFILE_SLOT_MINOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $2 }') + GCC_PROFILE_SLOT="${GCC_PROFILE_SLOT_MAJOR}.${GCC_PROFILE_SLOT_MINOR}" + einfo "Current gcc profile version Slot is: ${GCC_PROFILE_SLOT}" + if [[ "${GCC_PROFILE_SLOT}" = "${SLOT}" ]] ; then + eerror "Error!" + eerror "The active gcc-profile is for sys-devel/gcc slot ${SLOT}." + eerror "Sabayon's split sys-devel/gcc package MUST be built" + eerror "with another slotted version of sys-devel/gcc active." + die "Invalid gcc profile selected!" + fi + + toolchain_src_unpack + + use vanilla && return 0 + + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch +} + +## Remove lto conditional +pkg_setup() { + toolchain_pkg_setup + + ewarn + ewarn "LTO support is still experimental and unstable." + ewarn "Any bugs resulting from the use of LTO will not be fixed." + ewarn +} + +## Just install libgcc stuff +src_install() { + cd "${WORKDIR}/build" + S="${WORKDIR}"/build \ + emake -j1 -C "${CTARGET}/libgcc" DESTDIR="${D}" install-shared || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgcc" DESTDIR="${D}" \ + install-shared || die + fi + + if use mudflap; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libmudflap" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libmudflap" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + fi + + if use openmp; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgomp" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + fi + + S="${WORKDIR}"/build \ + emake -j1 -C "${CTARGET}/libstdc++-v3/src" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libstdc++-v3/src" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libstdc++-v3/po" DESTDIR="${D}" install || die + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" install-info || die + + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libquadmath || die + if use fortran; then + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libgfortran || die + fi + # TODO: what to do with USE objc++ and objc-gc ? + if use objc; then + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libobjc || die + fi + + # from toolchain.eclass yay + gcc_movelibs + + dodir /etc/env.d/gcc + create_gcc_env_entry + + # Setup the gcc_env_entry for hardened gcc 4 with minispecs + if want_minispecs ; then + copy_minispecs_gcc_specs + fi + + # drop any .la, .a + find "${D}" -name *.a -delete + find "${D}" -name *.la -delete + + # drop any include + rm "${D}${LIBPATH}"/include -rf + # drop specs as well, provided by sys-devel/gcc-${PV}:${SLOT} + # unfortunately, the spec shit above does create the env.d/ + # file content... + rm "${D}${LIBPATH}"/{32/,}*.spec{s,} -rf + rm "${D}${LIBPATH}"/specs -rf + + # Now do the fun stripping stuff + env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}" + + cd "${S}" + if ! is_crosscompile; then + has noinfo ${FEATURES} \ + && rm -r "${D}/${DATAPATH}"/info \ + || prepinfo "${DATAPATH}" + fi + + # use gid of 0 because some stupid ports don't have + # the group 'root' set to gid 0 + chown -R root:0 "${D}"${LIBPATH} +} + +## Do nothing! +pkg_preinst() { + : +} + +## Do nothing! +pkg_postinst() { + : +} + +## Do nothing! +pkg_prerm() { + : +} + +## Do nothing! +pkg_postrm() { + : +} diff --git a/sys-devel/base-gcc/base-gcc-4.7.2.ebuild b/sys-devel/base-gcc/base-gcc-4.7.2.ebuild new file mode 100644 index 00000000..51b07d01 --- /dev/null +++ b/sys-devel/base-gcc/base-gcc-4.7.2.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PATCH_VER="1.3" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.5.2" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" +SSP_STABLE="amd64 x86 mips ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +# uclibc need to be >= 0.9.32 +SSP_UCLIBC_STABLE="x86 amd64 ppc ppc64 arm" +#end Hardened stuff + +inherit eutils toolchain + +# This is here to redeclare is_gcc() in toolchain.eclass +# We don't even want to build gcj, which is a real hog +# on memory constrained hardware. base-gcc doesn't actually +# ship with it atm. +is_gcj() { + return 1 +} + +DESCRIPTION="The GNU Compiler Collection" + +LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" + +RDEPEND=">=sys-libs/zlib-1.1.4 + virtual/libiconv + >=dev-libs/gmp-4.3.2 + >=dev-libs/mpfr-2.4.2 + >=dev-libs/mpc-0.8.1 + graphite? ( + >=dev-libs/cloog-ppl-0.15.10 + >=dev-libs/ppl-0.11 + ) + !build? ( + nls? ( sys-devel/gettext ) + )" + +DEPEND="${RDEPEND} + test? ( + >=dev-util/dejagnu-1.4.4 + >=sys-devel/autogen-5.5.4 + ) + >=sys-apps/texinfo-4.8 + >=sys-devel/bison-1.875 + >=sys-devel/flex-2.5.4 + >=${CATEGORY}/binutils-2.18" +PDEPEND=">=sys-devel/gcc-config-1.4 + go? ( >=sys-devel/gcc-config-1.5 )" + +## Check for valid gcc profile. +src_unpack() { + # Since Sabayon's gcc ebuild are split into two parts, we have to + # build gcc with a different version of gcc, or terrible breakage + # will occur after sys-devel/base-gcc is installed, but the + # partner sys-devel/gcc still needs to be built. + + # While it is possible to rebuild Sabayon's split gcc from + # the same version, we have to disallow this also since + # we have no way of discerning if a configuration change + # is significant enough to cause breakage. + + GCC_PROFILE_VER=$(cat ${ROOT}/etc/env.d/gcc/config-$CHOST | awk -F- '{ print $NF }') + einfo "Checking for valid gcc profile to build ${P}" + + # Construct the Slot of the gcc version in the active profile. + GCC_PROFILE_SLOT_MAJOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $1 }') + GCC_PROFILE_SLOT_MINOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $2 }') + GCC_PROFILE_SLOT="${GCC_PROFILE_SLOT_MAJOR}.${GCC_PROFILE_SLOT_MINOR}" + einfo "Current gcc profile version Slot is: ${GCC_PROFILE_SLOT}" + if [[ "${GCC_PROFILE_SLOT}" = "${SLOT}" ]] ; then + eerror "Error!" + eerror "The active gcc-profile is for sys-devel/gcc slot ${SLOT}." + eerror "Sabayon's split sys-devel/gcc package MUST be built" + eerror "with another slotted version of sys-devel/gcc active." + die "Invalid gcc profile selected!" + fi + + toolchain_src_unpack + + use vanilla && return 0 + + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch +} + +## Remove lto conditional +pkg_setup() { + toolchain_pkg_setup + + ewarn + ewarn "LTO support is still experimental and unstable." + ewarn "Any bugs resulting from the use of LTO will not be fixed." + ewarn +} + +## Just install libgcc stuff +src_install() { + cd "${WORKDIR}/build" + S="${WORKDIR}"/build \ + emake -j1 -C "${CTARGET}/libgcc" DESTDIR="${D}" install-shared || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgcc" DESTDIR="${D}" \ + install-shared || die + fi + + if use mudflap; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libmudflap" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libmudflap" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + fi + + if use openmp; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgomp" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + fi + + S="${WORKDIR}"/build \ + emake -j1 -C "${CTARGET}/libstdc++-v3/src" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + if use multilib; then + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libstdc++-v3/src" DESTDIR="${D}" \ + install-toolexeclibLTLIBRARIES || die + fi + + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libstdc++-v3/po" DESTDIR="${D}" install || die + S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" install-info || die + + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libquadmath || die + if use fortran; then + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libgfortran || die + fi + # TODO: what to do with USE objc++ and objc-gc ? + if use objc; then + S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libobjc || die + fi + + # from toolchain.eclass yay + gcc_movelibs + + dodir /etc/env.d/gcc + create_gcc_env_entry + + # Setup the gcc_env_entry for hardened gcc 4 with minispecs + if want_minispecs ; then + copy_minispecs_gcc_specs + fi + + # drop any .la, .a + find "${D}" -name *.a -delete + find "${D}" -name *.la -delete + + # drop any include + rm "${D}${LIBPATH}"/include -rf + # drop specs as well, provided by sys-devel/gcc-${PV}:${SLOT} + # unfortunately, the spec shit above does create the env.d/ + # file content... + rm "${D}${LIBPATH}"/{32/,}*.spec{s,} -rf + rm "${D}${LIBPATH}"/specs -rf + + # Now do the fun stripping stuff + env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}" + + cd "${S}" + if ! is_crosscompile; then + has noinfo ${FEATURES} \ + && rm -r "${D}/${DATAPATH}"/info \ + || prepinfo "${DATAPATH}" + fi + + # use gid of 0 because some stupid ports don't have + # the group 'root' set to gid 0 + chown -R root:0 "${D}"${LIBPATH} +} + +## Do nothing! +pkg_preinst() { + : +} + +## Do nothing! +pkg_postinst() { + : +} + +## Do nothing! +pkg_prerm() { + : +} + +## Do nothing! +pkg_postrm() { + : +} diff --git a/sys-devel/base-gcc/files/awk/fixlafiles.awk b/sys-devel/base-gcc/files/awk/fixlafiles.awk new file mode 100644 index 00000000..ffade966 --- /dev/null +++ b/sys-devel/base-gcc/files/awk/fixlafiles.awk @@ -0,0 +1,314 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk,v 1.15 2008/02/19 05:47:29 vapier Exp $ + +# +# Helper functions +# +function printn(string) { + printf("%s", string) +} +function einfo(string) { + printf(" \033[32;01m*\033[0m %s\n", string) +} +function einfon(string) { + printf(" \033[32;01m*\033[0m %s", string) +} +function ewarn(string) { + printf(" \033[33;01m*\033[0m %s\n", string) +} +function ewarnn(string) { + printf(" \033[33;01m*\033[0m %s", string) +} +function eerror(string) { + printf(" \033[31;01m*\033[0m %s\n", string) +} + +# +# assert(condition, errmsg) +# assert that a condition is true. Otherwise exit. +# +function assert(condition, string) { + if (! condition) { + printf("%s:%d: assertion failed: %s\n", + FILENAME, FNR, string) > "/dev/stderr" + _assert_exit = 1 + exit 1 + } +} + +# +# system(command, return) +# wrapper that normalizes return codes ... +# +function dosystem(command, ret) { + ret = 0 + ret = system(command) + if (ret == 0) + return 1 + else + return 0 +} + +BEGIN { + # + # Get our variables from environment + # + OLDVER = ENVIRON["OLDVER"] + OLDCHOST = ENVIRON["OLDCHOST"] + + if (OLDVER == "") { + eerror("Could not get OLDVER!"); + exit 1 + } + + # Setup some sane defaults + LIBCOUNT = 2 + HAVE_GCC34 = 0 + DIRLIST[1] = "/lib" + DIRLIST[2] = "/usr/lib" + + # + # Walk /etc/ld.so.conf to discover all our library paths + # + pipe = "cat /etc/ld.so.conf | sort 2>/dev/null" + while(((pipe) | getline ldsoconf_data) > 0) { + if (ldsoconf_data !~ /^[[:space:]]*#/) { + if (ldsoconf_data == "") continue + + # Remove any trailing comments + sub(/#.*$/, "", ldsoconf_data) + # Remove any trailing spaces + sub(/[[:space:]]+$/, "", ldsoconf_data) + + # If there's more than one path per line, split + # it up as if they were sep lines + split(ldsoconf_data, nodes, /[:,[:space:]]/) + + # Now add the rest from ld.so.conf + for (x in nodes) { + # wtf does this line do ? + sub(/=.*/, "", nodes[x]) + # Prune trailing / + sub(/\/$/, "", nodes[x]) + + if (nodes[x] == "") continue + + # + # Drop the directory if its a child directory of + # one that was already added ... + # For example, if we have: + # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss + # We really just want to save /usr/lib /usr/libexec + # + CHILD = 0 + for (y in DIRLIST) { + if (nodes[x] ~ "^" DIRLIST[y] "(/|$)") { + CHILD = 1 + break + } + } + if (CHILD) continue + + DIRLIST[++LIBCOUNT] = nodes[x] + } + } + } + close(pipe) + + # + # Get line from gcc's output containing CHOST + # + pipe = "gcc -print-file-name=libgcc.a 2>/dev/null" + if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) { + close(pipe) + + # If we fail to get the CHOST, see if we can get the CHOST + # portage thinks we are using ... + pipe = "/usr/bin/portageq envvar 'CHOST'" + assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST") + } else { + # Check pre gcc-3.4.x versions + CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST) + + if (CHOST == TMP_CHOST || CHOST == "") { + # Check gcc-3.4.x or later + CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST); + + if (CHOST == TMP_CHOST || CHOST == "") + CHOST = "" + else + HAVE_GCC34 = 1 + } + } + close(pipe) + + if (CHOST == "") { + eerror("Could not get gcc's CHOST!") + exit 1 + } + + if (OLDCHOST != "") + if (OLDCHOST == CHOST) + OLDCHOST = "" + + GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/" + GCCLIBPREFIX_NEW = "/usr/lib/gcc/" + + if (HAVE_GCC34) + GCCLIBPREFIX = GCCLIBPREFIX_NEW + else + GCCLIBPREFIX = GCCLIBPREFIX_OLD + + GCCLIB = GCCLIBPREFIX CHOST + + if (OLDCHOST != "") { + OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST + OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST + } + + # Get current gcc's version + pipe = "gcc -dumpversion" + assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)") + close(pipe) + + if (NEWVER == "") { + eerror("Could not get gcc's version!") + exit 1 + } + + # Nothing to do ? + if ((OLDVER == NEWVER) && (OLDCHOST == "")) + exit 0 + + # + # Ok, now let's scan for the .la files and actually fix them up + # + for (x = 1; x <= LIBCOUNT; x++) { + # Do nothing if the target dir is gcc's internal library path + if (DIRLIST[x] ~ GCCLIBPREFIX_OLD || + DIRLIST[x] ~ GCCLIBPREFIX_NEW) + continue + + einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...") + + pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null" + while (((pipe) | getline la_files) > 0) { + + # Do nothing if the .la file is located in gcc's internal lib path + if (la_files ~ GCCLIBPREFIX_OLD || + la_files ~ GCCLIBPREFIX_NEW) + continue + + CHANGED = 0 + CHOST_CHANGED = 0 + + # See if we need to fix the .la file + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + if ((gsub(OLDGCCLIB1 "[/[:space:]]+", + GCCLIB, la_data) > 0) || + (gsub(OLDGCCLIB2 "[/[:space:]]+", + GCCLIB, la_data) > 0)) { + CHANGED = 1 + CHOST_CHANGED = 1 + } + } + if (OLDVER != NEWVER) { + if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0) || + (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0)) + CHANGED = 1 + } + } + close(la_files) + + # Do the actual changes in a second loop, as we can then + # verify that CHOST_CHANGED among things is correct ... + if (CHANGED) { + ewarnn(" FIXING: " la_files " ...") + + if (CHANGED) + printn("[") + + # Clear the temp file (removing rather than '>foo' is better + # out of a security point of view?) + dosystem("rm -f " la_files ".new") + + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)", + GCCLIB "\\1", "g", la_data) + tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)", + GCCLIB "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + printn("c") + la_data = tmpstr + } + + if (CHOST_CHANGED > 0) { + # We try to be careful about CHOST changes outside + # the gcc library path (meaning we cannot match it + # via /GCCLIBPREFIX CHOST/) ... + + # Catch: + # + # dependency_libs=' -L/usr/CHOST/{bin,lib}' + # + gsub("-L/usr/" OLDCHOST "/", + "-L/usr/" CHOST "/", la_data) + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib' + # + la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/", + "\\1/" CHOST "/", "g", la_data) + } + } + + if (OLDVER != NEWVER) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc/CHOST/VER' + # + tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", la_data) + tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib' + # + # in cases where we have gcc34 + tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + printn("v") + la_data = tmpstr + } + } + + print la_data >> (la_files ".new") + } + + if (CHANGED) + print "]" + + close(la_files) + close(la_files ".new") + + assert(dosystem("mv -f " la_files ".new " la_files), + "dosystem(\"mv -f " la_files ".new " la_files "\")") + } + } + + close(pipe) + } +} + +# vim:ts=4 diff --git a/sys-devel/base-gcc/files/awk/fixlafiles.awk-no_gcc_la b/sys-devel/base-gcc/files/awk/fixlafiles.awk-no_gcc_la new file mode 100644 index 00000000..346bd16f --- /dev/null +++ b/sys-devel/base-gcc/files/awk/fixlafiles.awk-no_gcc_la @@ -0,0 +1,335 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la,v 1.4 2010/03/19 23:53:07 vapier Exp $ + +# +# Helper functions +# +function printn(string) { + printf("%s", string) +} +function einfo(string) { + printf(" \033[32;01m*\033[0m %s\n", string) +} +function einfon(string) { + printf(" \033[32;01m*\033[0m %s", string) +} +function ewarn(string) { + printf(" \033[33;01m*\033[0m %s\n", string) +} +function ewarnn(string) { + printf(" \033[33;01m*\033[0m %s", string) +} +function eerror(string) { + printf(" \033[31;01m*\033[0m %s\n", string) +} + +# +# assert(condition, errmsg) +# assert that a condition is true. Otherwise exit. +# +function assert(condition, string) { + if (! condition) { + printf("%s:%d: assertion failed: %s\n", + FILENAME, FNR, string) > "/dev/stderr" + _assert_exit = 1 + exit 1 + } +} + +# +# system(command, return) +# wrapper that normalizes return codes ... +# +function dosystem(command, ret) { + ret = 0 + ret = system(command) + if (ret == 0) + return 1 + else + return 0 +} + +# +# parse_ld_conf(config_file) +# +function parse_ld_conf(conf, pipe, ldsoconf_data, CHILD, y) { + pipe = "cd /etc; cat " conf " | sort 2>/dev/null" + while(((pipe) | getline ldsoconf_data) > 0) { + if (ldsoconf_data ~ /^[[:space:]]*#/) + continue + if (ldsoconf_data == "") + continue + + # Handle the "include" keyword + if (ldsoconf_data ~ /^include /) { + sub(/^include /, "", ldsoconf_data) + parse_ld_conf(ldsoconf_data) + continue + } + + # Remove any trailing comments + sub(/#.*$/, "", ldsoconf_data) + # Remove any trailing spaces + sub(/[[:space:]]+$/, "", ldsoconf_data) + # Eat duplicate slashes + sub(/\/\//, "/", ldsoconf_data) + # Prune trailing / + sub(/\/$/, "", ldsoconf_data) + + # + # Drop the directory if its a child directory of + # one that was already added ... + # For example, if we have: + # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss + # We really just want to save /usr/lib /usr/libexec + # + CHILD = 0 + for (y in DIRLIST) { + if (ldsoconf_data ~ "^" DIRLIST[y] "(/|$)") { + CHILD = 1 + break + } + } + if (CHILD) continue + + DIRLIST[++LIBCOUNT] = ldsoconf_data + } + close(pipe) +} + +BEGIN { + # + # Get our variables from environment + # + OLDVER = ENVIRON["OLDVER"] + OLDCHOST = ENVIRON["OLDCHOST"] + + if (OLDVER == "") { + eerror("Could not get OLDVER!"); + exit 1 + } + + # Setup some sane defaults + LIBCOUNT = 2 + HAVE_GCC34 = 0 + DIRLIST[1] = "/lib" + DIRLIST[2] = "/usr/lib" + + # + # Walk /etc/ld.so.conf to discover all our library paths + # + parse_ld_conf("/etc/ld.so.conf") + + # + # Get line from gcc's output containing CHOST + # + pipe = "gcc -print-file-name=libgcc.a 2>/dev/null" + if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) { + close(pipe) + + # If we fail to get the CHOST, see if we can get the CHOST + # portage thinks we are using ... + pipe = "/usr/bin/portageq envvar 'CHOST'" + assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST") + } else { + # Check pre gcc-3.4.x versions + CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST) + + if (CHOST == TMP_CHOST || CHOST == "") { + # Check gcc-3.4.x or later + CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST); + + if (CHOST == TMP_CHOST || CHOST == "") + CHOST = "" + else + HAVE_GCC34 = 1 + } + } + close(pipe) + + if (CHOST == "") { + eerror("Could not get gcc's CHOST!") + exit 1 + } + + if (OLDCHOST != "") + if (OLDCHOST == CHOST) + OLDCHOST = "" + + GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/" + GCCLIBPREFIX_NEW = "/usr/lib/gcc/" + + if (HAVE_GCC34) + GCCLIBPREFIX = GCCLIBPREFIX_NEW + else + GCCLIBPREFIX = GCCLIBPREFIX_OLD + + GCCLIB = GCCLIBPREFIX CHOST + + if (OLDCHOST != "") { + OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST + OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST + } + + # Get current gcc's version + pipe = "gcc -dumpversion" + assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)") + close(pipe) + + if (NEWVER == "") { + eerror("Could not get gcc's version!") + exit 1 + } + + # Nothing to do ? + # NB: Do not check for (OLDVER == NEWVER) anymore, as we might need to + # replace libstdc++.la .... + if ((OLDVER == "") && (OLDCHOST == "")) + exit 0 + + # + # Ok, now let's scan for the .la files and actually fix them up + # + for (x = 1; x <= LIBCOUNT; x++) { + # Do nothing if the target dir is gcc's internal library path + if (DIRLIST[x] ~ GCCLIBPREFIX_OLD || + DIRLIST[x] ~ GCCLIBPREFIX_NEW) + continue + + einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...") + + pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null" + while (((pipe) | getline la_files) > 0) { + + # Do nothing if the .la file is located in gcc's internal lib path + if (la_files ~ GCCLIBPREFIX_OLD || + la_files ~ GCCLIBPREFIX_NEW) + continue + + CHANGED = 0 + CHOST_CHANGED = 0 + + # See if we need to fix the .la file + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + if ((gsub(OLDGCCLIB1 "[/[:space:]]+", + GCCLIB, la_data) > 0) || + (gsub(OLDGCCLIB2 "[/[:space:]]+", + GCCLIB, la_data) > 0)) { + CHANGED = 1 + CHOST_CHANGED = 1 + } + } + if (OLDVER != NEWVER) { + if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0) || + (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0)) + CHANGED = 1 + } + # We now check if we have libstdc++.la, as we remove the + # libtool linker scripts for gcc ... + # We do this last, as we only match the new paths + if (gsub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la", + "-lstdc++", la_data) > 0) + CHANGED = 1 + } + close(la_files) + + # Do the actual changes in a second loop, as we can then + # verify that CHOST_CHANGED among things is correct ... + if (CHANGED) { + ewarnn(" FIXING: " la_files " ...[") + + # Clear the temp file (removing rather than '>foo' is better + # out of a security point of view?) + dosystem("rm -f " la_files ".new") + + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)", + GCCLIB "\\1", "g", la_data) + tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)", + GCCLIB "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + printn("c") + la_data = tmpstr + } + + if (CHOST_CHANGED > 0) { + # We try to be careful about CHOST changes outside + # the gcc library path (meaning we cannot match it + # via /GCCLIBPREFIX CHOST/) ... + + # Catch: + # + # dependency_libs=' -L/usr/CHOST/{bin,lib}' + # + gsub("-L/usr/" OLDCHOST "/", + "-L/usr/" CHOST "/", la_data) + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib' + # + la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/", + "\\1/" CHOST "/", "g", la_data) + } + } + + if (OLDVER != NEWVER) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc/CHOST/VER' + # + tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", la_data) + tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib' + # + # in cases where we have gcc34 + tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + printn("v") + la_data = tmpstr + } + } + + # We now check if we have libstdc++.la, as we remove the + # libtool linker scripts for gcc and any referencese in any + # libtool linker scripts. + # We do this last, as we only match the new paths + tmpstr = gensub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la", + "-lstdc++", "g", la_data); + if (la_data != tmpstr) { + printn("l") + la_data = tmpstr + } + + print la_data >> (la_files ".new") + } + + if (CHANGED) + print "]" + + close(la_files) + close(la_files ".new") + + assert(dosystem("mv -f " la_files ".new " la_files), + "dosystem(\"mv -f " la_files ".new " la_files "\")") + } + } + + close(pipe) + } +} + +# vim:ts=4 diff --git a/sys-devel/base-gcc/files/fix_libtool_files.sh b/sys-devel/base-gcc/files/fix_libtool_files.sh new file mode 100644 index 00000000..c3a3c61f --- /dev/null +++ b/sys-devel/base-gcc/files/fix_libtool_files.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.14 2007/09/06 11:00:44 uberlord Exp $ + +usage() { +cat << "USAGE_END" +Usage: fix_libtool_files.sh <old-gcc-version> [--oldarch <old-CHOST>] + + Where <old-gcc-version> is the version number of the + previous gcc version. For example, if you updated to + gcc-3.2.1, and you had gcc-3.2 installed, run: + + # fix_libtool_files.sh 3.2 + + If you updated to gcc-3.2.3, and the old CHOST was i586-pc-linux-gnu + but you now have CHOST as i686-pc-linux-gnu, run: + + # fix_libtool_files.sh 3.2 --oldarch i586-pc-linux-gnu + + Note that if only the CHOST and not the version changed, you can run + it with the current version and the '--oldarch <old-CHOST>' arguments, + and it will do the expected: + + # fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu + +USAGE_END + exit 1 +} + +if [[ $2 != "--oldarch" && $# -ne 1 ]] || \ + [[ $2 == "--oldarch" && $# -ne 3 ]] +then + usage +fi + +ARGV1=$1 +ARGV2=$2 +ARGV3=$3 + +source /etc/profile || exit 1 +source /etc/init.d/functions.sh || exit 1 + +if [[ ${EUID} -ne 0 ]] ; then + eerror "${0##*/}: Must be root." + exit 1 +fi + +# make sure the files come out sane +umask 0022 + +if [[ ${ARGV2} == "--oldarch" ]] && [[ -n ${ARGV3} ]] ; then + OLDCHOST=${ARGV3} +else + OLDCHOST= +fi + +AWKDIR="/lib/rcscripts/awk" + +if [[ ! -r ${AWKDIR}/fixlafiles.awk ]] ; then + eerror "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!" + exit 1 +fi + +OLDVER=${ARGV1} + +export OLDVER OLDCHOST + +einfo "Scanning libtool files for hardcoded gcc library paths..." +gawk -f "${AWKDIR}/fixlafiles.awk" + +# vim:ts=4 diff --git a/sys-devel/base-gcc/files/gcc-configure-LANG.patch b/sys-devel/base-gcc/files/gcc-configure-LANG.patch new file mode 100644 index 00000000..d1b1b035 --- /dev/null +++ b/sys-devel/base-gcc/files/gcc-configure-LANG.patch @@ -0,0 +1,64 @@ +The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in +option parsing, it may break. + +http://bugs.gentoo.org/103483 + +--- configure ++++ configure +@@ -54,6 +54,19 @@ + infodir='${prefix}/info' + mandir='${prefix}/man' + ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then ++ eval $as_var=C; export $as_var ++ else ++ unset $as_var ++ fi ++done ++ + # Initialize some other variables. + subdirs= + MFLAGS= MAKEFLAGS= +@@ -452,16 +463,6 @@ + esac + done + +-# NLS nuisances. +-# Only set these to C if already set. These must not be set unconditionally +-# because not all systems understand e.g. LANG=C (notably SCO). +-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +-# Non-C LC_CTYPE values break the ctype check. +-if test "${LANG+set}" = set; then LANG=C; export LANG; fi +-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +- + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. +@@ -1850,6 +1850,19 @@ + # Compiler output produced by configure, useful for debugging + # configure, is in ./config.log if it exists. + ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then ++ eval \$as_var=C; export \$as_var ++ else ++ unset \$as_var ++ fi ++done ++ + ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" + for ac_option + do diff --git a/sys-devel/base-gcc/files/gcc-configure-texinfo.patch b/sys-devel/base-gcc/files/gcc-configure-texinfo.patch new file mode 100644 index 00000000..ddc098dd --- /dev/null +++ b/sys-devel/base-gcc/files/gcc-configure-texinfo.patch @@ -0,0 +1,16 @@ +Chances are quite good that the installed makeinfo is sufficient. +So ignore false positives where the makeinfo installed is so new +that it violates the cheesy version grep. + +http://bugs.gentoo.org/198182 + +--- configure ++++ configure +@@ -3573,6 +3573,6 @@ + : + else +- MAKEINFO="$MISSING makeinfo" ++ : + fi + ;; + diff --git a/sys-devel/base-gcc/files/gcc-spec-env.patch b/sys-devel/base-gcc/files/gcc-spec-env.patch new file mode 100644 index 00000000..57e7567e --- /dev/null +++ b/sys-devel/base-gcc/files/gcc-spec-env.patch @@ -0,0 +1,42 @@ + Add support for external spec file via the GCC_SPECS env var. This + allows us to easily control pie/ssp defaults with gcc-config profiles. + + Original patch by Rob Holland + Extended to support multiple entries separated by ':' by Kevin F. Quinn + Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill + +--- gcc-4/gcc/gcc.c ++++ gcc-4/gcc/gcc.c +@@ -6482,6 +6482,32 @@ + + /* Process any user specified specs in the order given on the command + line. */ ++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32)) ++ /* Add specs listed in GCC_SPECS. Note; in the process of separating ++ * each spec listed, the string is overwritten at token boundaries ++ * (':') with '\0', an effect of strtok_r(). ++ */ ++ specs_file = getenv ("GCC_SPECS"); ++ if (specs_file && (strlen(specs_file) > 0)) ++ { ++ char *spec, *saveptr; ++ for (spec=strtok_r(specs_file,":",&saveptr); ++ spec!=NULL; ++ spec=strtok_r(NULL,":",&saveptr)) ++ { ++ struct user_specs *user = (struct user_specs *) ++ xmalloc (sizeof (struct user_specs)); ++ ++ user->next = (struct user_specs *) 0; ++ user->filename = spec; ++ if (user_specs_tail) ++ user_specs_tail->next = user; ++ else ++ user_specs_head = user; ++ user_specs_tail = user; ++ } ++ } ++#endif + for (uptr = user_specs_head; uptr; uptr = uptr->next) + { + char *filename = find_a_file (&startfile_prefixes, uptr->filename, diff --git a/sys-devel/base-gcc/files/mkinfodir b/sys-devel/base-gcc/files/mkinfodir new file mode 100644 index 00000000..a62840ee --- /dev/null +++ b/sys-devel/base-gcc/files/mkinfodir @@ -0,0 +1,233 @@ +#!/bin/bash +# $Id: mkinfodir,v 1.1 2001/09/01 07:56:19 drobbins Exp $ +# Generate the top-level Info node, given a directory of Info files +# and (optionally) a skeleton file. The output will be suitable for a +# top-level dir file. The skeleton file contains info topic names in the +# order they should appear in the output. There are three special +# lines that alter the behavior: a line consisting of just "--" causes +# the next line to be echoed verbatim to the output. A line +# containing just "%%" causes all the remaining filenames (wildcards +# allowed) in the rest of the file to be ignored. A line containing +# just "!!" exits the script when reached (unless preceded by a line +# containing just "--"). Once the script reaches the end of the +# skeleton file, it goes through the remaining files in the directory +# in order, putting their entries at the end. The script will use the +# ENTRY information in each info file if it exists. Otherwise it will +# make a minimal entry. + +# sent by Jeffrey Osier <jeffrey@cygnus.com>, who thinks it came from +# zoo@winternet.com (david d `zoo' zuhn) + +# modified 7 April 1995 by Joe Harrington <jh@tecate.gsfc.nasa.gov> to +# take special flags + +INFODIR=$1 +if [ $# = 2 ] ; then + SKELETON=$2 +else + SKELETON=/dev/null +fi + +skip= + +if [ $# -gt 2 ] ; then + echo usage: $0 info-directory [ skeleton-file ] 1>&2 + exit 1 +elif [ -z "${INFODIR}" ] ; then + INFODIR="%%DEFAULT_INFO_DIR%%" +else + true +fi + +if [ ! -d ${INFODIR} ] ; then + echo "$0: first argument must specify a directory" + exit 1 +fi + +### output the dir header +echo "-*- Text -*-" +echo "This file was generated automatically by $0." +echo "This version was generated on `date`" +echo "by `whoami`@`hostname` for `(cd ${INFODIR}; pwd)`" + +cat << moobler +\$Id: mkinfodir,v 1.1 2001/09/01 07:56:19 drobbins Exp $ +This is the file .../info/dir, which contains the topmost node of the +Info hierarchy. The first time you invoke Info you start off +looking at that node, which is (dir)Top. + +File: dir Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "?" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs<Return>" visits the Emacs topic, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: The list of major topics begins on the next line. + +moobler + +### go through the list of files in the skeleton. If an info file +### exists, grab the ENTRY information from it. If an entry exists +### use it, otherwise create a minimal dir entry. +### +### Then remove that file from the list of existing files. If any +### additional files remain (ones that don't have a skeleton entry), +### then generate entries for those in the same way, putting the info for +### those at the end.... + +infofiles=`(cd ${INFODIR}; /bin/ls | grep -v '\-[0-9]*\.gz$' | grep -v '\-[0-9]*$' | egrep -v '^dir$|^dir\.info$|^dir\.orig$')` + +# echoing gets clobbered by backquotes; we do it the hard way... +lines=`wc $SKELETON | awk '{print $1}'` +line=1 +while [ $lines -ge $line ] ; do + # Read one line from the file. This is so that we can echo lines with + # whitespace and quoted characters in them. + fileline=`awk NR==$line $SKELETON` + + # flag fancy features + if [ ! -z "$echoline" ] ; then # echo line + echo "$fileline" + fileline= + echoline= + elif [ "${fileline}" = "--" ] ; then # should we echo the next line? + echoline=1 + elif [ "${fileline}" = "%%" ] ; then # eliminate remaining files from dir? + skip=1 + elif [ "${fileline}" = "!!" ] ; then # quit now + exit 0 + fi + + # handle files if they exist + for file in $fileline"" ; do # expand wildcards ("" handles blank lines) + + fname= + + if [ -z "$echoline" -a ! -z "$file" ] ; then + + # Find the file to operate upon. Check both possible names. + infoname=`echo $file | sed 's/\.gz$//'` + infoname=`echo $infoname | sed 's/\.info$//'` + noext= + ext= + if [ -f ${INFODIR}/$infoname ] ; then + noext=$infoname + fi + if [ -f ${INFODIR}/${infoname}.info ] ; then + ext=${infoname}.info + fi + if [ -f ${INFODIR}/${infoname}.info.gz ] ; then + ext=${infoname}.info.gz + fi + # If it exists with both names take what was said in the file. + if [ ! -z "$ext" -a ! -z "$noext" ]; then + fname=$file + warn="### Warning: $ext and $noext both exist! Using ${file}. ###" + elif [ ! \( -z "$ext" -a -z "$noext" \) ]; then + # just take the name if it exists only once + fname=${noext}${ext} + fi + + # if we found something and aren't skipping, do the entry + if [ ! -z "$fname" ] ; then + if [ -z "$skip" ] ; then + + if [ ! -z "$warn" ] ; then # issue any warning + echo $warn + warn= + fi + if [ "${fname##*.}" = "gz" ] ; then + entry=`zcat ${INFODIR}/${fname} | sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ` + else + entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$fname` + fi + if [ ! -z "${entry}" ] ; then + echo "${entry}" + else + echo "* ${infoname}: (${infoname})." + fi + fi + + # remove the name from the directory listing + infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${fname} / /" -e "s/ / /g"` + + fi + + fi + + done + + line=`expr $line + 1` +done + +if [ -z "${infofiles}" ] ; then + exit 0 +elif [ $lines -gt 0 ]; then + echo +fi + +# Sort remaining files by INFO-DIR-SECTION. +prevsect= +filesectdata=`(cd ${INFODIR}; fgrep INFO-DIR-SECTION /dev/null ${infofiles} | \ + fgrep -v 'INFO-DIR-SECTION Miscellaneous' | \ + sort -t: -k2 -k1 | tr ' ' '_')` +for sectdata in ${filesectdata}; do + file=`echo ${sectdata} | cut -d: -f1` + section=`sed -n -e 's/^INFO-DIR-SECTION //p' ${INFODIR}/${file}` + infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${file} / /" -e "s/ / /g"` + + if [ "${prevsect}" != "${section}" ] ; then + if [ ! -z "${prevsect}" ] ; then + echo "" + fi + echo "${section}" + prevsect="${section}" + fi + infoname=`echo $file | sed 's/\.gz$//'` + infoname=`echo $infoname | sed 's/\.info$//'` + if [ "${file##*.}" = "gz" ] ; then + entry=`zcat ${INFODIR}/$file | sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ` + else + entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file` + fi + if [ ! -z "${entry}" ] ; then + echo "${entry}" + elif [ ! -d "${INFODIR}/${file}" ] ; then + echo "* ${infoname}: (${infoname})." + fi +done + +# Process miscellaneous files. +for file in ${infofiles}; do + if [ ! -z "${prevsect}" ] ; then + echo "" + echo "Miscellaneous" + prevsect="" + fi + + infoname=`echo $file | sed 's/\.gz$//'` + infoname=`echo $infoname | sed 's/\.info$//'` + if [ "${file##*.}" = "gz" ] ; then + entry=`zcat ${INFODIR}/${file} | sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d'` + else + entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file` + fi + + + if [ ! -z "${entry}" ] ; then + echo "${entry}" + elif [ ! -d "${INFODIR}/${file}" ] ; then + echo "* ${infoname}: (${infoname})." + fi +done + diff --git a/sys-devel/base-gcc/files/pro-police-docs.patch b/sys-devel/base-gcc/files/pro-police-docs.patch new file mode 100644 index 00000000..091ea44e --- /dev/null +++ b/sys-devel/base-gcc/files/pro-police-docs.patch @@ -0,0 +1,74 @@ +Index: gcc/doc/invoke.texi +=================================================================== +RCS file: /cvsroot/gcc/gcc/gcc/doc/invoke.texi,v +retrieving revision 1.364 +diff -c -3 -p -r1.364 invoke.texi +*** gcc/doc/invoke.texi 21 Nov 2003 11:42:58 -0000 1.364 +--- gcc/doc/invoke.texi 22 Nov 2003 08:12:35 -0000 +*************** in the following sections. +*** 228,234 **** + -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol + -Wparentheses -Wpointer-arith -Wredundant-decls @gol + -Wreturn-type -Wsequence-point -Wshadow @gol +! -Wsign-compare -Wstrict-aliasing @gol + -Wswitch -Wswitch-default -Wswitch-enum @gol + -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol + -Wunknown-pragmas -Wunreachable-code @gol +--- 228,234 ---- + -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol + -Wparentheses -Wpointer-arith -Wredundant-decls @gol + -Wreturn-type -Wsequence-point -Wshadow @gol +! -Wsign-compare -Wstack-protector -Wstrict-aliasing @gol + -Wswitch -Wswitch-default -Wswitch-enum @gol + -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol + -Wunknown-pragmas -Wunreachable-code @gol +*************** in the following sections. +*** 681,686 **** +--- 681,687 ---- + -fshort-double -fshort-wchar @gol + -fverbose-asm -fpack-struct -fstack-check @gol + -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol ++ -fstack-protector -fstack-protector-all @gol + -fargument-alias -fargument-noalias @gol + -fargument-noalias-global -fleading-underscore @gol + -ftls-model=@var{model} @gol +*************** effectively. Often, the problem is that +*** 3014,3019 **** +--- 3015,3024 ---- + complex; GCC will refuse to optimize programs when the optimization + itself is likely to take inordinate amounts of time. + ++ @item -Wstack-protector ++ @opindex Wstack-protector ++ Warn when not issuing stack smashing protection for some reason ++ + @item -Werror + @opindex Werror + Make all warnings into errors. +*************** and grows downwards, you can use the fla +*** 11474,11479 **** +--- 11479,11502 ---- + @option{-fstack-limit-symbol=__stack_limit} and + @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit + of 128KB@. Note that this may only work with the GNU linker. ++ ++ @item -fstack-protector ++ @item -fstack-protector-all ++ @opindex fstack-protector ++ @opindex fstack-protector-all ++ @opindex fno-stack-protector ++ Generate code to protect an application from a stack smashing ++ attack. The features are (1) the insertion of random value next to the ++ frame pointer to detect the integrity of the stack, (2) the reordering ++ of local variables to place buffers after pointers to avoid the ++ corruption of pointers that could be used to further corrupt arbitrary ++ memory locations, (3) the copying of pointers in function arguments to ++ an area preceding local variable buffers to prevent the corruption of ++ pointers that could be used to further corrupt arbitrary memory ++ locations, and the (4) omission of instrumentation code from some ++ functions to decrease the performance overhead. If the integrity ++ would be broken, the program is aborted. If no-stack-protector is ++ specified, instrumentation codes are generated at every functions. + + @cindex aliasing of parameters + @cindex parameters, aliased diff --git a/sys-devel/base-gcc/metadata.xml b/sys-devel/base-gcc/metadata.xml new file mode 100644 index 00000000..8bf5cdbc --- /dev/null +++ b/sys-devel/base-gcc/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <use> + <flag name="d">Enable support for the D programming language</flag> + <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets + in gcc (Warning: significantly increases compile time!)</flag> + <flag name="go">Build the GCC Go language frontend.</flag> + <flag name="graphite">Add support for the framework for loop + optimizations based on a polyhedral intermediate representation</flag> + <flag name="ip28">Enable building a compiler capable of building a kernel + for SGI Indigo2 Impact R10000 (IP28)</flag> + <flag name="ip32r10k">Enable building a compiler capable of building an + experimental kernel for SGI O2 w/ R1x000 CPUs (IP32)</flag> + <flag name="libffi">Build the portable foreign function interface library</flag> + <flag name="lto">Add support for link-time optimizations (unsupported, use + at your own risk).</flag> + <flag name="mudflap">Add support for mudflap, a pointer use checking library</flag> + <flag name="multislot">Allow for SLOTs to include minor version (3.3.4 + instead of just 3.3)</flag> + <flag name="n32">Enable n32 ABI support on mips</flag> + <flag name="n64">Enable n64 ABI support on mips</flag> + <flag name="nopie">Disable PIE support (NOT FOR GENERAL USE)</flag> + <flag name="nossp">Disable SSP support (NOT FOR GENERAL USE)</flag> + <flag name="objc">Build support for the Objective C code language</flag> + <flag name="objc++">Build support for the Objective C++ language</flag> + <flag name="objc-gc">Build support for the Objective C code language Garbage + Collector</flag> + </use> +</pkgmetadata> diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest new file mode 100644 index 00000000..92f42db8 --- /dev/null +++ b/sys-devel/gcc/Manifest @@ -0,0 +1,29 @@ +AUX awk/fixlafiles.awk 7807 RMD160 749402c9c0a0f1e8755067c0e001f69d73edb09f SHA1 5fc91ce11eb93e989ae64470dba602fe534ac409 SHA256 3cae4890a295adef50c6cf8a7e14d1be4e7a2356479c073e5c29433c3cdf9c5c +AUX awk/fixlafiles.awk-no_gcc_la 8596 RMD160 d34279d732586514b220ec0d583c5e634b5d97ef SHA1 95f07ff4d6c3196e682371f02e6d2207d921a1b5 SHA256 91e36c29133b6ff854bc84acd6cd2e9d07be6eaa73ef9b23e4f7bc6371107fab +AUX c89 412 RMD160 2b54e526a76ff0b2e0e8f4f7f9d6949ac45806fa SHA1 6f6ed5affc4ae906c5d8cbdda557d5bbf683d861 SHA256 29ad5dd697135c2892067e780447894dc1cd071708157e46d21773ab99c5022c +AUX c99 446 RMD160 04ecc9ef9b7a1fd525768955ff6a67fc0d5a17f7 SHA1 312b3b47490d9f62656706908112f9331bc509a4 SHA256 057b348cf5be9b4fb9db99a4549f6433c89d21e5f91dc5e46b0b4dc6b70432f5 +AUX fix_libtool_files.sh 1735 RMD160 5035cd4a9995ea6207a8de95815921c3939395bd SHA1 57cd1babab4c6b142dd8cc58b36943442ff2af13 SHA256 b8d86b1db9453dff4c62b3467887bf1e04ecb483120185102122bda2581ed3f5 +AUX gcc-4.6.2-fix-ICE-on-arm.patch 646 RMD160 ffddf3bc7cab3d74cbf31ab441d2e41cb3aa8500 SHA1 a162dc0b7bdee7aba0aadc647beb8d89e9b70990 SHA256 4df58b7f95bca7c850b98b90cf1798bbc2f988e9c86f608aa4c4c2b6a743aa58 +AUX gcc-configure-LANG.patch 2052 RMD160 91f5b90600dfccb10c4e2308a5a1485275fdfeee SHA1 56ecd1d6f2e4bd0b35ac108be72a4f6f60212c38 SHA256 63de6d2dcfe14f21d147abeb1390405b9220c03f8e968f482d4b4c1cf279c88b +AUX gcc-configure-texinfo.patch 337 RMD160 d0e872a9f0ccb5ab51d10f129acd7a19d76a7b75 SHA1 7e267fac540175ce848e563539db8c951cab557b SHA256 74b73a7ecec2d88889876b4db480cd173632f49d5396bb8e5b3c93673f9b5b98 +AUX gcc-spec-env.patch 1544 RMD160 1f7747546513a6d8e16bd82c2824969b9a739dfb SHA1 bdc2736377813da4046ceea77922620dd69d8658 SHA256 64b01f29fb853fee5ecda998b66eeaa7ec86ff1fc3b21432bfd69eb543c93e6a +AUX mkinfodir 7324 RMD160 96bbe8860ae8c0a50db42fea01cc1c2216bd36c8 SHA1 3b8316da1a0fa94943e6b71be709827563af7058 SHA256 0565353e767e253207adb8b5c9be9ba215a628447e075a4dc7bb3183ed099d2a +AUX pro-police-docs.patch 3287 RMD160 eef412d92bed145db05bffa3a3e54e2ba74ee50d SHA1 ca58eda97d80f3d51f4e383ad3053fcb13f7a91b SHA256 ec012aed77285545b9d993cba1bc5fdb402c8dc9a17040f48b8b354746ede627 +DIST ecj-4.5.jar 1470676 RMD160 d3f4da657f086b6423f74e93f001132f4855368a SHA1 58c1d79c64c8cd718550f32a932ccfde8d1e6449 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 +DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 RMD160 0a013f95029a170eeea3cb6ccbfd65f64b66f465 SHA1 61bd3c13400772ec4d5d4fcee297e3d86adbd065 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 +DIST gcc-4.5.3-patches-1.1.tar.bz2 20627 RMD160 432101fa66d4be008b6a4c606aea98bd4ae217d3 SHA1 0272e461a5e511d9998085f2b6387d917a151a17 SHA256 171348adbdbf3eeb26f47be414a47591eb332271995a052ef57fccb5742361ec +DIST gcc-4.5.3-piepatches-v0.4.7.tar.bz2 14638 RMD160 3976e2390acb6d0ada68b697150522fa4bc67682 SHA1 326d230873059c635daf8120afeaeeef1bd3cd52 SHA256 fe3414a85b6b0a1e4ff758c008bbefc7411148ccb9af70cb1a0af179eba55a32 +DIST gcc-4.5.3-uclibc-patches-1.0.tar.bz2 3015 RMD160 af8fad2ca0a948f25bff2b4f4f9868a99c7ceae7 SHA1 679698942814c9b3caaa5d220d672c87df50fa26 SHA256 7ddb8ac57b42c0de07a9afb3338c05d884da3c606f80cf21ee767f9c4682e3f6 +DIST gcc-4.5.3.tar.bz2 66374586 RMD160 d07aa90f2186b4e082dfd5ad5d5188c097fb6247 SHA1 73c45dfda5eef6b124be53e56828b5925198cc1b SHA256 0a8847af44a9b33813b199997a73139517c96adfd519eaf24c79d4d9d09f65de +DIST gcc-4.6.2-patches-1.0.tar.bz2 12374 RMD160 84aa2e55a8762e2d38161943e1661fd7a89683a8 SHA1 582f0c4bf7b734bb5798b0b8b9deac898557789d SHA256 a6fd308469094095891ba003b9c3c2d4c8bf35713df987609b675f04a43e83df +DIST gcc-4.6.2-piepatches-v0.4.5.tar.bz2 14156 RMD160 101546367ae798f9080d111e4f9ccc0914ec74c8 SHA1 2ad14aa580d65cbc7dd35b5d05977890e9fb1679 SHA256 a18bea1bc2cad2efde5481a5777a97cf539d206dcbca33758d56d7fbdb43a554 +DIST gcc-4.6.2-uclibc-patches-1.0.tar.bz2 3019 RMD160 7e991775c15d4126bd8d85aceb677c675559606f SHA1 0d316aaf94966cc52b1582282723a932ac065639 SHA256 25e902a6d2db7181394df5ad11fafaad064bf28a6ffebd889033f744613ac201 +DIST gcc-4.6.2.tar.bz2 71995338 RMD160 e7041933b39629f9524848dcf81a1a4c02a225c6 SHA1 691974613b1c1f15ed0182ec539fa54a12dd6f93 SHA256 60b05463dfe18d40d68fb8a71b25b408a01f86cc6ceaf5e6b22238b6b0f450c2 +DIST gcc-4.6.3-patches-1.3.tar.bz2 83071 RMD160 4e8c94ce83421ed1138439f946321763803b3157 SHA1 b05f96f1741828fb13ca23f0bd057223de1908ab SHA256 0acc8494932259dbadc118587626bb2505fc565e1a862bb792116e08961c141a +DIST gcc-4.6.3-piepatches-v0.5.2.tar.bz2 15002 RMD160 75f25287ded26fd8ae88516b0b72d21fc0f17296 SHA1 8a1848819bc9c3e00513e68abded115410f25f78 SHA256 6606d47a8bbaa9cba0dd3b022cbf6ed14325b8560dd17f7601dbaa4697df3691 +DIST gcc-4.6.3-uclibc-patches-1.0.tar.bz2 3023 RMD160 6487e89d892687c51f4d764979c90133ae4c0a07 SHA1 26581caab046ba4a03041557db641f2899d518af SHA256 4219a3582c5f98bf8437bfc3feb8c264f8aabd8078caaddef46dd38be33f089f +DIST gcc-4.6.3.tar.bz2 71999439 RMD160 9abb2f940d08fc84f2d91b6a6ce8d662ca889269 SHA1 ce317ca5c8185b58bc9300182b534608c578637f SHA256 e8f5853d4eec2f5ebaf8a72ae4d53c436aacf98153b2499f8635b48c4718a093 +EBUILD gcc-4.5.3-r2.ebuild 3435 RMD160 1757d1e88359367810dd3a27aa921b2e329fc8ca SHA1 3f1534bc85393d68e33c301412eb4e2809d5133e SHA256 ce6f171cc959390a354d6466056eba94cde85c909b23dff98554a892df0332b8 +EBUILD gcc-4.6.2.ebuild 4114 RMD160 b9ffb3a8ecea9242393120803026fb99dcea203e SHA1 198c4f778226a2c87285a4a006b941da4631523b SHA256 638237c3c6e70e5357aff1ff19a58183de120cfd658473db431d9037ad3362b7 +EBUILD gcc-4.6.3.ebuild 5495 RMD160 039dbf2a7f5a84ebfb8dc4538eb9c4e3d21d4362 SHA1 4324fe2d0bd26867f0586ca1c866251ff4e58db2 SHA256 82e72b1bff5cf52fd10f2b7be70eb5709ae0635ce5325d30240c2e0aba0fcda1 +MISC metadata.xml 1780 RMD160 0fa658c47436e17235cd03b5a9a3cbd8448e474b SHA1 127adff4704c040ee42d43bd9ea8218b408203cf SHA256 57d7428c3d0ef34e72e780a3cfa7a059202b5c80f2d61cc12f90f0d1e8f5f12e diff --git a/sys-devel/gcc/files/awk/fixlafiles.awk b/sys-devel/gcc/files/awk/fixlafiles.awk new file mode 100644 index 00000000..ffade966 --- /dev/null +++ b/sys-devel/gcc/files/awk/fixlafiles.awk @@ -0,0 +1,314 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk,v 1.15 2008/02/19 05:47:29 vapier Exp $ + +# +# Helper functions +# +function printn(string) { + printf("%s", string) +} +function einfo(string) { + printf(" \033[32;01m*\033[0m %s\n", string) +} +function einfon(string) { + printf(" \033[32;01m*\033[0m %s", string) +} +function ewarn(string) { + printf(" \033[33;01m*\033[0m %s\n", string) +} +function ewarnn(string) { + printf(" \033[33;01m*\033[0m %s", string) +} +function eerror(string) { + printf(" \033[31;01m*\033[0m %s\n", string) +} + +# +# assert(condition, errmsg) +# assert that a condition is true. Otherwise exit. +# +function assert(condition, string) { + if (! condition) { + printf("%s:%d: assertion failed: %s\n", + FILENAME, FNR, string) > "/dev/stderr" + _assert_exit = 1 + exit 1 + } +} + +# +# system(command, return) +# wrapper that normalizes return codes ... +# +function dosystem(command, ret) { + ret = 0 + ret = system(command) + if (ret == 0) + return 1 + else + return 0 +} + +BEGIN { + # + # Get our variables from environment + # + OLDVER = ENVIRON["OLDVER"] + OLDCHOST = ENVIRON["OLDCHOST"] + + if (OLDVER == "") { + eerror("Could not get OLDVER!"); + exit 1 + } + + # Setup some sane defaults + LIBCOUNT = 2 + HAVE_GCC34 = 0 + DIRLIST[1] = "/lib" + DIRLIST[2] = "/usr/lib" + + # + # Walk /etc/ld.so.conf to discover all our library paths + # + pipe = "cat /etc/ld.so.conf | sort 2>/dev/null" + while(((pipe) | getline ldsoconf_data) > 0) { + if (ldsoconf_data !~ /^[[:space:]]*#/) { + if (ldsoconf_data == "") continue + + # Remove any trailing comments + sub(/#.*$/, "", ldsoconf_data) + # Remove any trailing spaces + sub(/[[:space:]]+$/, "", ldsoconf_data) + + # If there's more than one path per line, split + # it up as if they were sep lines + split(ldsoconf_data, nodes, /[:,[:space:]]/) + + # Now add the rest from ld.so.conf + for (x in nodes) { + # wtf does this line do ? + sub(/=.*/, "", nodes[x]) + # Prune trailing / + sub(/\/$/, "", nodes[x]) + + if (nodes[x] == "") continue + + # + # Drop the directory if its a child directory of + # one that was already added ... + # For example, if we have: + # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss + # We really just want to save /usr/lib /usr/libexec + # + CHILD = 0 + for (y in DIRLIST) { + if (nodes[x] ~ "^" DIRLIST[y] "(/|$)") { + CHILD = 1 + break + } + } + if (CHILD) continue + + DIRLIST[++LIBCOUNT] = nodes[x] + } + } + } + close(pipe) + + # + # Get line from gcc's output containing CHOST + # + pipe = "gcc -print-file-name=libgcc.a 2>/dev/null" + if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) { + close(pipe) + + # If we fail to get the CHOST, see if we can get the CHOST + # portage thinks we are using ... + pipe = "/usr/bin/portageq envvar 'CHOST'" + assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST") + } else { + # Check pre gcc-3.4.x versions + CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST) + + if (CHOST == TMP_CHOST || CHOST == "") { + # Check gcc-3.4.x or later + CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST); + + if (CHOST == TMP_CHOST || CHOST == "") + CHOST = "" + else + HAVE_GCC34 = 1 + } + } + close(pipe) + + if (CHOST == "") { + eerror("Could not get gcc's CHOST!") + exit 1 + } + + if (OLDCHOST != "") + if (OLDCHOST == CHOST) + OLDCHOST = "" + + GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/" + GCCLIBPREFIX_NEW = "/usr/lib/gcc/" + + if (HAVE_GCC34) + GCCLIBPREFIX = GCCLIBPREFIX_NEW + else + GCCLIBPREFIX = GCCLIBPREFIX_OLD + + GCCLIB = GCCLIBPREFIX CHOST + + if (OLDCHOST != "") { + OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST + OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST + } + + # Get current gcc's version + pipe = "gcc -dumpversion" + assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)") + close(pipe) + + if (NEWVER == "") { + eerror("Could not get gcc's version!") + exit 1 + } + + # Nothing to do ? + if ((OLDVER == NEWVER) && (OLDCHOST == "")) + exit 0 + + # + # Ok, now let's scan for the .la files and actually fix them up + # + for (x = 1; x <= LIBCOUNT; x++) { + # Do nothing if the target dir is gcc's internal library path + if (DIRLIST[x] ~ GCCLIBPREFIX_OLD || + DIRLIST[x] ~ GCCLIBPREFIX_NEW) + continue + + einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...") + + pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null" + while (((pipe) | getline la_files) > 0) { + + # Do nothing if the .la file is located in gcc's internal lib path + if (la_files ~ GCCLIBPREFIX_OLD || + la_files ~ GCCLIBPREFIX_NEW) + continue + + CHANGED = 0 + CHOST_CHANGED = 0 + + # See if we need to fix the .la file + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + if ((gsub(OLDGCCLIB1 "[/[:space:]]+", + GCCLIB, la_data) > 0) || + (gsub(OLDGCCLIB2 "[/[:space:]]+", + GCCLIB, la_data) > 0)) { + CHANGED = 1 + CHOST_CHANGED = 1 + } + } + if (OLDVER != NEWVER) { + if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0) || + (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0)) + CHANGED = 1 + } + } + close(la_files) + + # Do the actual changes in a second loop, as we can then + # verify that CHOST_CHANGED among things is correct ... + if (CHANGED) { + ewarnn(" FIXING: " la_files " ...") + + if (CHANGED) + printn("[") + + # Clear the temp file (removing rather than '>foo' is better + # out of a security point of view?) + dosystem("rm -f " la_files ".new") + + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)", + GCCLIB "\\1", "g", la_data) + tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)", + GCCLIB "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + printn("c") + la_data = tmpstr + } + + if (CHOST_CHANGED > 0) { + # We try to be careful about CHOST changes outside + # the gcc library path (meaning we cannot match it + # via /GCCLIBPREFIX CHOST/) ... + + # Catch: + # + # dependency_libs=' -L/usr/CHOST/{bin,lib}' + # + gsub("-L/usr/" OLDCHOST "/", + "-L/usr/" CHOST "/", la_data) + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib' + # + la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/", + "\\1/" CHOST "/", "g", la_data) + } + } + + if (OLDVER != NEWVER) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc/CHOST/VER' + # + tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", la_data) + tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib' + # + # in cases where we have gcc34 + tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + printn("v") + la_data = tmpstr + } + } + + print la_data >> (la_files ".new") + } + + if (CHANGED) + print "]" + + close(la_files) + close(la_files ".new") + + assert(dosystem("mv -f " la_files ".new " la_files), + "dosystem(\"mv -f " la_files ".new " la_files "\")") + } + } + + close(pipe) + } +} + +# vim:ts=4 diff --git a/sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la b/sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la new file mode 100644 index 00000000..346bd16f --- /dev/null +++ b/sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la @@ -0,0 +1,335 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk-no_gcc_la,v 1.4 2010/03/19 23:53:07 vapier Exp $ + +# +# Helper functions +# +function printn(string) { + printf("%s", string) +} +function einfo(string) { + printf(" \033[32;01m*\033[0m %s\n", string) +} +function einfon(string) { + printf(" \033[32;01m*\033[0m %s", string) +} +function ewarn(string) { + printf(" \033[33;01m*\033[0m %s\n", string) +} +function ewarnn(string) { + printf(" \033[33;01m*\033[0m %s", string) +} +function eerror(string) { + printf(" \033[31;01m*\033[0m %s\n", string) +} + +# +# assert(condition, errmsg) +# assert that a condition is true. Otherwise exit. +# +function assert(condition, string) { + if (! condition) { + printf("%s:%d: assertion failed: %s\n", + FILENAME, FNR, string) > "/dev/stderr" + _assert_exit = 1 + exit 1 + } +} + +# +# system(command, return) +# wrapper that normalizes return codes ... +# +function dosystem(command, ret) { + ret = 0 + ret = system(command) + if (ret == 0) + return 1 + else + return 0 +} + +# +# parse_ld_conf(config_file) +# +function parse_ld_conf(conf, pipe, ldsoconf_data, CHILD, y) { + pipe = "cd /etc; cat " conf " | sort 2>/dev/null" + while(((pipe) | getline ldsoconf_data) > 0) { + if (ldsoconf_data ~ /^[[:space:]]*#/) + continue + if (ldsoconf_data == "") + continue + + # Handle the "include" keyword + if (ldsoconf_data ~ /^include /) { + sub(/^include /, "", ldsoconf_data) + parse_ld_conf(ldsoconf_data) + continue + } + + # Remove any trailing comments + sub(/#.*$/, "", ldsoconf_data) + # Remove any trailing spaces + sub(/[[:space:]]+$/, "", ldsoconf_data) + # Eat duplicate slashes + sub(/\/\//, "/", ldsoconf_data) + # Prune trailing / + sub(/\/$/, "", ldsoconf_data) + + # + # Drop the directory if its a child directory of + # one that was already added ... + # For example, if we have: + # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss + # We really just want to save /usr/lib /usr/libexec + # + CHILD = 0 + for (y in DIRLIST) { + if (ldsoconf_data ~ "^" DIRLIST[y] "(/|$)") { + CHILD = 1 + break + } + } + if (CHILD) continue + + DIRLIST[++LIBCOUNT] = ldsoconf_data + } + close(pipe) +} + +BEGIN { + # + # Get our variables from environment + # + OLDVER = ENVIRON["OLDVER"] + OLDCHOST = ENVIRON["OLDCHOST"] + + if (OLDVER == "") { + eerror("Could not get OLDVER!"); + exit 1 + } + + # Setup some sane defaults + LIBCOUNT = 2 + HAVE_GCC34 = 0 + DIRLIST[1] = "/lib" + DIRLIST[2] = "/usr/lib" + + # + # Walk /etc/ld.so.conf to discover all our library paths + # + parse_ld_conf("/etc/ld.so.conf") + + # + # Get line from gcc's output containing CHOST + # + pipe = "gcc -print-file-name=libgcc.a 2>/dev/null" + if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) { + close(pipe) + + # If we fail to get the CHOST, see if we can get the CHOST + # portage thinks we are using ... + pipe = "/usr/bin/portageq envvar 'CHOST'" + assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST") + } else { + # Check pre gcc-3.4.x versions + CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST) + + if (CHOST == TMP_CHOST || CHOST == "") { + # Check gcc-3.4.x or later + CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST); + + if (CHOST == TMP_CHOST || CHOST == "") + CHOST = "" + else + HAVE_GCC34 = 1 + } + } + close(pipe) + + if (CHOST == "") { + eerror("Could not get gcc's CHOST!") + exit 1 + } + + if (OLDCHOST != "") + if (OLDCHOST == CHOST) + OLDCHOST = "" + + GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/" + GCCLIBPREFIX_NEW = "/usr/lib/gcc/" + + if (HAVE_GCC34) + GCCLIBPREFIX = GCCLIBPREFIX_NEW + else + GCCLIBPREFIX = GCCLIBPREFIX_OLD + + GCCLIB = GCCLIBPREFIX CHOST + + if (OLDCHOST != "") { + OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST + OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST + } + + # Get current gcc's version + pipe = "gcc -dumpversion" + assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)") + close(pipe) + + if (NEWVER == "") { + eerror("Could not get gcc's version!") + exit 1 + } + + # Nothing to do ? + # NB: Do not check for (OLDVER == NEWVER) anymore, as we might need to + # replace libstdc++.la .... + if ((OLDVER == "") && (OLDCHOST == "")) + exit 0 + + # + # Ok, now let's scan for the .la files and actually fix them up + # + for (x = 1; x <= LIBCOUNT; x++) { + # Do nothing if the target dir is gcc's internal library path + if (DIRLIST[x] ~ GCCLIBPREFIX_OLD || + DIRLIST[x] ~ GCCLIBPREFIX_NEW) + continue + + einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...") + + pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null" + while (((pipe) | getline la_files) > 0) { + + # Do nothing if the .la file is located in gcc's internal lib path + if (la_files ~ GCCLIBPREFIX_OLD || + la_files ~ GCCLIBPREFIX_NEW) + continue + + CHANGED = 0 + CHOST_CHANGED = 0 + + # See if we need to fix the .la file + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + if ((gsub(OLDGCCLIB1 "[/[:space:]]+", + GCCLIB, la_data) > 0) || + (gsub(OLDGCCLIB2 "[/[:space:]]+", + GCCLIB, la_data) > 0)) { + CHANGED = 1 + CHOST_CHANGED = 1 + } + } + if (OLDVER != NEWVER) { + if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0) || + (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*", + GCCLIB "/" NEWVER, la_data) > 0)) + CHANGED = 1 + } + # We now check if we have libstdc++.la, as we remove the + # libtool linker scripts for gcc ... + # We do this last, as we only match the new paths + if (gsub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la", + "-lstdc++", la_data) > 0) + CHANGED = 1 + } + close(la_files) + + # Do the actual changes in a second loop, as we can then + # verify that CHOST_CHANGED among things is correct ... + if (CHANGED) { + ewarnn(" FIXING: " la_files " ...[") + + # Clear the temp file (removing rather than '>foo' is better + # out of a security point of view?) + dosystem("rm -f " la_files ".new") + + while ((getline la_data < (la_files)) > 0) { + if (OLDCHOST != "") { + tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)", + GCCLIB "\\1", "g", la_data) + tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)", + GCCLIB "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + printn("c") + la_data = tmpstr + } + + if (CHOST_CHANGED > 0) { + # We try to be careful about CHOST changes outside + # the gcc library path (meaning we cannot match it + # via /GCCLIBPREFIX CHOST/) ... + + # Catch: + # + # dependency_libs=' -L/usr/CHOST/{bin,lib}' + # + gsub("-L/usr/" OLDCHOST "/", + "-L/usr/" CHOST "/", la_data) + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib' + # + la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/", + "\\1/" CHOST "/", "g", la_data) + } + } + + if (OLDVER != NEWVER) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc/CHOST/VER' + # + tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", la_data) + tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)", + GCCLIB "/" NEWVER "\\1", "g", tmpstr) + + if (la_data != tmpstr) { + # Catch: + # + # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib' + # + # in cases where we have gcc34 + tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)", + GCCLIBPREFIX "\\1", "g", tmpstr) + printn("v") + la_data = tmpstr + } + } + + # We now check if we have libstdc++.la, as we remove the + # libtool linker scripts for gcc and any referencese in any + # libtool linker scripts. + # We do this last, as we only match the new paths + tmpstr = gensub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la", + "-lstdc++", "g", la_data); + if (la_data != tmpstr) { + printn("l") + la_data = tmpstr + } + + print la_data >> (la_files ".new") + } + + if (CHANGED) + print "]" + + close(la_files) + close(la_files ".new") + + assert(dosystem("mv -f " la_files ".new " la_files), + "dosystem(\"mv -f " la_files ".new " la_files "\")") + } + } + + close(pipe) + } +} + +# vim:ts=4 diff --git a/sys-devel/gcc/files/c89 b/sys-devel/gcc/files/c89 new file mode 100755 index 00000000..cee0325f --- /dev/null +++ b/sys-devel/gcc/files/c89 @@ -0,0 +1,20 @@ +#! /bin/sh + +# Call the appropriate C compiler with options to accept ANSI/ISO C +# The following options are the same (as of gcc-2.95): +# -ansi +# -std=c89 +# -std=iso9899:1990 + +for i; do + case "$i" in + -ansi|-std=c89|-std=iso9899:1990) + ;; + -std=*) + echo >&2 "`basename $0` called with non ANSI/ISO C90 option $i" + exit 1 + ;; + esac +done + +exec gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@" diff --git a/sys-devel/gcc/files/c99 b/sys-devel/gcc/files/c99 new file mode 100755 index 00000000..c9542095 --- /dev/null +++ b/sys-devel/gcc/files/c99 @@ -0,0 +1,21 @@ +#! /bin/sh + +# Call the appropriate C compiler with options to accept ANSI/ISO C +# The following options are the same (as of gcc-3.3): +# -std=c99 +# -std=c9x +# -std=iso9899:1999 +# -std=iso9899:199x + +for i; do + case "$i" in + -std=c9[9x]|-std=iso9899:199[9x]) + ;; + -ansi|-std=*) + echo >&2 "`basename $0` called with non ANSI/ISO C99 option $i" + exit 1 + ;; + esac +done + +exec gcc -std=c99 -pedantic -U_FORTIFY_SOURCE ${1+"$@"} diff --git a/sys-devel/gcc/files/fix_libtool_files.sh b/sys-devel/gcc/files/fix_libtool_files.sh new file mode 100644 index 00000000..c3a3c61f --- /dev/null +++ b/sys-devel/gcc/files/fix_libtool_files.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.14 2007/09/06 11:00:44 uberlord Exp $ + +usage() { +cat << "USAGE_END" +Usage: fix_libtool_files.sh <old-gcc-version> [--oldarch <old-CHOST>] + + Where <old-gcc-version> is the version number of the + previous gcc version. For example, if you updated to + gcc-3.2.1, and you had gcc-3.2 installed, run: + + # fix_libtool_files.sh 3.2 + + If you updated to gcc-3.2.3, and the old CHOST was i586-pc-linux-gnu + but you now have CHOST as i686-pc-linux-gnu, run: + + # fix_libtool_files.sh 3.2 --oldarch i586-pc-linux-gnu + + Note that if only the CHOST and not the version changed, you can run + it with the current version and the '--oldarch <old-CHOST>' arguments, + and it will do the expected: + + # fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu + +USAGE_END + exit 1 +} + +if [[ $2 != "--oldarch" && $# -ne 1 ]] || \ + [[ $2 == "--oldarch" && $# -ne 3 ]] +then + usage +fi + +ARGV1=$1 +ARGV2=$2 +ARGV3=$3 + +source /etc/profile || exit 1 +source /etc/init.d/functions.sh || exit 1 + +if [[ ${EUID} -ne 0 ]] ; then + eerror "${0##*/}: Must be root." + exit 1 +fi + +# make sure the files come out sane +umask 0022 + +if [[ ${ARGV2} == "--oldarch" ]] && [[ -n ${ARGV3} ]] ; then + OLDCHOST=${ARGV3} +else + OLDCHOST= +fi + +AWKDIR="/lib/rcscripts/awk" + +if [[ ! -r ${AWKDIR}/fixlafiles.awk ]] ; then + eerror "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!" + exit 1 +fi + +OLDVER=${ARGV1} + +export OLDVER OLDCHOST + +einfo "Scanning libtool files for hardcoded gcc library paths..." +gawk -f "${AWKDIR}/fixlafiles.awk" + +# vim:ts=4 diff --git a/sys-devel/gcc/files/gcc-4.6.2-fix-ICE-on-arm.patch b/sys-devel/gcc/files/gcc-4.6.2-fix-ICE-on-arm.patch new file mode 100644 index 00000000..3f9f69ae --- /dev/null +++ b/sys-devel/gcc/files/gcc-4.6.2-fix-ICE-on-arm.patch @@ -0,0 +1,24 @@ +--- a/gcc/config/arm/arm.md ++++ b/gcc/config/arm/arm.md +@@ -4202,7 +4202,9 @@ + # + ldr%(h%)\\t%0, %1" + [(set_attr "type" "alu_shift,load_byte") +- (set_attr "predicable" "yes")] ++ (set_attr "predicable" "yes") ++ (set_attr "pool_range" "*,256") ++ (set_attr "neg_pool_range" "*,244")] + ) + + (define_insn "*arm_zero_extendhisi2_v6" +@@ -4213,7 +4215,9 @@ + uxth%?\\t%0, %1 + ldr%(h%)\\t%0, %1" + [(set_attr "type" "alu_shift,load_byte") +- (set_attr "predicable" "yes")] ++ (set_attr "predicable" "yes") ++ (set_attr "pool_range" "*,256") ++ (set_attr "neg_pool_range" "*,244")] + ) + + (define_insn "*arm_zero_extendhisi2addsi" diff --git a/sys-devel/gcc/files/gcc-configure-LANG.patch b/sys-devel/gcc/files/gcc-configure-LANG.patch new file mode 100644 index 00000000..d1b1b035 --- /dev/null +++ b/sys-devel/gcc/files/gcc-configure-LANG.patch @@ -0,0 +1,64 @@ +The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in +option parsing, it may break. + +http://bugs.gentoo.org/103483 + +--- configure ++++ configure +@@ -54,6 +54,19 @@ + infodir='${prefix}/info' + mandir='${prefix}/man' + ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then ++ eval $as_var=C; export $as_var ++ else ++ unset $as_var ++ fi ++done ++ + # Initialize some other variables. + subdirs= + MFLAGS= MAKEFLAGS= +@@ -452,16 +463,6 @@ + esac + done + +-# NLS nuisances. +-# Only set these to C if already set. These must not be set unconditionally +-# because not all systems understand e.g. LANG=C (notably SCO). +-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +-# Non-C LC_CTYPE values break the ctype check. +-if test "${LANG+set}" = set; then LANG=C; export LANG; fi +-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +- + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. +@@ -1850,6 +1850,19 @@ + # Compiler output produced by configure, useful for debugging + # configure, is in ./config.log if it exists. + ++# NLS nuisances. ++for as_var in \ ++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ ++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ ++ LC_TELEPHONE LC_TIME ++do ++ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then ++ eval \$as_var=C; export \$as_var ++ else ++ unset \$as_var ++ fi ++done ++ + ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" + for ac_option + do diff --git a/sys-devel/gcc/files/gcc-configure-texinfo.patch b/sys-devel/gcc/files/gcc-configure-texinfo.patch new file mode 100644 index 00000000..ddc098dd --- /dev/null +++ b/sys-devel/gcc/files/gcc-configure-texinfo.patch @@ -0,0 +1,16 @@ +Chances are quite good that the installed makeinfo is sufficient. +So ignore false positives where the makeinfo installed is so new +that it violates the cheesy version grep. + +http://bugs.gentoo.org/198182 + +--- configure ++++ configure +@@ -3573,6 +3573,6 @@ + : + else +- MAKEINFO="$MISSING makeinfo" ++ : + fi + ;; + diff --git a/sys-devel/gcc/files/gcc-spec-env.patch b/sys-devel/gcc/files/gcc-spec-env.patch new file mode 100644 index 00000000..57e7567e --- /dev/null +++ b/sys-devel/gcc/files/gcc-spec-env.patch @@ -0,0 +1,42 @@ + Add support for external spec file via the GCC_SPECS env var. This + allows us to easily control pie/ssp defaults with gcc-config profiles. + + Original patch by Rob Holland + Extended to support multiple entries separated by ':' by Kevin F. Quinn + Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill + +--- gcc-4/gcc/gcc.c ++++ gcc-4/gcc/gcc.c +@@ -6482,6 +6482,32 @@ + + /* Process any user specified specs in the order given on the command + line. */ ++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32)) ++ /* Add specs listed in GCC_SPECS. Note; in the process of separating ++ * each spec listed, the string is overwritten at token boundaries ++ * (':') with '\0', an effect of strtok_r(). ++ */ ++ specs_file = getenv ("GCC_SPECS"); ++ if (specs_file && (strlen(specs_file) > 0)) ++ { ++ char *spec, *saveptr; ++ for (spec=strtok_r(specs_file,":",&saveptr); ++ spec!=NULL; ++ spec=strtok_r(NULL,":",&saveptr)) ++ { ++ struct user_specs *user = (struct user_specs *) ++ xmalloc (sizeof (struct user_specs)); ++ ++ user->next = (struct user_specs *) 0; ++ user->filename = spec; ++ if (user_specs_tail) ++ user_specs_tail->next = user; ++ else ++ user_specs_head = user; ++ user_specs_tail = user; ++ } ++ } ++#endif + for (uptr = user_specs_head; uptr; uptr = uptr->next) + { + char *filename = find_a_file (&startfile_prefixes, uptr->filename, diff --git a/sys-devel/gcc/files/mkinfodir b/sys-devel/gcc/files/mkinfodir new file mode 100644 index 00000000..a62840ee --- /dev/null +++ b/sys-devel/gcc/files/mkinfodir @@ -0,0 +1,233 @@ +#!/bin/bash +# $Id: mkinfodir,v 1.1 2001/09/01 07:56:19 drobbins Exp $ +# Generate the top-level Info node, given a directory of Info files +# and (optionally) a skeleton file. The output will be suitable for a +# top-level dir file. The skeleton file contains info topic names in the +# order they should appear in the output. There are three special +# lines that alter the behavior: a line consisting of just "--" causes +# the next line to be echoed verbatim to the output. A line +# containing just "%%" causes all the remaining filenames (wildcards +# allowed) in the rest of the file to be ignored. A line containing +# just "!!" exits the script when reached (unless preceded by a line +# containing just "--"). Once the script reaches the end of the +# skeleton file, it goes through the remaining files in the directory +# in order, putting their entries at the end. The script will use the +# ENTRY information in each info file if it exists. Otherwise it will +# make a minimal entry. + +# sent by Jeffrey Osier <jeffrey@cygnus.com>, who thinks it came from +# zoo@winternet.com (david d `zoo' zuhn) + +# modified 7 April 1995 by Joe Harrington <jh@tecate.gsfc.nasa.gov> to +# take special flags + +INFODIR=$1 +if [ $# = 2 ] ; then + SKELETON=$2 +else + SKELETON=/dev/null +fi + +skip= + +if [ $# -gt 2 ] ; then + echo usage: $0 info-directory [ skeleton-file ] 1>&2 + exit 1 +elif [ -z "${INFODIR}" ] ; then + INFODIR="%%DEFAULT_INFO_DIR%%" +else + true +fi + +if [ ! -d ${INFODIR} ] ; then + echo "$0: first argument must specify a directory" + exit 1 +fi + +### output the dir header +echo "-*- Text -*-" +echo "This file was generated automatically by $0." +echo "This version was generated on `date`" +echo "by `whoami`@`hostname` for `(cd ${INFODIR}; pwd)`" + +cat << moobler +\$Id: mkinfodir,v 1.1 2001/09/01 07:56:19 drobbins Exp $ +This is the file .../info/dir, which contains the topmost node of the +Info hierarchy. The first time you invoke Info you start off +looking at that node, which is (dir)Top. + +File: dir Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "?" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs<Return>" visits the Emacs topic, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: The list of major topics begins on the next line. + +moobler + +### go through the list of files in the skeleton. If an info file +### exists, grab the ENTRY information from it. If an entry exists +### use it, otherwise create a minimal dir entry. +### +### Then remove that file from the list of existing files. If any +### additional files remain (ones that don't have a skeleton entry), +### then generate entries for those in the same way, putting the info for +### those at the end.... + +infofiles=`(cd ${INFODIR}; /bin/ls | grep -v '\-[0-9]*\.gz$' | grep -v '\-[0-9]*$' | egrep -v '^dir$|^dir\.info$|^dir\.orig$')` + +# echoing gets clobbered by backquotes; we do it the hard way... +lines=`wc $SKELETON | awk '{print $1}'` +line=1 +while [ $lines -ge $line ] ; do + # Read one line from the file. This is so that we can echo lines with + # whitespace and quoted characters in them. + fileline=`awk NR==$line $SKELETON` + + # flag fancy features + if [ ! -z "$echoline" ] ; then # echo line + echo "$fileline" + fileline= + echoline= + elif [ "${fileline}" = "--" ] ; then # should we echo the next line? + echoline=1 + elif [ "${fileline}" = "%%" ] ; then # eliminate remaining files from dir? + skip=1 + elif [ "${fileline}" = "!!" ] ; then # quit now + exit 0 + fi + + # handle files if they exist + for file in $fileline"" ; do # expand wildcards ("" handles blank lines) + + fname= + + if [ -z "$echoline" -a ! -z "$file" ] ; then + + # Find the file to operate upon. Check both possible names. + infoname=`echo $file | sed 's/\.gz$//'` + infoname=`echo $infoname | sed 's/\.info$//'` + noext= + ext= + if [ -f ${INFODIR}/$infoname ] ; then + noext=$infoname + fi + if [ -f ${INFODIR}/${infoname}.info ] ; then + ext=${infoname}.info + fi + if [ -f ${INFODIR}/${infoname}.info.gz ] ; then + ext=${infoname}.info.gz + fi + # If it exists with both names take what was said in the file. + if [ ! -z "$ext" -a ! -z "$noext" ]; then + fname=$file + warn="### Warning: $ext and $noext both exist! Using ${file}. ###" + elif [ ! \( -z "$ext" -a -z "$noext" \) ]; then + # just take the name if it exists only once + fname=${noext}${ext} + fi + + # if we found something and aren't skipping, do the entry + if [ ! -z "$fname" ] ; then + if [ -z "$skip" ] ; then + + if [ ! -z "$warn" ] ; then # issue any warning + echo $warn + warn= + fi + if [ "${fname##*.}" = "gz" ] ; then + entry=`zcat ${INFODIR}/${fname} | sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ` + else + entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$fname` + fi + if [ ! -z "${entry}" ] ; then + echo "${entry}" + else + echo "* ${infoname}: (${infoname})." + fi + fi + + # remove the name from the directory listing + infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${fname} / /" -e "s/ / /g"` + + fi + + fi + + done + + line=`expr $line + 1` +done + +if [ -z "${infofiles}" ] ; then + exit 0 +elif [ $lines -gt 0 ]; then + echo +fi + +# Sort remaining files by INFO-DIR-SECTION. +prevsect= +filesectdata=`(cd ${INFODIR}; fgrep INFO-DIR-SECTION /dev/null ${infofiles} | \ + fgrep -v 'INFO-DIR-SECTION Miscellaneous' | \ + sort -t: -k2 -k1 | tr ' ' '_')` +for sectdata in ${filesectdata}; do + file=`echo ${sectdata} | cut -d: -f1` + section=`sed -n -e 's/^INFO-DIR-SECTION //p' ${INFODIR}/${file}` + infofiles=`echo "" ${infofiles} "" | sed -e "s/ ${file} / /" -e "s/ / /g"` + + if [ "${prevsect}" != "${section}" ] ; then + if [ ! -z "${prevsect}" ] ; then + echo "" + fi + echo "${section}" + prevsect="${section}" + fi + infoname=`echo $file | sed 's/\.gz$//'` + infoname=`echo $infoname | sed 's/\.info$//'` + if [ "${file##*.}" = "gz" ] ; then + entry=`zcat ${INFODIR}/$file | sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ` + else + entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file` + fi + if [ ! -z "${entry}" ] ; then + echo "${entry}" + elif [ ! -d "${INFODIR}/${file}" ] ; then + echo "* ${infoname}: (${infoname})." + fi +done + +# Process miscellaneous files. +for file in ${infofiles}; do + if [ ! -z "${prevsect}" ] ; then + echo "" + echo "Miscellaneous" + prevsect="" + fi + + infoname=`echo $file | sed 's/\.gz$//'` + infoname=`echo $infoname | sed 's/\.info$//'` + if [ "${file##*.}" = "gz" ] ; then + entry=`zcat ${INFODIR}/${file} | sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d'` + else + entry=`sed -e '1,/START-INFO-DIR-ENTRY/d' \ + -e '/END-INFO-DIR-ENTRY/,$d' ${INFODIR}/$file` + fi + + + if [ ! -z "${entry}" ] ; then + echo "${entry}" + elif [ ! -d "${INFODIR}/${file}" ] ; then + echo "* ${infoname}: (${infoname})." + fi +done + diff --git a/sys-devel/gcc/files/pro-police-docs.patch b/sys-devel/gcc/files/pro-police-docs.patch new file mode 100644 index 00000000..091ea44e --- /dev/null +++ b/sys-devel/gcc/files/pro-police-docs.patch @@ -0,0 +1,74 @@ +Index: gcc/doc/invoke.texi +=================================================================== +RCS file: /cvsroot/gcc/gcc/gcc/doc/invoke.texi,v +retrieving revision 1.364 +diff -c -3 -p -r1.364 invoke.texi +*** gcc/doc/invoke.texi 21 Nov 2003 11:42:58 -0000 1.364 +--- gcc/doc/invoke.texi 22 Nov 2003 08:12:35 -0000 +*************** in the following sections. +*** 228,234 **** + -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol + -Wparentheses -Wpointer-arith -Wredundant-decls @gol + -Wreturn-type -Wsequence-point -Wshadow @gol +! -Wsign-compare -Wstrict-aliasing @gol + -Wswitch -Wswitch-default -Wswitch-enum @gol + -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol + -Wunknown-pragmas -Wunreachable-code @gol +--- 228,234 ---- + -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol + -Wparentheses -Wpointer-arith -Wredundant-decls @gol + -Wreturn-type -Wsequence-point -Wshadow @gol +! -Wsign-compare -Wstack-protector -Wstrict-aliasing @gol + -Wswitch -Wswitch-default -Wswitch-enum @gol + -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol + -Wunknown-pragmas -Wunreachable-code @gol +*************** in the following sections. +*** 681,686 **** +--- 681,687 ---- + -fshort-double -fshort-wchar @gol + -fverbose-asm -fpack-struct -fstack-check @gol + -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol ++ -fstack-protector -fstack-protector-all @gol + -fargument-alias -fargument-noalias @gol + -fargument-noalias-global -fleading-underscore @gol + -ftls-model=@var{model} @gol +*************** effectively. Often, the problem is that +*** 3014,3019 **** +--- 3015,3024 ---- + complex; GCC will refuse to optimize programs when the optimization + itself is likely to take inordinate amounts of time. + ++ @item -Wstack-protector ++ @opindex Wstack-protector ++ Warn when not issuing stack smashing protection for some reason ++ + @item -Werror + @opindex Werror + Make all warnings into errors. +*************** and grows downwards, you can use the fla +*** 11474,11479 **** +--- 11479,11502 ---- + @option{-fstack-limit-symbol=__stack_limit} and + @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit + of 128KB@. Note that this may only work with the GNU linker. ++ ++ @item -fstack-protector ++ @item -fstack-protector-all ++ @opindex fstack-protector ++ @opindex fstack-protector-all ++ @opindex fno-stack-protector ++ Generate code to protect an application from a stack smashing ++ attack. The features are (1) the insertion of random value next to the ++ frame pointer to detect the integrity of the stack, (2) the reordering ++ of local variables to place buffers after pointers to avoid the ++ corruption of pointers that could be used to further corrupt arbitrary ++ memory locations, (3) the copying of pointers in function arguments to ++ an area preceding local variable buffers to prevent the corruption of ++ pointers that could be used to further corrupt arbitrary memory ++ locations, and the (4) omission of instrumentation code from some ++ functions to decrease the performance overhead. If the integrity ++ would be broken, the program is aborted. If no-stack-protector is ++ specified, instrumentation codes are generated at every functions. + + @cindex aliasing of parameters + @cindex parameters, aliased diff --git a/sys-devel/gcc/gcc-4.5.3-r2.ebuild b/sys-devel/gcc/gcc-4.5.3-r2.ebuild new file mode 100644 index 00000000..bc161c3c --- /dev/null +++ b/sys-devel/gcc/gcc-4.5.3-r2.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 +PATCH_VER="1.1" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.4.7" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" +SSP_STABLE="amd64 x86 ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +SSP_UCLIBC_STABLE="" +#end Hardened stuff + +inherit toolchain + +DESCRIPTION="The GNU Compiler Collection" + +LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" +KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" + +RDEPEND="~sys-devel/base-gcc-${PV} + !build? ( + gcj? ( + gtk? ( + x11-libs/libXt + x11-libs/libX11 + x11-libs/libXtst + x11-proto/xproto + x11-proto/xextproto + =x11-libs/gtk+-2* + x11-libs/pango + ) + >=media-libs/libart_lgpl-2.1 + app-arch/zip + app-arch/unzip + ) + )" + +## Make sure we share all the USE flags in sys-devel/base-gcc +BASE_GCC_USE="fortran gcj gtk mudflap multilib nls nptl openmp altivec + bootstrap build doc fixed-point graphite hardened lto + multislot nocxx nopie nossp objc objc++ objc-gc test vanilla" +for base_use in ${BASE_GCC_USE}; do + RDEPEND+=" ~sys-devel/base-gcc-${PV}[${base_use}?]" +done +IUSE="${BASE_GCC_USE}" + +DEPEND="${RDEPEND} + amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) )" +## Should this be moved to base-gcc? +## I guess the cross-* thing is now utterly broken +if [[ ${CATEGORY} != cross-* ]] ; then + PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )" +fi + +## No changes +src_unpack() { + toolchain_src_unpack + + use vanilla && return 0 + + sed -i 's/use_fixproto=yes/:/' gcc/config.gcc #PR33200 + + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch +} + +## Remove lto conditional +pkg_setup() { + toolchain_pkg_setup +} + +## Just install libgcc stuff +src_install() { + toolchain_src_install + + # now drop what's provided by sys-devel/base-gcc-${PV}:${SLOT} + base_gcc_libs="libgfortran.so* libgcc_s.so* libobjc.so* + libobjc_gc.so* libmudflap.so* libmudflapth.so* libgomp.so* libstdc++.so*" + base_multilib_gcc_libs="32/libgfortran.so* 32/libobjc.so* 32/libobjc_gc.so* + 32/libgcc_s.so* 32/libgomp.so* 32/libmudflap.so* + 32/libmudflapth.so* 32/libstdc++.so*" + for gcc_lib in ${base_gcc_libs}; do + # -f is used because the file might not be there + rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}" + debug_dir="${D}"/usr/lib/debug + if [ -d "${debug_dir}" ]; then + rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug" + fi + done + if use multilib; then + for gcc_lib in ${base_multilib_gcc_libs}; do + # -f is used because the file might not be there + rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}" + debug_dir="${D}"/usr/lib/debug + if [ -d "${debug_dir}" ]; then + rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug" + fi + done + fi + # then .mo files provided by sys-devel/base-gcc-${PV}:${SLOT} + find "${D}"${DATAPATH}/locale -name libstdc++.mo -delete + find "${D}"${DATAPATH}/info -name libgomp.info* -delete + + # drop stuff from env.d, provided by sys-devel/base-gcc-${PV}:${SLOT} + rm "${D}"/etc/env.d -rf +} diff --git a/sys-devel/gcc/gcc-4.6.2.ebuild b/sys-devel/gcc/gcc-4.6.2.ebuild new file mode 100644 index 00000000..f3369dbb --- /dev/null +++ b/sys-devel/gcc/gcc-4.6.2.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 +PATCH_VER="1.0" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.4.5" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" +SSP_STABLE="amd64 x86 ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +SSP_UCLIBC_STABLE="" +#end Hardened stuff + +inherit toolchain + +DESCRIPTION="The GNU Compiler Collection" + +LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" +KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" + +RDEPEND="~sys-devel/base-gcc-${PV} + !build? ( + gcj? ( + gtk? ( + x11-libs/libXt + x11-libs/libX11 + x11-libs/libXtst + x11-proto/xproto + x11-proto/xextproto + =x11-libs/gtk+-2* + x11-libs/pango + ) + >=media-libs/libart_lgpl-2.1 + app-arch/zip + app-arch/unzip + ) + )" + +## Make sure we share all the USE flags in sys-devel/base-gcc +BASE_GCC_USE="fortran gcj gtk mudflap multilib nls nptl openmp altivec + bootstrap build doc fixed-point go graphite hardened + multislot cxx nopie nossp objc objc++ objc-gc test vanilla" +for base_use in ${BASE_GCC_USE}; do + RDEPEND+=" ~sys-devel/base-gcc-${PV}[${base_use}?]" +done +IUSE="${BASE_GCC_USE}" + +DEPEND="${RDEPEND} + amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) )" +## Should this be moved to base-gcc? +## I guess the cross-* thing is now utterly broken +if [[ ${CATEGORY} != cross-* ]] ; then + PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )" +fi + +## No changes +src_unpack() { + if has_version '<sys-libs/glibc-2.12' ; then + ewarn "Your host glibc is too old; disabling automatic fortify." + ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315" + EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch" + fi + + # drop the x32 stuff once 4.7 goes stable + case ${CHOST} in + x86_64*) has x32 $(get_all_abis) || EPATCH_EXCLUDE+=" 80_all_gcc-4.6-x32.patch" ;; + esac + + toolchain_src_unpack + + use vanilla && return 0 + + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch + + # Fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47719 + epatch "${FILESDIR}/${P}-fix-ICE-on-arm.patch" +} + +## Remove lto conditional +pkg_setup() { + toolchain_pkg_setup + + ewarn + ewarn "LTO support is still experimental and unstable." + ewarn "Any bugs resulting from the use of LTO will not be fixed." + ewarn +} + +## Just install libgcc stuff +src_install() { + toolchain_src_install + + # now drop what's provided by sys-devel/base-gcc-${PV}:${SLOT} + base_gcc_libs="libgfortran.so* libgcc_s.so* libobjc.so* + libobjc_gc.so* libmudflap.so* libmudflapth.so* libgomp.so* libstdc++.so* + libquadmath.so*" + base_multilib_gcc_libs="32/libgfortran.so* 32/libobjc.so* 32/libobjc_gc.so* + 32/libgcc_s.so* 32/libgomp.so* 32/libmudflap.so* + 32/libmudflapth.so* 32/libstdc++.so* 32/libquadmath.so*" + for gcc_lib in ${base_gcc_libs}; do + # -f is used because the file might not be there + rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}" + debug_dir="${D}"/usr/lib/debug + if [ -d "${debug_dir}" ]; then + rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug" + fi + done + if use multilib; then + for gcc_lib in ${base_multilib_gcc_libs}; do + # -f is used because the file might not be there + rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}" + debug_dir="${D}"/usr/lib/debug + if [ -d "${debug_dir}" ]; then + rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug" + fi + done + fi + # then .mo files provided by sys-devel/base-gcc-${PV}:${SLOT} + find "${D}"${DATAPATH}/locale -name libstdc++.mo -delete + find "${D}"${DATAPATH}/info -name libgomp.info* -delete + find "${D}"${DATAPATH}/info -name libquadmath.info* -delete + + # drop stuff from env.d, provided by sys-devel/base-gcc-${PV}:${SLOT} + rm "${D}"/etc/env.d -rf +} diff --git a/sys-devel/gcc/gcc-4.6.3.ebuild b/sys-devel/gcc/gcc-4.6.3.ebuild new file mode 100644 index 00000000..79d59c40 --- /dev/null +++ b/sys-devel/gcc/gcc-4.6.3.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 +PATCH_VER="1.3" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.5.2" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" +SSP_STABLE="amd64 x86 mips ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +# uclibc need to be >= 0.9.32 +SSP_UCLIBC_STABLE="x86 amd64 ppc ppc64 arm" +#end Hardened stuff + +inherit toolchain + +DESCRIPTION="The GNU Compiler Collection" + +LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" + +RDEPEND="~sys-devel/base-gcc-${PV} + !build? ( + gcj? ( + gtk? ( + x11-libs/libXt + x11-libs/libX11 + x11-libs/libXtst + x11-proto/xproto + x11-proto/xextproto + =x11-libs/gtk+-2* + x11-libs/pango + ) + >=media-libs/libart_lgpl-2.1 + app-arch/zip + app-arch/unzip + ) + )" + +## Make sure we share all the USE flags in sys-devel/base-gcc +BASE_GCC_USE="fortran gcj gtk mudflap multilib nls nptl openmp altivec + bootstrap build doc fixed-point go graphite hardened + multislot cxx nopie nossp objc objc++ objc-gc test vanilla" +for base_use in ${BASE_GCC_USE}; do + RDEPEND+=" ~sys-devel/base-gcc-${PV}[${base_use}?]" +done +IUSE="${BASE_GCC_USE}" + +DEPEND="${RDEPEND} + amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) )" +## Should this be moved to base-gcc? +## I guess the cross-* thing is now utterly broken +if [[ ${CATEGORY} != cross-* ]] ; then + PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )" +fi + +## Check for valid gcc profile. +src_unpack() { + # Since Sabayon's gcc ebuild are split into two parts, we have to + # build gcc with a different version of gcc, or terrible breakage + # will occur after sys-devel/base-gcc is installed, but the + # partner sys-devel/gcc still needs to be built. + + # While it is possible to rebuild Sabayon's split gcc from + # the same version, we have to disallow this also since + # we have no way of discerning if a configuration change + # is significant enough to cause breakage. + + GCC_PROFILE_VER=$(cat ${ROOT}/etc/env.d/gcc/config-$CHOST | awk -F- '{ print $NF }') + einfo "Checking for valid gcc profile to build ${P}" + + # Construct the Slot of the gcc version in the active profile. + GCC_PROFILE_SLOT_MAJOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $1 }') + GCC_PROFILE_SLOT_MINOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $2 }') + GCC_PROFILE_SLOT="${GCC_PROFILE_SLOT_MAJOR}.${GCC_PROFILE_SLOT_MINOR}" + einfo "Current gcc profile version Slot is: ${GCC_PROFILE_SLOT}" + if [[ "${GCC_PROFILE_SLOT}" = "${SLOT}" ]] ; then + eerror "Error!" + eerror "The active gcc-profile is for sys-devel/gcc slot ${SLOT}." + eerror "Sabayon's split sys-devel/gcc package MUST be built" + eerror "with another slotted version of sys-devel/gcc active." + die "Invalid gcc profile selected!" + fi + + if has_version '<sys-libs/glibc-2.12' ; then + ewarn "Your host glibc is too old; disabling automatic fortify." + ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315" + EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch" + fi + + # drop the x32 stuff once 4.7 goes stable + case ${CHOST} in + x86_64*) has x32 $(get_all_abis) || EPATCH_EXCLUDE+=" 80_all_gcc-4.6-x32.patch" ;; + esac + + toolchain_src_unpack + + use vanilla && return 0 + + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch + + # Fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47719 + epatch "${FILESDIR}/${PN}-4.6.2-fix-ICE-on-arm.patch" +} + +## Remove lto conditional +pkg_setup() { + toolchain_pkg_setup + + ewarn + ewarn "LTO support is still experimental and unstable." + ewarn "Any bugs resulting from the use of LTO will not be fixed." + ewarn +} + +## Just install libgcc stuff +src_install() { + toolchain_src_install + + # now drop what's provided by sys-devel/base-gcc-${PV}:${SLOT} + base_gcc_libs="libgfortran.so* libgcc_s.so* libobjc.so* + libobjc_gc.so* libmudflap.so* libmudflapth.so* libgomp.so* libstdc++.so* + libquadmath.so*" + base_multilib_gcc_libs="32/libgfortran.so* 32/libobjc.so* 32/libobjc_gc.so* + 32/libgcc_s.so* 32/libgomp.so* 32/libmudflap.so* + 32/libmudflapth.so* 32/libstdc++.so* 32/libquadmath.so*" + for gcc_lib in ${base_gcc_libs}; do + # -f is used because the file might not be there + rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}" + debug_dir="${D}"/usr/lib/debug + if [ -d "${debug_dir}" ]; then + rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug" + fi + done + if use multilib; then + for gcc_lib in ${base_multilib_gcc_libs}; do + # -f is used because the file might not be there + rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}" + debug_dir="${D}"/usr/lib/debug + if [ -d "${debug_dir}" ]; then + rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug" + fi + done + fi + # then .mo files provided by sys-devel/base-gcc-${PV}:${SLOT} + find "${D}"${DATAPATH}/locale -name libstdc++.mo -delete + find "${D}"${DATAPATH}/info -name libgomp.info* -delete + find "${D}"${DATAPATH}/info -name libquadmath.info* -delete + + # drop stuff from env.d, provided by sys-devel/base-gcc-${PV}:${SLOT} + rm "${D}"/etc/env.d -rf +} diff --git a/sys-devel/gcc/gcc-4.7.2.ebuild b/sys-devel/gcc/gcc-4.7.2.ebuild new file mode 100644 index 00000000..79d59c40 --- /dev/null +++ b/sys-devel/gcc/gcc-4.7.2.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 +PATCH_VER="1.3" +UCLIBC_VER="1.0" + +# Hardened gcc 4 stuff +PIE_VER="0.5.2" +SPECS_VER="0.2.0" +SPECS_GCC_VER="4.4.3" +# arch/libc configurations known to be stable with {PIE,SSP}-by-default +PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64" +PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" +SSP_STABLE="amd64 x86 mips ppc ppc64 arm" +# uclibc need tls and nptl support for SSP support +# uclibc need to be >= 0.9.32 +SSP_UCLIBC_STABLE="x86 amd64 ppc ppc64 arm" +#end Hardened stuff + +inherit toolchain + +DESCRIPTION="The GNU Compiler Collection" + +LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" + +RDEPEND="~sys-devel/base-gcc-${PV} + !build? ( + gcj? ( + gtk? ( + x11-libs/libXt + x11-libs/libX11 + x11-libs/libXtst + x11-proto/xproto + x11-proto/xextproto + =x11-libs/gtk+-2* + x11-libs/pango + ) + >=media-libs/libart_lgpl-2.1 + app-arch/zip + app-arch/unzip + ) + )" + +## Make sure we share all the USE flags in sys-devel/base-gcc +BASE_GCC_USE="fortran gcj gtk mudflap multilib nls nptl openmp altivec + bootstrap build doc fixed-point go graphite hardened + multislot cxx nopie nossp objc objc++ objc-gc test vanilla" +for base_use in ${BASE_GCC_USE}; do + RDEPEND+=" ~sys-devel/base-gcc-${PV}[${base_use}?]" +done +IUSE="${BASE_GCC_USE}" + +DEPEND="${RDEPEND} + amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) )" +## Should this be moved to base-gcc? +## I guess the cross-* thing is now utterly broken +if [[ ${CATEGORY} != cross-* ]] ; then + PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )" +fi + +## Check for valid gcc profile. +src_unpack() { + # Since Sabayon's gcc ebuild are split into two parts, we have to + # build gcc with a different version of gcc, or terrible breakage + # will occur after sys-devel/base-gcc is installed, but the + # partner sys-devel/gcc still needs to be built. + + # While it is possible to rebuild Sabayon's split gcc from + # the same version, we have to disallow this also since + # we have no way of discerning if a configuration change + # is significant enough to cause breakage. + + GCC_PROFILE_VER=$(cat ${ROOT}/etc/env.d/gcc/config-$CHOST | awk -F- '{ print $NF }') + einfo "Checking for valid gcc profile to build ${P}" + + # Construct the Slot of the gcc version in the active profile. + GCC_PROFILE_SLOT_MAJOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $1 }') + GCC_PROFILE_SLOT_MINOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $2 }') + GCC_PROFILE_SLOT="${GCC_PROFILE_SLOT_MAJOR}.${GCC_PROFILE_SLOT_MINOR}" + einfo "Current gcc profile version Slot is: ${GCC_PROFILE_SLOT}" + if [[ "${GCC_PROFILE_SLOT}" = "${SLOT}" ]] ; then + eerror "Error!" + eerror "The active gcc-profile is for sys-devel/gcc slot ${SLOT}." + eerror "Sabayon's split sys-devel/gcc package MUST be built" + eerror "with another slotted version of sys-devel/gcc active." + die "Invalid gcc profile selected!" + fi + + if has_version '<sys-libs/glibc-2.12' ; then + ewarn "Your host glibc is too old; disabling automatic fortify." + ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315" + EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch" + fi + + # drop the x32 stuff once 4.7 goes stable + case ${CHOST} in + x86_64*) has x32 $(get_all_abis) || EPATCH_EXCLUDE+=" 80_all_gcc-4.6-x32.patch" ;; + esac + + toolchain_src_unpack + + use vanilla && return 0 + + [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch + + # Fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47719 + epatch "${FILESDIR}/${PN}-4.6.2-fix-ICE-on-arm.patch" +} + +## Remove lto conditional +pkg_setup() { + toolchain_pkg_setup + + ewarn + ewarn "LTO support is still experimental and unstable." + ewarn "Any bugs resulting from the use of LTO will not be fixed." + ewarn +} + +## Just install libgcc stuff +src_install() { + toolchain_src_install + + # now drop what's provided by sys-devel/base-gcc-${PV}:${SLOT} + base_gcc_libs="libgfortran.so* libgcc_s.so* libobjc.so* + libobjc_gc.so* libmudflap.so* libmudflapth.so* libgomp.so* libstdc++.so* + libquadmath.so*" + base_multilib_gcc_libs="32/libgfortran.so* 32/libobjc.so* 32/libobjc_gc.so* + 32/libgcc_s.so* 32/libgomp.so* 32/libmudflap.so* + 32/libmudflapth.so* 32/libstdc++.so* 32/libquadmath.so*" + for gcc_lib in ${base_gcc_libs}; do + # -f is used because the file might not be there + rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}" + debug_dir="${D}"/usr/lib/debug + if [ -d "${debug_dir}" ]; then + rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug" + fi + done + if use multilib; then + for gcc_lib in ${base_multilib_gcc_libs}; do + # -f is used because the file might not be there + rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}" + debug_dir="${D}"/usr/lib/debug + if [ -d "${debug_dir}" ]; then + rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug" + fi + done + fi + # then .mo files provided by sys-devel/base-gcc-${PV}:${SLOT} + find "${D}"${DATAPATH}/locale -name libstdc++.mo -delete + find "${D}"${DATAPATH}/info -name libgomp.info* -delete + find "${D}"${DATAPATH}/info -name libquadmath.info* -delete + + # drop stuff from env.d, provided by sys-devel/base-gcc-${PV}:${SLOT} + rm "${D}"/etc/env.d -rf +} diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml new file mode 100644 index 00000000..8bf5cdbc --- /dev/null +++ b/sys-devel/gcc/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <use> + <flag name="d">Enable support for the D programming language</flag> + <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets + in gcc (Warning: significantly increases compile time!)</flag> + <flag name="go">Build the GCC Go language frontend.</flag> + <flag name="graphite">Add support for the framework for loop + optimizations based on a polyhedral intermediate representation</flag> + <flag name="ip28">Enable building a compiler capable of building a kernel + for SGI Indigo2 Impact R10000 (IP28)</flag> + <flag name="ip32r10k">Enable building a compiler capable of building an + experimental kernel for SGI O2 w/ R1x000 CPUs (IP32)</flag> + <flag name="libffi">Build the portable foreign function interface library</flag> + <flag name="lto">Add support for link-time optimizations (unsupported, use + at your own risk).</flag> + <flag name="mudflap">Add support for mudflap, a pointer use checking library</flag> + <flag name="multislot">Allow for SLOTs to include minor version (3.3.4 + instead of just 3.3)</flag> + <flag name="n32">Enable n32 ABI support on mips</flag> + <flag name="n64">Enable n64 ABI support on mips</flag> + <flag name="nopie">Disable PIE support (NOT FOR GENERAL USE)</flag> + <flag name="nossp">Disable SSP support (NOT FOR GENERAL USE)</flag> + <flag name="objc">Build support for the Objective C code language</flag> + <flag name="objc++">Build support for the Objective C++ language</flag> + <flag name="objc-gc">Build support for the Objective C code language Garbage + Collector</flag> + </use> +</pkgmetadata> diff --git a/sys-devel/ucpp/ChangeLog b/sys-devel/ucpp/ChangeLog new file mode 100644 index 00000000..f3ea73b2 --- /dev/null +++ b/sys-devel/ucpp/ChangeLog @@ -0,0 +1,24 @@ +# ChangeLog for sys-devel/ucpp +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/ucpp/ChangeLog,v 1.4 2012/11/21 16:37:13 scarabeus Exp $ + +*ucpp-1.3.3 (21 Nov 2012) + + 21 Nov 2012; Tomáš Chvátal <scarabeus@gentoo.org> +ucpp-1.3.3.ebuild, + ucpp-1.3.ebuild, ucpp-9999.ebuild: + Version bump to release version i tagged. + +*ucpp-9999 (24 Sep 2012) + + 24 Sep 2012; Tomáš Chvátal <scarabeus@gentoo.org> +ucpp-9999.ebuild, + metadata.xml: + Add ucpp live ebuild as this will be required by lo 3.7. + + 02 Aug 2011; Alexey Shvetsov <alexxy@gentoo.org> ucpp-1.3.ebuild: + Add ~amd64-linux keyword + +*ucpp-1.3 (28 Jul 2011) + + 28 Jul 2011; Alexey Shvetsov <alexxy@gentoo.org> +ucpp-1.3.ebuild, + +files/tune.h.patch, +metadata.xml: + Initial import to tree diff --git a/sys-devel/ucpp/Manifest b/sys-devel/ucpp/Manifest new file mode 100644 index 00000000..f035f513 --- /dev/null +++ b/sys-devel/ucpp/Manifest @@ -0,0 +1,8 @@ +AUX tune.h.patch 723 SHA256 27bdbc0e81ba1c60b4f069b6a05eedb44445d4768b2a5808e53117a7ed7e7871 SHA512 04fe5d91c22774df447a8c46955c864756d5e9538e94595943647d88b0044f4211be389f97472fad90a10f6c10e673c826dc585e480b33f7bce443defc186119 WHIRLPOOL 4ef22d4111a28cbd87a0c2ff895096a8bd27a2d6fff56c063642524825f114e4156a1ea7f5e527b4100bdf02b7a403d573fb5b6d1edb82b545a2f7e6d9faa1ac +DIST ucpp-1.3.3.tar.xz 274608 SHA256 4e9525477ca90f8ad6bf1ba3a0c08858a99d5e4d206cd72e3242f6918ddee754 SHA512 4ebef29a82a015a7f1a86fc213197f5c17ffcd378da48374e3066755a155848f0af738827c026aa820b2c1a5a5f086a984450429630c0e883ce70cd0c31d406e WHIRLPOOL a9e826c065d1c5760be9d8fe863b0371624c885c1b6e0d78960c488a90a4da75194e377f13935fc12f7cfb4f4d5c8c9ea2996bf393d8f62c53d0340899a8d5ec +DIST ucpp-1.3.tar.bz2 73958 SHA256 d0a51c20040385b143f15fc08eefec6119773fb07232a14c08bbb49cb1c5f1fa +EBUILD ucpp-1.3.3.ebuild 657 SHA256 e7b14742dcff6bc462257d6cadb216344b28d9759b2c9b57986a5e0353eacfc1 SHA512 d0232b1cb9b6d7c5deac3d95c43642074d275f57263149424274a925e1d37c57d26c925a253a3287a3dc27183499afd1c4e08de6bd92b85966a58300891aabba WHIRLPOOL a29eb4e64885d79631ae13f053ed9e34c9addcde9c24ed98a06d155227e04b303597a96a8b75affae8532f6a32f0ce5984281c1cbaa20e586483eaa51d372a69 +EBUILD ucpp-1.3.ebuild 770 SHA256 2bc5cb06972775cfaa593bdc6fd14d83f0bc0dba93533014f7a85b1e267cbef7 SHA512 4c45a709e67a8b33fcb8314e3d8d39b38bc3623b1e45958ca36b840cbb1e7069fce54cb5f07a73dfb6e27a111b63ed5a40c1352b270cb80646273e7d3d6e3488 WHIRLPOOL 4f1d062dc7fad3df494704fcd750c04a85f212506293be374ed14affdee82d8f693473d5241fe5457e7d14e30ddd47e486655f23592cb70069516029440a6d5b +EBUILD ucpp-9999.ebuild 690 SHA256 f3f1f30d38433b34adf7cf6235819f348511833c1c8d1d5326e3c67dbda737a7 SHA512 22eb4a4a74f13797166209819ba0434bf21e8b759f014ec51ddf3d07c400a567828169edb8d725293946fbed0a6288c9f744058d0368a8272a8fdeecec2a9019 WHIRLPOOL e2261fd54ed193873a0988fe2c63fba86d02c11560151a354d06ac77650357388a560e27e38da5210fb8d0732eb6514443aeed0d59287c1ba848ea4fb3ee7a95 +MISC ChangeLog 817 SHA256 4e84c696c63d61e65e3f0ca545343c4cc1a80fdbcd1d06207cb7e6c10069b7f8 SHA512 8f44194bc4be723b5f76d2c3694d4ad8ad6cbcde2f99d271642085c83bbefbdc4ddab27bb2af1c24dca98d47c4b8a11ae32bc65d091dd414531ec5573f54a044 WHIRLPOOL 9a56dce9229307db900b371c3025e0037f885b8a332e75566a222f79493a4171863b3cc1432a215e8b80bfc28cf5f40623f95d07642262869c48582782a9150a +MISC metadata.xml 182 SHA256 b9c161e3f05dbaa2157c1aaece681f28c1d81b251e79923f9f9326d1523c0509 SHA512 82aa50dbb9bce1055ffcbc266becd01f97441ec698dea4f713e82664dadc30ed735d7bf47cb1e4ee9d97d4ab0f37cf559d027a1c86bf2e1d9249b538048c7942 WHIRLPOOL 33747b74de9fa24c064a98d4165f62ee8ec35576da63977e1f78fb9d3dac559350cc0044dfc01b73bca926e20e731662e571a5cc481caf37df58c4462b1c31b2 diff --git a/sys-devel/ucpp/files/tune.h.patch b/sys-devel/ucpp/files/tune.h.patch new file mode 100644 index 00000000..7455dd24 --- /dev/null +++ b/sys-devel/ucpp/files/tune.h.patch @@ -0,0 +1,28 @@ +--- tune.h 2008-10-01 19:15:41.000000000 +0200 ++++ tune.h.new 2009-03-22 11:59:42.000000000 +0100 +@@ -281,10 +281,10 @@ + * + * If you want no standard assertion, define STD_ASSERT to 0. + */ +-/* ++ + #define STD_ASSERT "cpu(i386)", "machine(i386)", "system(unix)", \ + "system(freebsd)" +-*/ ++ + + /* ====================================================================== */ + /* +@@ -293,10 +293,10 @@ + * Each string must be either "name" or "name=token-list". If you want + * no predefined macro, define STD_MACROS to 0. + */ +-/* ++ + #define STD_MACROS "__FreeBSD=4", "__unix", "__i386", \ + "__FreeBSD__=4", "__unix__", "__i386__" +-*/ ++ + + /* ====================================================================== */ + /* diff --git a/sys-devel/ucpp/metadata.xml b/sys-devel/ucpp/metadata.xml new file mode 100644 index 00000000..94f0af23 --- /dev/null +++ b/sys-devel/ucpp/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>openoffice</herd> + <herd>sci</herd> +</pkgmetadata> diff --git a/sys-devel/ucpp/ucpp-1.3.3.ebuild b/sys-devel/ucpp/ucpp-1.3.3.ebuild new file mode 100644 index 00000000..df585406 --- /dev/null +++ b/sys-devel/ucpp/ucpp-1.3.3.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/ucpp/ucpp-1.3.3.ebuild,v 1.1 2012/11/21 16:37:12 scarabeus Exp $ + +EAPI=5 + +inherit eutils + +DESCRIPTION="A quick and light preprocessor, but anyway fully compliant to C99" +HOMEPAGE="http://code.google.com/p/ucpp/" +SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux" +IUSE="static-libs" + +src_configure() { + econf \ + --disable-werror \ + $(use_enable static-libs static) +} + +src_install() { + default + + prune_libtool_files --all +} diff --git a/sys-devel/ucpp/ucpp-1.3.ebuild b/sys-devel/ucpp/ucpp-1.3.ebuild new file mode 100644 index 00000000..5cdb83e0 --- /dev/null +++ b/sys-devel/ucpp/ucpp-1.3.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/ucpp/ucpp-1.3.ebuild,v 1.3 2012/11/21 16:37:12 scarabeus Exp $ + +EAPI="2" + +inherit eutils toolchain-funcs + +DESCRIPTION="A quick and light preprocessor, but anyway fully compliant to C99" +HOMEPAGE="http://code.google.com/p/ucpp/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/tune.h.patch +} + +src_compile() { + emake \ + FLAGS="${CFLAGS} -DSTAND_ALONE" \ + CC=$(tc-getCC) \ + STAND_ALONE="-DSTAND_ALONE" || die +} + +src_install() { + dolib.a lib${PN}.a || die + doman ${PN}.1 || die + dobin ${PN} || die + dodoc README || die +} diff --git a/sys-devel/ucpp/ucpp-9999.ebuild b/sys-devel/ucpp/ucpp-9999.ebuild new file mode 100644 index 00000000..1743b604 --- /dev/null +++ b/sys-devel/ucpp/ucpp-9999.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/ucpp/ucpp-9999.ebuild,v 1.2 2012/11/21 16:37:12 scarabeus Exp $ + +EAPI=5 + +EGIT_REPO_URI="git://github.com/scarabeusiv/ucpp.git" +inherit eutils git-2 autotools + +DESCRIPTION="A quick and light preprocessor, but anyway fully compliant to C99" +HOMEPAGE="http://code.google.com/p/ucpp/" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="static-libs" + +src_prepare() { + eautoreconf +} + +src_configure() { + econf \ + --prefix=/opt/ucpp \ + --disable-werror \ + $(use_enable static-libs static) +} + +src_install() { + default + + prune_libtool_files --all + die +} diff --git a/sys-devel/ucpp/ucpp/ChangeLog b/sys-devel/ucpp/ucpp/ChangeLog new file mode 100644 index 00000000..f3ea73b2 --- /dev/null +++ b/sys-devel/ucpp/ucpp/ChangeLog @@ -0,0 +1,24 @@ +# ChangeLog for sys-devel/ucpp +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/ucpp/ChangeLog,v 1.4 2012/11/21 16:37:13 scarabeus Exp $ + +*ucpp-1.3.3 (21 Nov 2012) + + 21 Nov 2012; Tomáš Chvátal <scarabeus@gentoo.org> +ucpp-1.3.3.ebuild, + ucpp-1.3.ebuild, ucpp-9999.ebuild: + Version bump to release version i tagged. + +*ucpp-9999 (24 Sep 2012) + + 24 Sep 2012; Tomáš Chvátal <scarabeus@gentoo.org> +ucpp-9999.ebuild, + metadata.xml: + Add ucpp live ebuild as this will be required by lo 3.7. + + 02 Aug 2011; Alexey Shvetsov <alexxy@gentoo.org> ucpp-1.3.ebuild: + Add ~amd64-linux keyword + +*ucpp-1.3 (28 Jul 2011) + + 28 Jul 2011; Alexey Shvetsov <alexxy@gentoo.org> +ucpp-1.3.ebuild, + +files/tune.h.patch, +metadata.xml: + Initial import to tree |