On Tue, Aug 23, 2016 at 02:02:40AM +0200, gno wrote:
On Mon, 22 Aug 2016 21:39:12 +0200
Ricardo Wurmus <address@hidden> wrote:
+ #:make-flags
+ '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX"
+ "linux")
This doesn't work for me - lua-lgi still complains about lua not being
able to dynamically load. But this does work:
(replace 'build
(lambda _ (zero? (system* "make"
"LDFLAGS=-ldl" "CFLAGS=-fPIC -DLUA_USE_DLOPEN" "linux"))))
I tried adding LDFLAGS in #make-flags to no avail.
Based on my reading of the Makefile (and the 'src/Makefile'), I think we
should be using MYCFLAGS and MYLDFLAGS.
CFLAGS and LDFLAGS include MYCFLAGS and MYLDFLAGS, respectively, but
they also include some default flags and platform-dependent flags. By
setting CFLAGS and LDFLAGS directly, we lose those default and
platform-dependent values.
By the way, '-ldl' does get passed to GCC in 'src/Makefile', but I don't
think it gets passed to the linker, although my knowledge here is not
strong.