remove gcc
This commit is contained in:
parent
d4fc1195ef
commit
887e49a79a
@ -1,16 +0,0 @@
|
||||
AUX awk/fixlafiles.awk 7807 SHA256 3cae4890a295adef50c6cf8a7e14d1be4e7a2356479c073e5c29433c3cdf9c5c SHA512 a39e09db4f34d1358de9e929b4c1e10b677d7e8aeffd6afb36d42543b18f1dfa77e3e26331e3fa1b556bae3d8c75ab4bd5796c7ccf2dda4eb365edb307828bed WHIRLPOOL 0cb6e5e96460514c17f3242d8fe936dc2545c07ca08c03ceb34730935435fde24d197300da54d4a19de86067f9e4bbc14178da2f7c03f4be57c89c81307f5d82
|
||||
AUX awk/fixlafiles.awk-no_gcc_la 8596 SHA256 91e36c29133b6ff854bc84acd6cd2e9d07be6eaa73ef9b23e4f7bc6371107fab SHA512 a970ade3e0b57b3280dd01036a95338c4a7f0c7ec45e7aeb7255197df43e13a5fad8c565b4b345e3a0c8326f71ae7ab598b804eaeaa9d59eda8683195bccfe45 WHIRLPOOL e3da866b8902fbf639af545b43c3b6ccaca0f5d543647007f02e0b8bfc16a675463b8681e9fad11d6ce29517e099636f43708f880ef7a433e4578ee408c3b099
|
||||
AUX fix_libtool_files.sh 1679 SHA256 0037e3f1303560f1ffadc61c7ed6bca13a41d6f2f70f196276938cda9dd158f0 SHA512 834beeb04f1057a0b1f79025fc9bbe0193ea8457055cc10b5b4c528a60e37ead7614a686aa6e7285e040161a91d4b5ff394539a33fc2f4b44be5c2514d0bb283 WHIRLPOOL c7e2f517e0c5c9a8930cd615f68222b44a6f227518ea71b5eb9b6436e1642be748d9cb4c0732f27df6c2ded2eb2c758d67ee9cb58e409f30814f988523dc649b
|
||||
AUX gcc-configure-LANG.patch 2052 SHA256 63de6d2dcfe14f21d147abeb1390405b9220c03f8e968f482d4b4c1cf279c88b SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129 WHIRLPOOL 3cc1ec912fb192ff1058de5b93e49a994ba30d1501a932290dd5b3df1cd783875621cda56edeb41894cd5fa10c04917e693a40a60be8d742ddd7992bf5d8afeb
|
||||
AUX gcc-configure-texinfo.patch 337 SHA256 74b73a7ecec2d88889876b4db480cd173632f49d5396bb8e5b3c93673f9b5b98 SHA512 a15fba8bf2ff02bdeca54d6f186bfa08c1079c6a8ba0a3beef154483ce5c1b8c497e7ffeec32371968f0037e0ff8384609eb0c367d0155a4e5a7eef8aad084d5 WHIRLPOOL 39d008aad06f7621e4e5db15f5e85a59e583b43f8d247029bd4944466bb60a9795bda157d185c45c329294078e282703a243aad5c468d90c77665dd6336870d4
|
||||
AUX gcc-spec-env-r1.patch 3148 SHA256 da0a6442eb42bce58cbdc7858b110a2e65fc5bd5b4b780b9b491033de6e302fa SHA512 ecae71577543772cfe1711f1b4a8815c0b5d706ebd01edacd1f07586637d4805e25771f970a6e6d1bb696d4b1b5ef3e0036088a96a9f6beff7ddaee704175d16 WHIRLPOOL 3535605998eabccdee71ba396ed5cefbb8b0a8cb073101f6444c7d01233f3b3904c1b29f4daf0a3417c68de8dbd62a0b7dc367cacfcbfa0c4ee1b69b7df8c6fb
|
||||
AUX gcc-spec-env.patch 1544 SHA256 64b01f29fb853fee5ecda998b66eeaa7ec86ff1fc3b21432bfd69eb543c93e6a SHA512 ce9c1f923e2c6d17347ec2d3d8482351a9644194b2753627389294d43bb4f11b9c2ef41eda1b46ad83d09901a0bedebd5b6b8a57a198646030ab61e8d2d8cb48 WHIRLPOOL b88c9c18e20868b3ff535c3390408ebe8f1304bcec6e70b6472781f684671265860dff4335f2301d3b4d3b73395283b29673f0f5da62414e1094cfcb8130e8d8
|
||||
AUX mkinfodir 7324 SHA256 0565353e767e253207adb8b5c9be9ba215a628447e075a4dc7bb3183ed099d2a SHA512 a05f9130d98e4cb4d3254b757de06d772d0a965ac4b5a9a15082b1cb694a2fd32c9c8f550745a9423ba3cfdd1c5e87b6d568a809301772a24cc6e1a414d5f98b WHIRLPOOL 4001ae3f7fb666a84e12432a1a41eacf62ebf922181c279e4d06dad32e44d0b499d13e098e794fdd19a9cff5c438a28e5e9e125fb78e72bb913fa5ddd8e44bae
|
||||
DIST ecj-4.5.jar 1470676 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e WHIRLPOOL db54206cfd5eba935e707b8d36ebac40f3c4ed3c1f06ede794288cbdd9c7da9d90c0898e8c98b383af276ea4c1b40c861ebd9e1fc1dce712946184321339d3ad
|
||||
DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 WHIRLPOOL 8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e
|
||||
DIST gcc-4.7.3-patches-1.0.tar.bz2 39969 SHA256 c9a5d7c6da7d056f7fca15b33eb7f399bb7ed5a2d0a892b97e0c7609146a2a24 SHA512 d5c3151eca135bb08511955d81c7727adbf8fc33043b64a4431b0fe95d2cac1bf3c5410fa9616373d6b3d932604195ff29f6321e61a3de69a7704f1d1cb1759f WHIRLPOOL 315578ef5a7226ed66c4831b25c79647120453dc169dc8ecd291e099500ae52284ffa451164522d6d55d11c440a7aa353a283c07e28c103c522df0c2e2f43fff
|
||||
DIST gcc-4.7.3-piepatches-v0.5.5.tar.bz2 15378 SHA256 b6f6b6709e7b13f6c05090f3bf68f3a64db19d52593a870cc7717c5c128b05a2 SHA512 d0189d2e4049d471dedaddcba319fe2c2b29855f7b33e84b26051504ead2936c852ef7870a1d19d755bb343c9b121b0ce5295665ab4ff1e448436bd448c08e1f WHIRLPOOL ccceedb41d48da69f5a423b6b73436c9fbb7b1e382456abfcef954f25666e1b7caf926bc5eb977e934502359a356d623c439d80825e87d9fe46b5ae78a74bde3
|
||||
DIST gcc-4.7.3-uclibc-patches-1.0.tar.bz2 3013 SHA256 731c518f31db8debd08bea92db8e3bf1e9962552909407452dc2ac3c491cf11c SHA512 6119159300e76be87732f2a44b1a9388228235d7832370dbae531c2c96694ea42ed4c75acf7abca98ec0035fbc50a8bf84225574505358c2739e64b0f3fd6a95 WHIRLPOOL 4a874a5684937907720aa5a4a1dbc237aa7d985292befd1c591cf0789c71e0da22ced5b7f7e049731bc2d6496e959cbe3c9010047ceb1b05675e61865004c71a
|
||||
DIST gcc-4.7.3.tar.bz2 82904224 SHA256 2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3 SHA512 5671a2dd3b6ac0d23f305cb11a796aebd823c1462b873136b412e660966143f4e07439bd8926c1443b78442beb6ae370ef91d819ec615920294875b722b7b0bd WHIRLPOOL cb3408e3e251833f38ae7cf2388a1ddce864614fe1c68de9729a1a9a1f8f028ab92c0f2b863e7fa3ac16dbf443306ac864e74c9cce90690230c081ee2ac309d3
|
||||
EBUILD base-gcc-4.7.3.ebuild 6719 SHA256 37a32a175dfcb3f89c26f52623c3292e4043c85d7a050a4b15041ee3e4db3b73 SHA512 202f8f794a77f5028162963f068e3b4d0fb2527403210c0f8f247d0061166105ab2d4dd300189e73c2355cc470bb01dca66aa2debd65bad9562ee5db14155ecf WHIRLPOOL 31e8aedc29fee9fe375ab106ad9515448a9b7c63e7d6d07f93ddf71bba71bb3e9c95ebac58cc58436587eb9f5ff0bcfdab25ee35878b48770f36ec5deadf6bbe
|
||||
MISC metadata.xml 1780 SHA256 57d7428c3d0ef34e72e780a3cfa7a059202b5c80f2d61cc12f90f0d1e8f5f12e SHA512 8895da9aabea6ddd36db6a2320a6290d8a676a2b5bd75db342ecf2f5791b1ed22f970269e784e790a5f8fc74bf3871953ecfc83df3b249365bd98d6335e2310f WHIRLPOOL d124e9bb7a1e4a28582f421584e4234da7f85d722f8e8fb4b7ec910f01bf5b437a3c215fb69ab8733385e70cd6d56830658146cb9a34e6e025ccfb6ebea1f6cf
|
@ -1,231 +0,0 @@
|
||||
# Copyright 1999-2012 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.5.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
|
||||
# uclibc need to be >= 0.9.33
|
||||
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"
|
||||
|
||||
## 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."
|
||||
ebeep 10
|
||||
fi
|
||||
|
||||
# drop the x32 stuff once 4.7 goes stable
|
||||
if [[ ${CTARGET} != x86_64* ]] || ! has x32 $(get_all_abis TARGET) ; then
|
||||
EPATCH_EXCLUDE+=" 90_all_gcc-4.7-x32.patch"
|
||||
fi
|
||||
|
||||
toolchain_src_unpack
|
||||
|
||||
use vanilla && return 0
|
||||
|
||||
[[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch
|
||||
}
|
||||
|
||||
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() {
|
||||
# Sabayon specific bits to always force the latest gcc profile
|
||||
local gcc_atom=$(best_version sys-devel/base-gcc)
|
||||
local gcc_ver=
|
||||
if [ -n "${gcc_atom}" ]; then
|
||||
elog "Found latest base-gcc to be: ${gcc_atom}, forcing this profile"
|
||||
gcc_ver=$(portageq metadata "${ROOT}" installed "${gcc_atom}" PV)
|
||||
else
|
||||
eerror "No sys-devel/base-gcc installed"
|
||||
fi
|
||||
|
||||
if [ -n "${gcc_ver}" ]; then
|
||||
local target="${CTARGET:${CHOST}}-${gcc_ver}"
|
||||
local env_target="${ROOT}/etc/env.d/gcc/${target}"
|
||||
[[ -e "${env_target}-vanilla" ]] && find_target="${target}-vanilla"
|
||||
|
||||
elog "Setting: ${target} GCC profile"
|
||||
gcc-config "${target}"
|
||||
else
|
||||
eerror "No sys-devel/base-gcc version installed? Cannot set a proper GCC profile"
|
||||
fi
|
||||
}
|
||||
|
||||
## Do nothing!
|
||||
pkg_prerm() {
|
||||
:
|
||||
}
|
||||
|
||||
## Do nothing!
|
||||
pkg_postrm() {
|
||||
:
|
||||
}
|
@ -1,314 +0,0 @@
|
||||
# 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
|
@ -1,335 +0,0 @@
|
||||
# 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
|
@ -1,68 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright 1999-2012 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.16 2012/05/18 21:28:56 vapier 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
|
||||
}
|
||||
|
||||
case $2 in
|
||||
--oldarch) [ $# -ne 3 ] && usage ;;
|
||||
*) [ $# -ne 1 ] && usage ;;
|
||||
esac
|
||||
|
||||
ARGV1=$1
|
||||
ARGV2=$2
|
||||
ARGV3=$3
|
||||
|
||||
. /etc/profile || exit 1
|
||||
. /etc/init.d/functions.sh || exit 1
|
||||
|
||||
if [ ${EUID:-0} -ne 0 ] ; then
|
||||
eerror "${0##*/}: Must be root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# make sure the files come out sane
|
||||
umask 0022
|
||||
|
||||
OLDCHOST=
|
||||
[ "${ARGV2}" = "--oldarch" ] && OLDCHOST=${ARGV3}
|
||||
|
||||
AWKDIR="/usr/share/gcc-data"
|
||||
|
||||
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..."
|
||||
exec gawk -f "${AWKDIR}/fixlafiles.awk"
|
||||
|
||||
# vim:ts=4
|
@ -1,64 +0,0 @@
|
||||
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
|
@ -1,16 +0,0 @@
|
||||
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
|
||||
;;
|
||||
|
@ -1,87 +0,0 @@
|
||||
2013-08-22 Magnus Granberg <zorry@gentoo.org>
|
||||
|
||||
* gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var
|
||||
and move the process of the user specifed specs.
|
||||
|
||||
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
|
||||
Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg
|
||||
|
||||
--- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100
|
||||
+++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200
|
||||
@@ -6427,6 +6428,48 @@ main (int argc, char **argv)
|
||||
do_option_spec (option_default_specs[i].name,
|
||||
option_default_specs[i].spec);
|
||||
|
||||
+#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
|
||||
+ /* Process any user specified specs in the order given on the command
|
||||
+ * line. */
|
||||
+ for (uptr = user_specs_head; uptr; uptr = uptr->next)
|
||||
+ {
|
||||
+ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
|
||||
+ R_OK, true);
|
||||
+ read_specs (filename ? filename : uptr->filename, false, true);
|
||||
+ }
|
||||
+ /* Process any user self specs. */
|
||||
+ {
|
||||
+ struct spec_list *sl;
|
||||
+ for (sl = specs; sl; sl = sl->next)
|
||||
+ if (sl->name_len == sizeof "self_spec" - 1
|
||||
+ && !strcmp (sl->name, "self_spec"))
|
||||
+ do_self_spec (*sl->ptr_spec);
|
||||
+ }
|
||||
+
|
||||
/* Process DRIVER_SELF_SPECS, adding any new options to the end
|
||||
of the command line. */
|
||||
|
||||
@@ -6535,24 +6578,6 @@ main (int argc, char **argv)
|
||||
PREFIX_PRIORITY_LAST, 0, 1);
|
||||
}
|
||||
|
||||
- /* Process any user specified specs in the order given on the command
|
||||
- line. */
|
||||
- for (uptr = user_specs_head; uptr; uptr = uptr->next)
|
||||
- {
|
||||
- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
|
||||
- R_OK, true);
|
||||
- read_specs (filename ? filename : uptr->filename, false, true);
|
||||
- }
|
||||
-
|
||||
- /* Process any user self specs. */
|
||||
- {
|
||||
- struct spec_list *sl;
|
||||
- for (sl = specs; sl; sl = sl->next)
|
||||
- if (sl->name_len == sizeof "self_spec" - 1
|
||||
- && !strcmp (sl->name, "self_spec"))
|
||||
- do_self_spec (*sl->ptr_spec);
|
||||
- }
|
||||
-
|
||||
if (compare_debug)
|
||||
{
|
||||
enum save_temps save;
|
@ -1,42 +0,0 @@
|
||||
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,
|
@ -1,233 +0,0 @@
|
||||
#!/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
|
||||
|
@ -1,31 +0,0 @@
|
||||
<?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>
|
@ -1,19 +0,0 @@
|
||||
AUX awk/fixlafiles.awk 7807 SHA256 3cae4890a295adef50c6cf8a7e14d1be4e7a2356479c073e5c29433c3cdf9c5c SHA512 a39e09db4f34d1358de9e929b4c1e10b677d7e8aeffd6afb36d42543b18f1dfa77e3e26331e3fa1b556bae3d8c75ab4bd5796c7ccf2dda4eb365edb307828bed WHIRLPOOL 0cb6e5e96460514c17f3242d8fe936dc2545c07ca08c03ceb34730935435fde24d197300da54d4a19de86067f9e4bbc14178da2f7c03f4be57c89c81307f5d82
|
||||
AUX awk/fixlafiles.awk-no_gcc_la 8596 SHA256 91e36c29133b6ff854bc84acd6cd2e9d07be6eaa73ef9b23e4f7bc6371107fab SHA512 a970ade3e0b57b3280dd01036a95338c4a7f0c7ec45e7aeb7255197df43e13a5fad8c565b4b345e3a0c8326f71ae7ab598b804eaeaa9d59eda8683195bccfe45 WHIRLPOOL e3da866b8902fbf639af545b43c3b6ccaca0f5d543647007f02e0b8bfc16a675463b8681e9fad11d6ce29517e099636f43708f880ef7a433e4578ee408c3b099
|
||||
AUX c89 412 SHA256 29ad5dd697135c2892067e780447894dc1cd071708157e46d21773ab99c5022c SHA512 71d33a147339d8d70a62aa22a95d3e70e445d8435d6ac05893f7da19ae851b89bea851f6ce213fbd22470f13572ae13b83cf02f0621333f07d7b0c68a79b7924 WHIRLPOOL d9707a2be8da7a709b54fcb1154cfa05e479f8c3bdd6173822ee1f1bc265b2a0d04741c0685bfb0db68e1e4297fb032d2f8ff94da88014575d947054474d8295
|
||||
AUX c99 446 SHA256 057b348cf5be9b4fb9db99a4549f6433c89d21e5f91dc5e46b0b4dc6b70432f5 SHA512 bf3b0eb1125d5e89b433954fcbf805cd86dec5a6eeb23df685ebf3ff83a610573f2ffcec65d893244c845936a73918387cba026710c65c854b2c94a78b007989 WHIRLPOOL b888038b96615c7a0363555b407a3de2c1f17e34428fa16dfbf56fcf68875d6bcdecbc61b545d7f71842ff1909a3ffeff17165fa7f56b48f95adae22f5f8bff1
|
||||
AUX fix_libtool_files.sh 1679 SHA256 0037e3f1303560f1ffadc61c7ed6bca13a41d6f2f70f196276938cda9dd158f0 SHA512 834beeb04f1057a0b1f79025fc9bbe0193ea8457055cc10b5b4c528a60e37ead7614a686aa6e7285e040161a91d4b5ff394539a33fc2f4b44be5c2514d0bb283 WHIRLPOOL c7e2f517e0c5c9a8930cd615f68222b44a6f227518ea71b5eb9b6436e1642be748d9cb4c0732f27df6c2ded2eb2c758d67ee9cb58e409f30814f988523dc649b
|
||||
AUX gcc-4.6.2-fix-ICE-on-arm.patch 646 SHA256 4df58b7f95bca7c850b98b90cf1798bbc2f988e9c86f608aa4c4c2b6a743aa58 SHA512 d08bb65d8796e8acf271ff5f123b0f2b57291a9a49b71441abf9c454987490c97ff672d7e51d6303ae6b5f0609b71535fc670741dd3cd5851d1f07c66cf18574 WHIRLPOOL 1ac16e4a87e0e4fec5ee7038c30b8b1796881c5b8860e78a1bbe14a328927dad8ba10cbaef9116fbff95819eb9729e79f1bf5ca9c1aee9f8e710bbaf3a01b6b7
|
||||
AUX gcc-configure-LANG.patch 2052 SHA256 63de6d2dcfe14f21d147abeb1390405b9220c03f8e968f482d4b4c1cf279c88b SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129 WHIRLPOOL 3cc1ec912fb192ff1058de5b93e49a994ba30d1501a932290dd5b3df1cd783875621cda56edeb41894cd5fa10c04917e693a40a60be8d742ddd7992bf5d8afeb
|
||||
AUX gcc-configure-texinfo.patch 337 SHA256 74b73a7ecec2d88889876b4db480cd173632f49d5396bb8e5b3c93673f9b5b98 SHA512 a15fba8bf2ff02bdeca54d6f186bfa08c1079c6a8ba0a3beef154483ce5c1b8c497e7ffeec32371968f0037e0ff8384609eb0c367d0155a4e5a7eef8aad084d5 WHIRLPOOL 39d008aad06f7621e4e5db15f5e85a59e583b43f8d247029bd4944466bb60a9795bda157d185c45c329294078e282703a243aad5c468d90c77665dd6336870d4
|
||||
AUX gcc-spec-env-r1.patch 3148 SHA256 da0a6442eb42bce58cbdc7858b110a2e65fc5bd5b4b780b9b491033de6e302fa SHA512 ecae71577543772cfe1711f1b4a8815c0b5d706ebd01edacd1f07586637d4805e25771f970a6e6d1bb696d4b1b5ef3e0036088a96a9f6beff7ddaee704175d16 WHIRLPOOL 3535605998eabccdee71ba396ed5cefbb8b0a8cb073101f6444c7d01233f3b3904c1b29f4daf0a3417c68de8dbd62a0b7dc367cacfcbfa0c4ee1b69b7df8c6fb
|
||||
AUX gcc-spec-env.patch 1544 SHA256 64b01f29fb853fee5ecda998b66eeaa7ec86ff1fc3b21432bfd69eb543c93e6a SHA512 ce9c1f923e2c6d17347ec2d3d8482351a9644194b2753627389294d43bb4f11b9c2ef41eda1b46ad83d09901a0bedebd5b6b8a57a198646030ab61e8d2d8cb48 WHIRLPOOL b88c9c18e20868b3ff535c3390408ebe8f1304bcec6e70b6472781f684671265860dff4335f2301d3b4d3b73395283b29673f0f5da62414e1094cfcb8130e8d8
|
||||
AUX mkinfodir 7324 SHA256 0565353e767e253207adb8b5c9be9ba215a628447e075a4dc7bb3183ed099d2a SHA512 a05f9130d98e4cb4d3254b757de06d772d0a965ac4b5a9a15082b1cb694a2fd32c9c8f550745a9423ba3cfdd1c5e87b6d568a809301772a24cc6e1a414d5f98b WHIRLPOOL 4001ae3f7fb666a84e12432a1a41eacf62ebf922181c279e4d06dad32e44d0b499d13e098e794fdd19a9cff5c438a28e5e9e125fb78e72bb913fa5ddd8e44bae
|
||||
DIST ecj-4.5.jar 1470676 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e WHIRLPOOL db54206cfd5eba935e707b8d36ebac40f3c4ed3c1f06ede794288cbdd9c7da9d90c0898e8c98b383af276ea4c1b40c861ebd9e1fc1dce712946184321339d3ad
|
||||
DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 WHIRLPOOL 8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e
|
||||
DIST gcc-4.7.3-patches-1.0.tar.bz2 39969 SHA256 c9a5d7c6da7d056f7fca15b33eb7f399bb7ed5a2d0a892b97e0c7609146a2a24 SHA512 d5c3151eca135bb08511955d81c7727adbf8fc33043b64a4431b0fe95d2cac1bf3c5410fa9616373d6b3d932604195ff29f6321e61a3de69a7704f1d1cb1759f WHIRLPOOL 315578ef5a7226ed66c4831b25c79647120453dc169dc8ecd291e099500ae52284ffa451164522d6d55d11c440a7aa353a283c07e28c103c522df0c2e2f43fff
|
||||
DIST gcc-4.7.3-piepatches-v0.5.5.tar.bz2 15378 SHA256 b6f6b6709e7b13f6c05090f3bf68f3a64db19d52593a870cc7717c5c128b05a2 SHA512 d0189d2e4049d471dedaddcba319fe2c2b29855f7b33e84b26051504ead2936c852ef7870a1d19d755bb343c9b121b0ce5295665ab4ff1e448436bd448c08e1f WHIRLPOOL ccceedb41d48da69f5a423b6b73436c9fbb7b1e382456abfcef954f25666e1b7caf926bc5eb977e934502359a356d623c439d80825e87d9fe46b5ae78a74bde3
|
||||
DIST gcc-4.7.3-uclibc-patches-1.0.tar.bz2 3013 SHA256 731c518f31db8debd08bea92db8e3bf1e9962552909407452dc2ac3c491cf11c SHA512 6119159300e76be87732f2a44b1a9388228235d7832370dbae531c2c96694ea42ed4c75acf7abca98ec0035fbc50a8bf84225574505358c2739e64b0f3fd6a95 WHIRLPOOL 4a874a5684937907720aa5a4a1dbc237aa7d985292befd1c591cf0789c71e0da22ced5b7f7e049731bc2d6496e959cbe3c9010047ceb1b05675e61865004c71a
|
||||
DIST gcc-4.7.3.tar.bz2 82904224 SHA256 2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3 SHA512 5671a2dd3b6ac0d23f305cb11a796aebd823c1462b873136b412e660966143f4e07439bd8926c1443b78442beb6ae370ef91d819ec615920294875b722b7b0bd WHIRLPOOL cb3408e3e251833f38ae7cf2388a1ddce864614fe1c68de9729a1a9a1f8f028ab92c0f2b863e7fa3ac16dbf443306ac864e74c9cce90690230c081ee2ac309d3
|
||||
EBUILD gcc-4.7.3.ebuild 5624 SHA256 54dbc6746be80453a44bf3597906f340e15d534eff6c85c81e865d5f0f0905a8 SHA512 731496e000362714c3cfe4ff8323a1e28a32a15952acd2b7ab88d65aee6806d5215d201725439c040e9f0b5cb3b144ffee2162c0dcdf1baa0ffac63b7d5434a2 WHIRLPOOL 71b80f4011156906cdf2090e8042827b6b6a159980bffffc6e699674c7eaf378421fd2bcddadd769bdbc79bb2e02d805087ef87bd8e6d367437cb934b59e883d
|
||||
MISC metadata.xml 1780 SHA256 57d7428c3d0ef34e72e780a3cfa7a059202b5c80f2d61cc12f90f0d1e8f5f12e SHA512 8895da9aabea6ddd36db6a2320a6290d8a676a2b5bd75db342ecf2f5791b1ed22f970269e784e790a5f8fc74bf3871953ecfc83df3b249365bd98d6335e2310f WHIRLPOOL d124e9bb7a1e4a28582f421584e4234da7f85d722f8e8fb4b7ec910f01bf5b437a3c215fb69ab8733385e70cd6d56830658146cb9a34e6e025ccfb6ebea1f6cf
|
@ -1,314 +0,0 @@
|
||||
# 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
|
@ -1,335 +0,0 @@
|
||||
# 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
|
@ -1,20 +0,0 @@
|
||||
#! /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 "$@"
|
@ -1,21 +0,0 @@
|
||||
#! /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+"$@"}
|
@ -1,68 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright 1999-2012 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.16 2012/05/18 21:28:56 vapier 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
|
||||
}
|
||||
|
||||
case $2 in
|
||||
--oldarch) [ $# -ne 3 ] && usage ;;
|
||||
*) [ $# -ne 1 ] && usage ;;
|
||||
esac
|
||||
|
||||
ARGV1=$1
|
||||
ARGV2=$2
|
||||
ARGV3=$3
|
||||
|
||||
. /etc/profile || exit 1
|
||||
. /etc/init.d/functions.sh || exit 1
|
||||
|
||||
if [ ${EUID:-0} -ne 0 ] ; then
|
||||
eerror "${0##*/}: Must be root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# make sure the files come out sane
|
||||
umask 0022
|
||||
|
||||
OLDCHOST=
|
||||
[ "${ARGV2}" = "--oldarch" ] && OLDCHOST=${ARGV3}
|
||||
|
||||
AWKDIR="/usr/share/gcc-data"
|
||||
|
||||
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..."
|
||||
exec gawk -f "${AWKDIR}/fixlafiles.awk"
|
||||
|
||||
# vim:ts=4
|
@ -1,24 +0,0 @@
|
||||
--- 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"
|
@ -1,64 +0,0 @@
|
||||
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
|
@ -1,16 +0,0 @@
|
||||
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
|
||||
;;
|
||||
|
@ -1,87 +0,0 @@
|
||||
2013-08-22 Magnus Granberg <zorry@gentoo.org>
|
||||
|
||||
* gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var
|
||||
and move the process of the user specifed specs.
|
||||
|
||||
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
|
||||
Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg
|
||||
|
||||
--- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100
|
||||
+++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200
|
||||
@@ -6427,6 +6428,48 @@ main (int argc, char **argv)
|
||||
do_option_spec (option_default_specs[i].name,
|
||||
option_default_specs[i].spec);
|
||||
|
||||
+#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
|
||||
+ /* Process any user specified specs in the order given on the command
|
||||
+ * line. */
|
||||
+ for (uptr = user_specs_head; uptr; uptr = uptr->next)
|
||||
+ {
|
||||
+ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
|
||||
+ R_OK, true);
|
||||
+ read_specs (filename ? filename : uptr->filename, false, true);
|
||||
+ }
|
||||
+ /* Process any user self specs. */
|
||||
+ {
|
||||
+ struct spec_list *sl;
|
||||
+ for (sl = specs; sl; sl = sl->next)
|
||||
+ if (sl->name_len == sizeof "self_spec" - 1
|
||||
+ && !strcmp (sl->name, "self_spec"))
|
||||
+ do_self_spec (*sl->ptr_spec);
|
||||
+ }
|
||||
+
|
||||
/* Process DRIVER_SELF_SPECS, adding any new options to the end
|
||||
of the command line. */
|
||||
|
||||
@@ -6535,24 +6578,6 @@ main (int argc, char **argv)
|
||||
PREFIX_PRIORITY_LAST, 0, 1);
|
||||
}
|
||||
|
||||
- /* Process any user specified specs in the order given on the command
|
||||
- line. */
|
||||
- for (uptr = user_specs_head; uptr; uptr = uptr->next)
|
||||
- {
|
||||
- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
|
||||
- R_OK, true);
|
||||
- read_specs (filename ? filename : uptr->filename, false, true);
|
||||
- }
|
||||
-
|
||||
- /* Process any user self specs. */
|
||||
- {
|
||||
- struct spec_list *sl;
|
||||
- for (sl = specs; sl; sl = sl->next)
|
||||
- if (sl->name_len == sizeof "self_spec" - 1
|
||||
- && !strcmp (sl->name, "self_spec"))
|
||||
- do_self_spec (*sl->ptr_spec);
|
||||
- }
|
||||
-
|
||||
if (compare_debug)
|
||||
{
|
||||
enum save_temps save;
|
@ -1,42 +0,0 @@
|
||||
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,
|
@ -1,233 +0,0 @@
|
||||
#!/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
|
||||
|
@ -1,164 +0,0 @@
|
||||
# Copyright 1999-2012 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.5.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
|
||||
# uclibc need to be >= 0.9.33
|
||||
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? (
|
||||
awt? (
|
||||
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 awt mudflap multilib nls nptl openmp altivec
|
||||
bootstrap build doc fixed-point 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."
|
||||
ebeep 10
|
||||
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
|
||||
|
||||
# drop the x32 stuff once 4.7 goes stable
|
||||
if [[ ${CTARGET} != x86_64* ]] || ! has x32 $(get_all_abis TARGET) ; then
|
||||
EPATCH_EXCLUDE+=" 90_all_gcc-4.7-x32.patch"
|
||||
fi
|
||||
|
||||
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
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?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>
|
Loading…
Reference in New Issue
Block a user