[R-SIG-Win] Some suggested changes to Windows makefiles with respect to experimental toolchain

Avraham Adler avraham.adler at gmail.com
Wed Sep 9 00:54:24 CEST 2015


On Tue, Sep 8, 2015 at 6:32 PM, Avraham Adler <avraham.adler at gmail.com> wrote:
> Hello.
>
> While trying to build WITH LTO, I am seeing core R building properly,
> seeing the variables I created (including finding the BLAS) and
> passing the '-flto' flag properly up to building lapack.dll. From
> "building package 'base'" and on (such as stats, compiler, the
> recommended packages), the calls to gcc (compilation and linking) no
> longer have -flto in them. However, EOPTS does seem to propogate,
> which is why I missed this the first time around as I passed -flto in
> EOPTS. Of course, that misses the point as the linker doesn't use the
> EOPTS flag, which is why I modified the CC, FC, F77 etc. calls. Which
> file is it that controls the calls to gcc and gfortran from building
> base and on? If it helps, below is the patch I am using (well,
> actually the diff, as Windows doesn't play nicely with "patch").
>
> Thank you very much,
>
> Avi

For what it is worth,setting LTOCALL and LTOPREF directly in
src/gnuwin32/fixed/etc/Makeconf as below (as opposed to previous
e-mail), doesn't help either (from "making package 'base'" and on,
there is no -flto in the gcc/gfortran calls).

Thank you again,

Avi


ifdef USE_LTO
  DLLFLAGS+= -Wl,--allow-multiple-definition
  LINKFLAGS+= -Wl,--allow-multiple-definition
  LTOPREF = gcc-
  LTOCALL = -flto
else
  LTOPREF =
  LTOCALL=
endif



More information about the R-SIG-windows mailing list