This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4 of 7] cc/gcc: Add support for getting a gcc snapshot


On Tue, Dec 7, 2010 at 7:19 AM, Arnaud Lacombe <lacombar@gmail.com> wrote:
> Hi,
>
> I had the same in my tree! You may want to have a look, in particular
> for the download section, which require some other change in the
> downloader utility cruft.
>
> Â- Arnaud

Interesting. Thanks Arnaud!

Not saying that I don't like your patch, it is just a different way of
doing things.
The way that I had incorporated snapshots has no changes to gcc.sh.
The thing that your patch is missing (maybe it is in a separate patch)
is the "real gcc version" (I called it CT_CC_REAL_VERSION), which is
needed during the finalize step in scripts/build/internals.sh.

Even better then snapshot support, would be the ability to
checkout/export gcc from svn from a specific branch/revision, much
like eglibc.
But snapshots are a 'known good snapshot in time' that the gcc
developers cut during the development process. So when I started down
that path, I choose snapshots.

Binutils is a bit more different. They make a versioned snapshot
(binutils-2.21.51.tar.bz2), a daily snapshot (binutils.tar.gz), and a
weekly snapshot (binutils.weekly.tar.bz2).
But they all currently extract to 'binutils-2.21.51'. Because the name
of the archive is different then where the archive is extracted, it is
tempting for me to modify CT_Extract() to support these kind of
snapshot archives by basically running:

mkdir binutils-snapshot
tar jxvf ${full_file} -C binutils-snapshot --strip-components=1

So that all binutils snapshots live in ${CT_SRC_DIR}/binutils-snapshots

It's good to know that we have some things in common ;)

Cheers,

-Bryan

> On Tue, Dec 7, 2010 at 4:06 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
>> # HG changeset patch
>> # User Bryan Hundven <bryanhundven@gmail.com>
>> # Date 1291712194 28800
>> # Node ID 8f7cc140fe23d204d2d1915fb3f496f4eef9a7c6
>> # Parent Â73795525c82eaa7f4561f358c70d26ef9d72a446
>> cc/gcc: Add support for getting a gcc snapshot
>>
>> diff -r 73795525c82e -r 8f7cc140fe23 config/cc.in
>> --- a/config/cc.in   ÂMon Dec 06 22:42:07 2010 -0800
>> +++ b/config/cc.in   ÂTue Dec 07 00:56:34 2010 -0800
>> @@ -8,6 +8,9 @@
>> Âconfig CC_VERSION
>> Â Â string
>>
>> +config CC_SNAPSHOT
>> + Â Âstring
>> +
>> Âsource "config.gen/cc.in"
>>
>> Âconfig CC_SUPPORT_CXX
>> diff -r 73795525c82e -r 8f7cc140fe23 config/cc/gcc.in
>> --- a/config/cc/gcc.in ÂMon Dec 06 22:42:07 2010 -0800
>> +++ b/config/cc/gcc.in ÂTue Dec 07 00:56:34 2010 -0800
>> @@ -19,6 +19,30 @@
>> Â# Don't remove next line
>> Â# CT_INSERT_VERSION_BELOW
>>
>> +config CC_V_4_6_SNAPSHOT
>> + Â Âbool
>> + Â Âprompt "4.6 Snapshot (EXPERIMENTAL)"
>> + Â Âdepends on EXPERIMENTAL
>> + Â Âselect CC_GCC_4_6_or_later
>> +
>> +config CC_V_4_5_SNAPSHOT
>> + Â Âbool
>> + Â Âprompt "4.5 Snapshot (EXPERIMENTAL)"
>> + Â Âdepends on EXPERIMENTAL
>> + Â Âselect CC_GCC_4_5_or_later
>> +
>> +config CC_V_4_4_SNAPSHOT
>> + Â Âbool
>> + Â Âprompt "4.4 Snapshot (EXPERIMENTAL)"
>> + Â Âdepends on EXPERIMENTAL
>> + Â Âselect CC_GCC_4_4_or_later
>> +
>> +config CC_V_4_3_SNAPSHOT
>> + Â Âbool
>> + Â Âprompt "4.3 Snapshot (EXPERIMENTAL)"
>> + Â Âdepends on EXPERIMENTAL
>> + Â Âselect CC_GCC_4_3_or_later
>> +
>> Âconfig CC_V_4_5_1
>> Â Â bool
>> Â Â prompt "4.5.1 (EXPERIMENTAL)"
>> @@ -154,6 +178,11 @@
>> Â Â select CC_GCC_USE_MPC
>> Â Â select CC_GCC_HAS_LTO
>>
>> +config CC_GCC_4_6_or_later
>> + Â Âbool
>> + Â Âdefault n
>> + Â Âselect CC_GCC_4_5_or_later
>> +
>> Âconfig CC_GCC_HAS_GRAPHITE
>> Â Â bool
>> Â Â default n
>> @@ -188,6 +217,10 @@
>> Â Â string
>> Â# Don't remove next line
>> Â# CT_INSERT_VERSION_STRING_BELOW
>> + Â Âdefault "4.6-" if CC_V_4_6_SNAPSHOT
>> + Â Âdefault "4.5-" if CC_V_4_5_SNAPSHOT
>> + Â Âdefault "4.4-" if CC_V_4_4_SNAPSHOT
>> + Â Âdefault "4.3-" if CC_V_4_3_SNAPSHOT
>> Â Â default "4.5.1" if CC_V_4_5_1
>> Â Â default "4.5.0" if CC_V_4_5_0
>> Â Â default "4.4.5" if CC_V_4_4_5
>> @@ -217,6 +250,15 @@
>> Â Â depends on CC_LANG_JAVA
>> Â Â depends on CC_GCC_4_3_or_later
>>
>> +config CC_SNAPSHOT
>> + Â Âstring
>> + Â Âprompt "gcc snapshot date"
>> + Â Âdepends on CC_V_4_6_SNAPSHOT || CC_V_4_5_SNAPSHOT || CC_V_4_4_SNAPSHOT || CC_V_4_3_SNAPSHOT
>> + Â Âdefault ""
>> + Â Âhelp
>> + Â Â Check ftp://gcc.gnu.org/pub/gcc/snapshots/ for the latest snapshot.
>> + Â Â The string to enter should be just the 'YYYYMMDD' date of the snapshot.
>> +
>> Âconfig CC_PKGVERSION
>> Â Â string
>> Â Â prompt "gcc ID string"
>> diff -r 73795525c82e -r 8f7cc140fe23 scripts/build/internals.sh
>> --- a/scripts/build/internals.sh    ÂMon Dec 06 22:42:07 2010 -0800
>> +++ b/scripts/build/internals.sh    ÂTue Dec 07 00:56:34 2010 -0800
>> @@ -20,12 +20,12 @@
>> Â Â Â Â esac
>> Â Â Â Â CT_DoLog INFO "Stripping all toolchain executables"
>> Â Â Â Â CT_Pushd "${CT_PREFIX_DIR}"
>> - Â Â Â Âfor t in ar as c++ c++filt cpp dlltool dllwrap g++ gcc gcc-${CT_CC_VERSION} gcov gprof ld nm objcopy objdump ranlib readelf size strings strip addr2line windmc windres; do
>> + Â Â Â Âfor t in ar as c++ c++filt cpp dlltool dllwrap g++ gcc gcc-${CT_CC_REAL_VERSION} gcov gprof ld nm objcopy objdump ranlib readelf size strings strip addr2line windmc windres; do
>> Â Â Â Â Â Â [ -x bin/${CT_TARGET}-${t}${CT_HOST_SUFFIX} ] && ${CT_HOST}-strip ${strip_args} bin/${CT_TARGET}-${t}${CT_HOST_SUFFIX}
>> Â Â Â Â Â Â [ -x ${CT_TARGET}/bin/${t}${CT_HOST_SUFFIX} ] && ${CT_HOST}-strip ${strip_args} ${CT_TARGET}/bin/${t}${CT_HOST_SUFFIX}
>> Â Â Â Â done
>> Â Â Â Â CT_Popd
>> - Â Â Â ÂCT_Pushd "${CT_PREFIX_DIR}/libexec/gcc/${CT_TARGET}/${CT_CC_VERSION}"
>> + Â Â Â ÂCT_Pushd "${CT_PREFIX_DIR}/libexec/gcc/${CT_TARGET}/${CT_CC_REAL_VERSION}"
>> Â Â Â Â for t in cc1 cc1plus collect2; do
>> Â Â Â Â Â Â [ -x ${t}${CT_HOST_SUFFIX} ] && ${CT_HOST}-strip ${strip_args} ${t}${CT_HOST_SUFFIX}
>> Â Â Â Â done
>> diff -r 73795525c82e -r 8f7cc140fe23 scripts/crosstool-NG.sh.in
>> --- a/scripts/crosstool-NG.sh.in    ÂMon Dec 06 22:42:07 2010 -0800
>> +++ b/scripts/crosstool-NG.sh.in    ÂTue Dec 07 00:56:34 2010 -0800
>> @@ -151,6 +151,16 @@
>> ÂCT_CC_CORE_EXTRA_CONFIG="${CT_ARCH_CC_CORE_EXTRA_CONFIG} ${CT_CC_CORE_EXTRA_CONFIG}"
>> ÂCT_CC_EXTRA_CONFIG="${CT_ARCH_CC_EXTRA_CONFIG} ${CT_CC_EXTRA_CONFIG}"
>>
>> +# If we are using a gcc snapshot, get the real "version number" straight
>> +# here so we don't have to modify the build scripts.
>> +if [ "${CT_CC_V_4_5_SNAPSHOT}" = "y" -o "${CT_CC_V_4_6_SNAPSHOT}" = "y" ]; then
>> + Â Âif [ -n "${CT_CC_SNAPSHOT}" ]; then
>> + Â Â Â ÂCT_CC_VERSION="${CT_CC_VERSION}${CT_CC_SNAPSHOT}"
>> + Â Âelse
>> + Â Â Â ÂCT_Abort "You forgot to set the gcc snapshot date!"
>> + Â Âfi
>> +fi
>> +
>> Â# Compute the working directories names
>> ÂCT_TARBALLS_DIR="${CT_WORK_DIR}/tarballs"
>> ÂCT_SRC_DIR="${CT_WORK_DIR}/src"
>> @@ -572,6 +582,11 @@
>> Â Â fi
>> Âfi
>>
>> +# When referencing the real gcc version, and not the (possibly) snapshot
>> +# version, use ${CT_CC_REAL_VERSION} instead of the (possibly) snapshot
>> +# version.
>> +CT_CC_REAL_VERSION=$(cat ${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER)
>> +
>> Â# Now for the job by itself. Go have a coffee!
>> Âif [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
>> Â Â # Because of CT_RESTART, this becomes quite complex
>>
>> --
>> For unsubscribe information see http://sourceware.org/lists.html#faq
>>
>>
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]