diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2005-02-14 11:33:11 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2005-02-14 11:33:11 +0000 |
commit | 14addd10e57cc1fba0484de56d290d17d7ec0084 (patch) | |
tree | c06a0c3626817e1c54a6f77e26689dfc3396bb39 | |
parent | update virtual build (diff) | |
download | gentoo-2-14addd10e57cc1fba0484de56d290d17d7ec0084.tar.gz gentoo-2-14addd10e57cc1fba0484de56d290d17d7ec0084.tar.bz2 gentoo-2-14addd10e57cc1fba0484de56d290d17d7ec0084.zip |
Allow !<symbol> for CDEFINE in create_ml_includes.
-rw-r--r-- | eclass/kernel-2.eclass | 4 | ||||
-rw-r--r-- | eclass/multilib.eclass | 14 | ||||
-rw-r--r-- | eclass/toolchain.eclass | 33 |
3 files changed, 36 insertions, 15 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 99007cd25cb9..f24bb2001bc1 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.101 2005/02/12 22:32:47 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.102 2005/02/14 11:33:11 eradicator Exp $ # Description: kernel.eclass rewrite for a clean base regarding the 2.6 # series of kernel with back-compatibility for 2.4 @@ -262,7 +262,7 @@ install_headers() { dodir ${ddir}/asm-sparc64 cp -ax ${S}/include/asm-sparc64/* ${D}/${ddir}/asm-sparc64 - create_ml_includes ${ddir}/asm __sparc__:${ddir}/asm-sparc __sparc64__:${ddir}/asm-sparc64 + create_ml_includes ${ddir}/asm !__arch64__:${ddir}/asm-sparc __arch64__:${ddir}/asm-sparc64 ;; x86_64) dodir ${ddir}/asm-i386 diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index 643c877d6ac5..7f0a13658757 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.21 2005/02/13 14:05:54 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.22 2005/02/14 11:33:11 eradicator Exp $ # # Author: Jeremy Huddleston <eradicator@gentoo.org> # @@ -393,16 +393,18 @@ create_ml_includes() { local name="$(echo $file | tr a-z A-Z | sed 's:[^A-Z]:_:g')" { echo "/* Common header file autogenerated by create_ml_includes in multilib.eclass */" - #echo "#ifndef __CREATE_ML_INCLUDES_STUB_${name}__" - #echo "#define __CREATE_ML_INCLUDES_STUB_${name}__" - #echo "" local dir for dir in ${basedirs}; do if [ -f "${D}/${dir}/${file}" ]; then - echo "#ifdef $(create_ml_includes-sym_for_dir ${dir} ${mlinfo})" + local sym=$(create_ml_includes-sym_for_dir ${dir} ${mlinfo}) + if [[ ${sym::1} == "!" ]]; then + echo "#ifndef ${sym:1}" + else + echo "#ifdef ${sym}" + fi echo "#include \"$(create_ml_includes-relative_between ${dest}/$(dirname ${file}) ${dir}/${file})\"" - echo "#endif /* $(create_ml_includes-sym_for_dir ${dir} ${mlinfo}) */" + echo "#endif /* ${sym} */" echo "" fi done diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index cb9e0335dc38..38541c482535 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.109 2005/02/13 14:07:52 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.110 2005/02/14 11:33:11 eradicator Exp $ HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" LICENSE="GPL-2 LGPL-2.1" @@ -59,12 +59,15 @@ is_crosscompile() { GCC_RELEASE_VER=$(get_version_component_range 1-3) GCC_BRANCH_VER=$(get_version_component_range 1-2) -GCC_CONFIG_VER=${GCC_RELEASE_VER} GCCMAJOR=$(get_version_component_range 1) GCCMINOR=$(get_version_component_range 2) GCCMICRO=$(get_version_component_range 3) [[ -z ${BRANCH_UPDATE} ]] && BRANCH_UPDATE=$(get_version_component_range 4) +# According to gcc/c-cppbuiltin.c, GCC_CONFIG_VER MUST match this regex. +# ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? +GCC_CONFIG_VER=${GCC_CONFIG_VER:-"$(replace_version_separator 3 '-')"} + GCC_MANPAGE_VERSION=${GCC_MANPAGE_VERSION:-${GCC_RELEASE_VER}} # Pre-release support @@ -721,6 +724,14 @@ gcc-compiler_pkg_postinst() { einfo "If you have issues with packages unable to locate libstdc++.la," einfo "then try running 'fix_libtool_files.sh' on the old gcc versions." echo + + # If our gcc-config version doesn't like '-' in it's version string, + # tell our users that gcc-config will yell at them, but it's all good. + if ! has_version '>=sys-devel/gcc-config-1.3.10-r1' && [[ ${GCC_CONFIG_VER/-/} != ${GCC_CONFIG_VER} ]]; then + ewarn "Your version of gcc-config will issue about having an invalid profile" + ewarn "when switching to this profile. It is safe to ignore this warning," + ewarn "and this problem has been corrected in >=sys-devel/gcc-config-1.3.10-r1." + fi } gcc-compiler_pkg_prerm() { @@ -803,8 +814,17 @@ gcc_src_unpack() { disgusting_gcc_multilib_HACK || die "multilib hack failed" fi - einfo "patching gcc version: ${BRANCH_UPDATE} (${release_version})" - gcc_version_patch "${BRANCH_UPDATE} (${release_version})" + local version_string="${GCC_CONFIG_VER}" + + # Backwards support... add the BRANCH_UPDATE for 3.3.5-r1 and 3.4.3-r1 + # which set it directly rather than using ${PV} + if [ "${PVR}" = "3.3.5-r1" -o "${PVR}" = "3.4.3-r1" ]; then + version_string="${version_string} ${BRANCH_UPDATE}" + fi + + version_string="${version_string} (${release_version})" + einfo "patching gcc version: ${version_string}" + gcc_version_patch "${version_string}" # Misdesign in libstdc++ (Redhat) cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h @@ -1687,9 +1707,8 @@ do_gcc_config() { gcc_version_patch() { [[ -z $1 ]] && die "no arguments to gcc_version_patch" - sed -i -e 's~\(const char version_string\[\] = ".....\).*\(".*\)~\1 @GENTOO@\2~' ${S}/gcc/version.c || die "failed to add @GENTOO@" - sed -i -e "s:@GENTOO@:$1:g" ${S}/gcc/version.c || die "failed to patch version" - sed -i -e 's~http:\/\/gcc\.gnu\.org\/bugs\.html~http:\/\/bugs\.gentoo\.org\/~' ${S}/gcc/version.c || die "failed to update bugzilla URL" + sed -i -e "s~\(const char version_string\[\] = \"\).*\(\".*\)~\1$1\2~" \ + -e 's~http:\/\/gcc\.gnu\.org\/bugs\.html~http:\/\/bugs\.gentoo\.org\/~' ${S}/gcc/version.c || die "failed to update version.c with Gentoo branding." } # The purpose of this DISGUSTING gcc multilib hack is to allow 64bit libs |