summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2010-05-20 12:57:26 +0000
committerBernard Cafarelli <voyageur@gentoo.org>2010-05-20 12:57:26 +0000
commit133da78a65db1838b6b975fb1de83c8c4ea7cc9e (patch)
tree178a691c0b3d408f58a037f96e0aaee1eac18498 /sys-devel
parentVersion bump. (diff)
downloadgentoo-2-133da78a65db1838b6b975fb1de83c8c4ea7cc9e.tar.gz
gentoo-2-133da78a65db1838b6b975fb1de83c8c4ea7cc9e.tar.bz2
gentoo-2-133da78a65db1838b6b975fb1de83c8c4ea7cc9e.zip
Add more code from toolchain eclass, should fix bugs #317525 (et_EE locale support), #320137 (strip unsupported CFLAGS)
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/llvm-gcc/ChangeLog9
-rw-r--r--sys-devel/llvm-gcc/files/gcc-configure-LANG.patch64
-rw-r--r--sys-devel/llvm-gcc/llvm-gcc-2.7-r1.ebuild131
3 files changed, 203 insertions, 1 deletions
diff --git a/sys-devel/llvm-gcc/ChangeLog b/sys-devel/llvm-gcc/ChangeLog
index 3623904c9213..aa79f5aa5ab9 100644
--- a/sys-devel/llvm-gcc/ChangeLog
+++ b/sys-devel/llvm-gcc/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-devel/llvm-gcc
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/ChangeLog,v 1.5 2010/04/27 12:44:37 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/ChangeLog,v 1.6 2010/05/20 12:57:26 voyageur Exp $
+
+*llvm-gcc-2.7-r1 (20 May 2010)
+
+ 20 May 2010; Bernard Cafarelli <voyageur@gentoo.org>
+ +llvm-gcc-2.7-r1.ebuild, +files/gcc-configure-LANG.patch:
+ Add more code from toolchain eclass, should fix bugs #317525 (et_EE locale
+ support), #320137 (strip unsupported CFLAGS)
*llvm-gcc-2.7 (27 Apr 2010)
diff --git a/sys-devel/llvm-gcc/files/gcc-configure-LANG.patch b/sys-devel/llvm-gcc/files/gcc-configure-LANG.patch
new file mode 100644
index 000000000000..d1b1b0353662
--- /dev/null
+++ b/sys-devel/llvm-gcc/files/gcc-configure-LANG.patch
@@ -0,0 +1,64 @@
+The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
+option parsing, it may break.
+
+http://bugs.gentoo.org/103483
+
+--- configure
++++ configure
+@@ -54,6 +54,19 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ unset $as_var
++ fi
++done
++
+ # Initialize some other variables.
+ subdirs=
+ MFLAGS= MAKEFLAGS=
+@@ -452,16 +463,6 @@
+ esac
+ done
+
+-# NLS nuisances.
+-# Only set these to C if already set. These must not be set unconditionally
+-# because not all systems understand e.g. LANG=C (notably SCO).
+-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+-# Non-C LC_CTYPE values break the ctype check.
+-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+-
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+ rm -rf conftest* confdefs.h
+ # AIX cpp loses on an empty file, so make sure it contains at least a newline.
+@@ -1850,6 +1850,19 @@
+ # Compiler output produced by configure, useful for debugging
+ # configure, is in ./config.log if it exists.
+
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then
++ eval \$as_var=C; export \$as_var
++ else
++ unset \$as_var
++ fi
++done
++
+ ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+ for ac_option
+ do
diff --git a/sys-devel/llvm-gcc/llvm-gcc-2.7-r1.ebuild b/sys-devel/llvm-gcc/llvm-gcc-2.7-r1.ebuild
new file mode 100644
index 000000000000..e096cc19e475
--- /dev/null
+++ b/sys-devel/llvm-gcc/llvm-gcc-2.7-r1.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm-gcc/llvm-gcc-2.7-r1.ebuild,v 1.1 2010/05/20 12:57:26 voyageur Exp $
+
+EAPI=2
+inherit libtool flag-o-matic gnuconfig multilib
+
+LLVM_GCC_VERSION=4.2
+MY_PV=${LLVM_GCC_VERSION}-${PV/_pre*}
+
+DESCRIPTION="LLVM C front-end"
+HOMEPAGE="http://llvm.org"
+SRC_URI="http://llvm.org/releases/${PV}/${PN}-${MY_PV}.source.tgz"
+
+LICENSE="GPL-2"
+SLOT=0
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="bootstrap fortran multilib nls objc objc++ test"
+
+RDEPEND=">=sys-devel/llvm-$PV"
+DEPEND="${RDEPEND}
+ >=sys-apps/texinfo-4.2-r4
+ >=sys-devel/binutils-2.18
+ >=sys-devel/bison-1.875
+ test? ( dev-util/dejagnu
+ sys-devel/autogen )"
+
+S=${WORKDIR}/llvm-gcc-${MY_PV}.source
+
+src_prepare() {
+ #we keep the directory structure suggested by README.LLVM,
+ mkdir -p "${S}"/obj
+
+ # From toolchain eclass
+ elibtoolize --portage --shallow --no-uclibc
+ gnuconfig_update
+
+ # update configure files
+ local f
+ for f in $(grep -l 'autoconf version 2.13' $(find "${S}" -name configure)) ; do
+ #ebegin " Updating ${f/${S}\/} [LANG]"
+ ebegin " Updating \"${f/${S}\/}\" [LANG]"
+ patch "${f}" "${FILESDIR}"/gcc-configure-LANG.patch >& "${T}"/configure-patch.log \
+ || eerror "Please file a bug about this"
+ eend $?
+ done
+ sed -i 's|A-Za-z0-9|[:alnum:]|g' gcc/*.awk #215828
+
+ if [[ -x contrib/gcc_update ]] ; then
+ einfo "Touching generated files"
+ ./contrib/gcc_update --touch | \
+ while read f ; do
+ einfo " ${f%%...}"
+ done
+ fi
+}
+
+src_configure() {
+ gcc_do_filter_flags
+ # Target options are handled by econf
+
+ cd "${S}"/obj
+ EXTRALANGS=""
+ use fortran && EXTRALANGS="${EXTRALANGS},fortran"
+ use objc && EXTRALANGS="${EXTRALANGS},objc"
+ use objc++ && EXTRALANGS="${EXTRALANGS},obj-c++"
+
+ ECONF_SOURCE="${S}" econf --prefix=/usr/$(get_libdir)/${PN}-${MY_PV} \
+ $(use_enable multilib) \
+ --program-prefix=${PN}-${MY_PV}- \
+ --enable-llvm=/usr --enable-languages=c,c++${EXTRALANGS} \
+ || die "configure failed"
+}
+
+src_compile() {
+ gcc_do_filter_flags
+ cd "${S}"/obj
+ BUILDOPTIONS="LLVM_VERSION_INFO=${MY_PV}"
+ use bootstrap && BUILDOPTIONS="${BUILDOPTIONS} bootstrap"
+ emake ${BUILDOPTIONS} || die "emake failed"
+}
+
+src_test() {
+ cd "${S}"/obj
+ emake -j1 -k check || ewarn "check failed and that sucks :("
+}
+
+src_install() {
+ cd "${S}"/obj
+
+ # Do allow symlinks in private gcc include dir as this can break the build
+ find gcc/include*/ -type l -print0 | xargs -0 rm -f
+ # Remove generated headers, as they can cause things to break
+ # (ncurses, openssl, etc).
+ for x in $(find gcc/include*/ -name '*.h') ; do
+ grep -q 'It has been auto-edited by fixincludes from' "${x}" \
+ && rm -f "${x}"
+ done
+
+ emake DESTDIR="${D}" install || die "installation failed"
+ rm -rf "${D}"/usr/share/man/man7
+ if ! use nls; then
+ einfo "nls USE flag disabled, not installing locale files"
+ rm -rf "${D}"/usr/share/locale
+ fi
+
+ # Add some symlinks
+ dodir /usr/bin
+ cd "${D}/usr/bin"
+ for X in c++ g++ cpp gcc gcov gccbug ; do
+ ln -s /usr/$(get_libdir)/${PN}-${MY_PV}/bin/${PN}-${MY_PV}-${X} llvm-${X}
+ done
+ use fortran && \
+ ln -s /usr/$(get_libdir)/${PN}-${MY_PV}/bin/${PN}-${MY_PV}-gfortran llvm-gfortran
+}
+
+gcc_do_filter_flags() {
+ strip-flags
+
+ # In general gcc does not like optimization, and add -O2 where
+ # it is safe. This is especially true for gcc 3.3 + 3.4
+ replace-flags -O? -O2
+
+ # ... sure, why not?
+ strip-unsupported-flags
+
+ # dont want to funk ourselves
+ filter-flags '-mabi*' -m31 -m32 -m64
+
+ filter-flags '-mcpu=*'
+}