autoreconf-ed mingw project gets -z via -specs=/usr/lib/rpm/redhat/redhat-hardened-ld via libtool

Michael Cronenworth mike at cchtml.com
Wed Apr 22 16:23:57 UTC 2015


On 04/21/2015 05:17 PM, Sandro Mani wrote:
> In mingw-libmng I do a autoreconf -if before %mingw_configure (to regenerate the
> Makefiles with -no-undefined), but then the build fails because of
>
> /usr/lib/gcc/i686-w64-mingw32/5.0.0/../../../../i686-w64-mingw32/bin/ld:
> unrecognized option '-z'
> /usr/lib/gcc/i686-w64-mingw32/5.0.0/../../../../i686-w64-mingw32/bin/ld: use the
> --help option for usage information
>
> I traced the source of the issue to the libtool script copied by autoreconf which
> now includes
>
> compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"
>
> which is responsible for adding -z. I am unsure however how to properly fix the
> issue, short of sed-ing out the -specs=/usr/lib/rpm/redhat/redhat-hardened-ld from
> the libtool script...
>
> Any ideas?

I'm running into the same issue with wine-mono. I ended up sed'ing the specs line 
out of libtool.

IMO this is a libtool bug. The rpm macros need to control the hardening feature and 
in this case they do not.


More information about the mingw mailing list