From murdoch.duncan at gmail.com  Tue Mar 10 19:37:12 2015
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Tue, 10 Mar 2015 14:37:12 -0400
Subject: [Rd] Notes on building a gcc toolchain for Rtools (but not
	multilib)
In-Reply-To: <1341091521.484978.1426006483818.JavaMail.root@fredhutch.org>
References: <1341091521.484978.1426006483818.JavaMail.root@fredhutch.org>
Message-ID: <54FF39D8.20102@gmail.com>

On 10/03/2015 12:54 PM, Dan Tenenbaum wrote:
>
> ----- Original Message -----
> > From: "Duncan Murdoch" <murdoch.duncan at gmail.com>
> > To: "Hsiu-Khuern Tang" <tangoh at gmail.com>, r-devel at r-project.org
> > Sent: Monday, March 9, 2015 10:40:02 AM
> > Subject: Re: [Rd] Notes on building a gcc toolchain for Rtools (but not	multilib)
> >
> > On 09/03/2015 11:07 AM, Hsiu-Khuern Tang wrote:
> > > On Mon, Mar 9, 2015 at 3:50 AM, Duncan Murdoch
> > > <murdoch.duncan at gmail.com> wrote:
> > > > On 08/03/2015 10:02 PM, Hsiu-Khuern Tang wrote:
> > > >> Hi,
> > > >>
> > > >> [This is a follow-up to the "New version of Rtools for Windows"
> > > >> thread
> > > >> in January, but I just subscribed and don't know how to reply to
> > > >> an
> > > >> old thread -- my apologies.]
> > > >
> > > > I am planning to put a new Rtools online today that uses a
> > > > different
> > > > build of gcc 4.9.2.  I will be concentrating on getting it to
> > > > work with
> > > > all the external libraries before the 3.2.0 release next month.
> > > >  I'm not
> > > > planning to try to get it to work with R-patched, and I expect it
> > > > won't:
> > > >  I needed to make a number of patches to R-devel for
> > > >  compatibility.
> > >
> > > I also worked off R-devel (I said wrongly that it was R-patched in
> > > my
> > > original post) and benefited from your compatibility changes.
> > >
> > > I look forward to the new Rtools and will test it by compiling some
> > > packages.
> >
> > It's now on the main site at CRAN, and should propagate to the
> > mirrors
> > reasonably quickly.  I'm hoping that tomorrow's R-devel build will
> > use
> > it, but there may be some last minute problems.
> >
>
> Thanks to you and everyone who worked on this. Is there a way to tell which toolchain built a given R-devel binary?
> If not, can you let us know when there is one on CRAN that was built with the new Rtools?

If you look in etc/*/Makeconf, you'll see something like this:

BINPREF ?= $(RTOOLS)gcc492_64/bin/

hopefully from tomorrow onwards.  If today's build was with the new 
toolchain, you should see a hardcoded path to where I have Rtools 
installed on the build machine, which isn't so helpful.  The previous 
toolchain left BINPREF blank.

If you want to use your own toolchain, just edit those files.  If you 
want to install the standard Rtools somewhere else, set an environment 
variable like

RTOOLS = C:/Rtools/

(where the terminal / is required.)



[Rd] Notes on building a gcc toolchain for Rtools (but not multilib)
Duncan Murdoch