Mercurial > dovecot > core-2.2
view cc-wrapper.sh.in @ 15205:b0c7d2f8a185
--without-shared-libs: Link Dovecot libraries with --whole-archive flag for binaries.
This removes the need for the ugly unused_objects lists for binaries, which
were needed to avoid plugins from failing because they were missing some
functions.
Apparently there's no easy way to use --whole-archive properly with libtool,
so there's now a rather ugly cc-wrapper.sh that does it. Also this is done
only when GNU ld is deted. Most people are going to use --with-shared-libs
though, so I don't think any of this is going to be a real problem.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 12 Oct 2012 03:08:13 +0300 |
parents | |
children |
line wrap: on
line source
#!/bin/sh if echo "$*" | grep -- -ldl > /dev/null; then # the binary uses plugins. make sure we include everything from .a libs exec @CC@ -Wl,--whole-archive $* -Wl,--no-whole-archive else exec @CC@ $* fi