[Xapian-devel] Search::Xapian cygwin fix

Olly Betts olly at survex.com
Thu Sep 20 15:05:52 BST 2007


On Thu, Sep 20, 2007 at 01:59:17PM +0200, Reini Urban wrote:
> The cygwin linker requires -shared, otherwise WinMain at 16 will not be skipped.
> 
> BTW: mingw also. But this should test and fix someone else.

I think all platforms need to use -shared to create a shared object with GCC.

Hmm, looking at the generated Makefile here, the only place $(LD) is
used is in this rule:

$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
	$(RM_F) $@
	$(LD)  $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) -o $@ $(MYEXTLIB)	\
	  $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST)	\
	  $(INST_DYNAMIC_FIX)
	$(CHMOD) $(PERM_RWX) $@

And on my Linux box, LDDLFLAGS is set to this in the generated Makefile:

LDDLFLAGS = -shared -L/usr/local/lib 

And that comes from the Config module:

perl -e 'use Config; print "$Config{lddlflags}\n"'

What value does LDDLFLAGS have for you?

Is that the value from Config?

Cheers,
    Olly



More information about the Xapian-devel mailing list