[Rd] LDFLAGS defined in R_MAKEVARS_USER file is ignored for R CMD SHLIB on Windows

Jim Hester james.f.hester at gmail.com
Wed May 13 23:38:14 CEST 2015

I have tracked this discrepancy down to the use of `SHLIB_LD` rather than
`SHLIB_LINK` in share/make/winshlib.mk
This variable has been used in winshlib.mk since svn r47953
however the corresponding shlib.mk for linux has always used `SHLIB_LINK`

The attached patch updates the variables in winshlib.mk to use `SHLIB_LINK`
and makes the behavior consistent across platforms, which fixes my issue.

On Mon, May 11, 2015 at 12:28 PM, Jim Hester <james.f.hester at gmail.com>

> Example input and output to reproduce this can be found at
> https://gist.github.com/jimhester/b7f05f50794c88e44b17.
> I tested this attempting to compile the [digest](
> http://cran.r-project.org/web/packages/digest/index.html) package,
> `run.sh` and `run.bat` were both run in the package source directory on
> Ubuntu 14.01 and Windows 7 respectively.
> In particular while the `CFLAGS` values were properly passed to the
> compiler on both Linux and Windows, the `LDFLAGS` value was only passed to
> the linker on Linux, which caused the subsequent linking errors on Windows.
> Perhaps this is intended behavior, if so is there a different compiler
> variable I can use to pass flags to the linker on Windows?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SHLIB_LINK.patch
Type: text/x-patch
Size: 1134 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20150513/bec77f6e/attachment.bin>

More information about the R-devel mailing list