diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-01-28 02:32:51 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-01-28 02:32:51 +0000 |
commit | 151821a31e860af9a9e434b3454dbadd3ff00eae (patch) | |
tree | e07c64add557faab87f0fc513c4b865f93b4a903 | |
parent | optimize memory/string usage a bit more (diff) | |
download | gcc-config-151821a31e860af9a9e434b3454dbadd3ff00eae.tar.gz gcc-config-151821a31e860af9a9e434b3454dbadd3ff00eae.tar.bz2 gcc-config-151821a31e860af9a9e434b3454dbadd3ff00eae.zip |
Update libgcj.pc symlinks #136382 #216241 and set GCC_SPECS with -E #251271 by Diego E. Pettenò.
-rwxr-xr-x | gcc-config | 37 |
1 files changed, 32 insertions, 5 deletions
@@ -1,7 +1,7 @@ #!/bin/bash -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.1,v 1.7 2008/03/16 01:20:11 vapier Exp $ +# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.1,v 1.8 2009/01/28 02:32:50 vapier Exp $ trap ":" INT QUIT TSTP @@ -19,6 +19,9 @@ umask 022 SED=$(type -P gsed) SED=${SED:-$(type -P sed)} +GENTOO_LIBDIR="@GENTOO_LIBDIR@" +[[ ${GENTOO_LIBDIR} == @*@ ]] && GENTOO_LIBDIR="lib" + usage() { cat << "USAGE_END" Usage: gcc-config [options] [CC Profile] @@ -273,7 +276,7 @@ switch_profile() { # Find the bin wrapper local wrapper - for wrapper in GENTOO_LIBDIR lib lib64 lib32 lib ; do + for wrapper in ${GENTOO_LIBDIR} lib lib64 lib32 lib ; do wrapper="${ROOT}usr/${wrapper}/misc/gcc-config" [[ -e ${wrapper} ]] && break done @@ -320,6 +323,18 @@ switch_profile() { cp -f "${wrapper}" "${ROOT}/lib/cpp" fi + # Relocate random crap + if ! is_cross_compiler ; then + if [[ -e ${ROOT}/usr/${GENTOO_LIBDIR}/pkgconfig/libgcj-${CC_COMP_VERSION}.pc ]] ; then + local mver=${CC_COMP_VERSION:0:3} + for x in "" "-${mver}" ; do + x="${ROOT}/usr/lib/pkgconfig/libgcj${x}.pc" + rm -f "${x}" + ln -s libgcj-${CC_COMP_VERSION}.pc "${x}" + done + fi + fi + # We need to make sure that libgcc_s.so / libunwind.so make it into /lib. # On many systems (x86/amd64/etc...), this will probably never matter, # but on other systems (arm/mips/etc...), this is quite critical. @@ -477,7 +492,12 @@ print_environ() { ;; esac - echo "${ENV_CMD} PATH${SET_ELEMENT}\"${GCC_PATH}:${PATH}\"" + ( + PATH=${GCC_PATH}:${PATH} + for var in PATH GCC_SPECS ; do + echo "${ENV_CMD} ${var}${SET_ELEMENT}\"${!var}\"" + done + ) } get_bin_path() { @@ -670,7 +690,14 @@ for x in "$@" ; do usage 0 ;; -V|--version) - echo "gcc-config-PORTAGE-VERSION" + rcsfile="$RCSfile: gcc-config-1.4.1,v $" + rcsfile=${rcsfile#: } + rcsfile=${rcsfile%,v*} + cvsrev="$Revision: 1.8 $" + cvsrev=${cvsrev#: } + cvsdate="$Date: 2009/01/28 02:32:50 $" + cvsdate=${cvsdate#: } + echo "${rcsfile} (r${cvsrev% *} @ ${cvsdate% *})" exit 0 ;; -*) |