Quoting Joachim Breitner (2015-03-10 13:49:40) > Am Dienstag, den 10.03.2015, 15:36 +0300 schrieb Dmitry Bogatov: >> * Joachim Breitner <nomeata@debian.org> [2015-02-26 10:53:07+0100] >>> Note that usually, this flag is not added explicitly in the >>> packaging, but rather introduced by using the values from >>> "dpkg-buildflags". We could try to do the same in >>> haskell-devscripts. >> >> Seems I found way. Take a look at patch in haskell-devscripts >> repository. > > Thanks. I’m a bit worried by > > + --ghc-options="-optl$$(dpkg-buildflags --get LDFLAGS)" \ > > Does this still work if one day > $ dpkg-buildflags --get LDFLAGS > returns multiple parameters separated by spaces? > > Does it work if dpkg-buildflags returns nothing? > > It seems that you will want to take each option returned by > "dpkg-buildflags --get LDFLAGS", prepend -optl to it, combine that and > pass it to --ghc-options. Or alternatively, for each option $opt > returned by dpkg-buildflags --get LDFLAGS, pass > --ghc-option=-optl$opt > to configure. Recent releases of cdbs resolves dpkg-buildflags already, so if already build-depending on cdbs I suggest this alternative: * Tighten to build-depend on cdbs (>= 0.4.127) * Include 1/class/langcore.mk * use $(LDFLAGS) The following should then work correctly with multiple LDFLAGS: --ghc-options="$(patsubst %,-optl%,$(LDFLAGS))" or identical but more compact: --ghc-options="$(LDFLAGS:%=-optl%)" Regards, - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
Attachment:
signature.asc
Description: signature