public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: Gentoo Development <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] [RFC] Update toolchain.eclass to deal with .xz compressed tarball for gcc-6.4.0
Date: Wed, 2 Aug 2017 16:52:48 -0400	[thread overview]
Message-ID: <8caeffd7-337d-7fc5-0d93-f02c0f60de15@gentoo.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

Hi everyone,

Upstream gnu.org used to provide .gz and .bz2 compressed tarballs for
gcc's source code.  With gcc-6.4.0 however, they only provide .gz and
.xz.  Our toolchain.eclass is written only for .bz2.  I'd like to commit
the attached patch to deal with this change.  A better fix would
autodetect whether upstream has .bz2 or .xz but I'm not sure how to
proceed with that.

-- 
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail    : blueness@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA

[-- Attachment #2: update-toolchain.patch --]
[-- Type: text/plain, Size: 1607 bytes --]

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index db6e643148c..3114bd85832 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -320,7 +320,11 @@ get_gcc_src_uri() {
        elif [[ -n ${SNAPSHOT} ]] ; then
                GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.bz2"
        else
-               GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.bz2"
+               if tc_version_is_between 6.4.0 7 ;  then
+                       GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.xz"
+               else
+                       GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.bz2"
+               fi
                # we want all branch updates to be against the main release
                [[ -n ${BRANCH_UPDATE} ]] && \
                        GCC_SRC_URI+=" $(gentoo_urls gcc-${GCC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2)"
@@ -424,7 +428,11 @@ gcc_quick_unpack() {
        elif [[ -n ${SNAPSHOT} ]] ; then
                unpack gcc-${SNAPSHOT}.tar.bz2
        elif [[ ${PV} != *9999* ]] ; then
-               unpack gcc-${GCC_RELEASE_VER}.tar.bz2
+               if tc_version_is_between 6.4.0 7 ;  then
+                       unpack gcc-${GCC_RELEASE_VER}.tar.xz
+               else
+                       unpack gcc-${GCC_RELEASE_VER}.tar.bz2
+               fi
                # We want branch updates to be against a release tarball
                if [[ -n ${BRANCH_UPDATE} ]] ; then
                        pushd "${S}" > /dev/null

             reply	other threads:[~2017-08-02 20:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 20:52 Anthony G. Basile [this message]
2017-08-02 21:00 ` [gentoo-dev] [RFC] Update toolchain.eclass to deal with .xz compressed tarball for gcc-6.4.0 Mike Gilbert
2017-08-02 21:09   ` Anthony G. Basile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8caeffd7-337d-7fc5-0d93-f02c0f60de15@gentoo.org \
    --to=blueness@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox