On 20 October 2013 at 17:58, Julian Gilbey wrote:
| > Try 
| >   
| >    $ cat /usr/share/R/debian/r-cran.mk
| > 
| > Patches and testing welcome. 
| > 
| > This r-cran.mk file is used by what must now be ~ 200 packages so this may 
be
| > useful to have, but I am personally not too worried about hardening of R
| > add-on packages.
| 
| Ah, I'm guessing it comes from /usr/lib/R/etc/Makeconf (I straced R
| CMD config LDFLAGS).  That seems to be created at R build time, so I
| wonder whether simply tweaking that would do the trick?

Good thinking -- yes it would.  We code'em down in debian/rules for
configure, they then tend to get passed through.

That would probably be worth it!   (And in case you look at the debian/rules
for r-base, it is a bit of a mess that grew over ten+ years -- not proud of
it but heck it works :)
 
| I've just had a look at the debian/rules file for r-base.  At present,
| optimflags seems to be derived from a hand-written set of rules.
| Could it be replaced by something vaguely like the following:
| 
| optimflags = $(shell dpkg-buildflags --get CFLAGS)
| ldflags = $(shell dpkg-buildflags --get LDFLAGS)

Very nice. I was fully unaware of that option to dpkg-buildflags.

| etc., and the same for CPPFLAGS, CXXFLAGS, FFLAGS, and then set these
| environment variables when you run configure, instead of setting
| LDFLAGS to be empty?  I could write a whole patch if you wish, but
| only if you would like me to.

I'd appreciate it if you took a stab at it.  There is a ton of special casing
in there.  Would we need a ton of post-processing with sed to account for
that?  I;d hesitate to just say 'hell with it', breaking everything and
trying to put it back together on arch at a time.

But yes, the added flags should probably be going in there...

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to