Installed libdep.a with --disable-shared

Prokhorov Maxim prokhorov.max@outlook.com
Wed May 14 12:47:45 GMT 2025


Hi,

I am using binutils-gdb 2.44 w/ configure --disable-shared

When preparing a distribution with a mingw toolchain, I've noticed that ld/Makefile specifically installs static archive of the libdep_plugin.o at $prefix/lib/bfd-plugins/libdep.a
Building GCC and later running it on a Windows host, this plugin file is read and "libdep.a is either not designed to run on Windows or it contains an error" error message is produced by the system.

My understanding is that the file is intended to be used exclusively as a dynamic library, is there a separate option for plugin file to be excluded from the statically built archives?
Or the assumption is that the plugin(s) must be disabled as well?

I have also noticed that the installer rule removes some erroneously copied build files after installation, looking at Makefile.am lines 806 and 807
install-data-local: install-bfdpluginLTLIBRARIES
...
        rm -f $(DESTDIR)$(bfdplugindir)/libdep.la
        rm -f $(DESTDIR)$(bfdplugindir)/libdep.dll.a

So there seems to be a conflict between ld/ build rules and plugins, which may warrant separating the two. For example, moving plugin sources to ld-plugins/ with a dynamic-build-only requirement. I am not very familiar with the autotools / autoconf setup though, so I am not yet sure of the actual change needed (or if it is even needed)

Thanks,
Maxim


More information about the Binutils mailing list