This is the mail archive of the
mailing list for the binutils project.
Re: Skip ld/lto tests if plugins is disabled for binutils?
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: amodra at gmail dot com
- Cc: binutils at sourceware dot org
- Date: Thu, 14 Aug 2014 16:48:16 +0200
- Subject: Re: Skip ld/lto tests if plugins is disabled for binutils?
- Authentication-results: sourceware.org; auth=none
> From: Alan Modra <email@example.com>
> Date: Tue, 12 Aug 2014 15:14:43 +0200
> This is what I have here, so far. I'm going to leave committing this
> for a little while to let others comment.
> configury changes to make ld plugin support controlled by --enable-plugins
> This also makes --enable-plugins default to on for hosts that can
> support plugins, so we have consistent lto toolchain support. The
> ACX_LARGEFILE moves aren't strictly necessary, but are harmless and
> will be necessary if plugin support is extended to more hosts via
> libtool's dlopen support. I started down that path then decided it
> was more work than I was interested in doing. (ACX_LARGEFILE invokes
> * config/plugins.m4: Test for dlfcn.h or windows.h here to set
> default for --enable-plugins. Report error if someone tries to
> enable plugins on a host we don't support.
> * configure.ac: Delete redundant plugin related checks.
> * configure: Regenerate.
Needed for (gdb and) sim too? It seems to have broken all
simulators, or at least those for arm-eabi, cris-elf, d10v-elf,
frv-elf, h8300-elf, iq2000-elf, m32c-elf, m32r-elf, m68hc11-elf,
mcore-elf, mips-elf, mn10300-elf, powerpc-eabisim, sh-elf,
v850-elf like so:
gcc -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 -DDEFAULT_INLINE=0 -DMODET -DNEED_UI_LOOP_HOOK -DSIM_TARGET_SWITCHES -I. -I/tmp/hpautotest-sim/src/sim/arm -I../common -I/tmp/hpautotest-sim/src/sim/arm/../common -I../../include -I/tmp/hpautotest-sim/src/sim/arm/../../include -I../../bfd -I/tmp/hpautotest-sim/src/sim/arm/../../bfd -I../../opcodes -I/tmp/hpautotest-sim/src/sim/arm/../../opcodes -g -O2 -static-libstdc++ -static-libgcc -o run \
run.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a ../../libiberty/libiberty.a -lz -lnsl
../../bfd/libbfd.a(plugin.o): In function `try_load_plugin':
/tmp/hpautotest-sim/src/bfd/plugin.c:168: undefined reference to `dlopen'
/tmp/hpautotest-sim/src/bfd/plugin.c:175: undefined reference to `dlsym'
/tmp/hpautotest-sim/src/bfd/plugin.c:171: undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
make: Leaving directory `/tmp/hpautotest-sim/arm-eabi/sim/arm'