From: dam@... Date: 2015-02-05T14:19:16+00:00 Subject: [ruby-core:68025] [ruby-trunk - Bug #10830] [Open] LDFLAGS not honoured when linking libruby.so Issue #10830 has been reported by Dagobert Michelsen. ---------------------------------------- Bug #10830: LDFLAGS not honoured when linking libruby.so https://bugs.ruby-lang.org/issues/10830 * Author: Dagobert Michelsen * Status: Open * Priority: Normal * Assignee: * ruby -v: both 2.1.5 and 2.2.0 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- During configure the libraries are detected with LDFLAGS used e.g. to defined a search direcrtory with -L. During linking of library.so in Makefile.in the line ~~~ $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(DTRACE_OBJ) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@ ~~~ does not use LDFLAGS to find linked libraries (in my case libgmp.so not in a standard place). When changed to this line linking works: ~~~ $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(DTRACE_OBJ) $(LDFLAGS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@ ~~~ -- https://bugs.ruby-lang.org/