build failure, --enable-targets=all vs plugin support

Ralf Wildenhues Ralf.Wildenhues@gmx.de
Tue Oct 20 06:35:00 GMT 2009


* Alan Modra wrote on Mon, Oct 19, 2009 at 12:36:28PM CEST:
> +case " $enable_targets " in
> +  *" plugin "*)
> +    BFD_LIBADD="$BFD_LIBADD -ldl"
> +    ;;
> +  *" all "*)
> +    if test "$enable_shared" = "yes"; then
> +      BFD_LIBADD="$BFD_LIBADD -ldl"
> +    fi
> +    ;;
> +esac

The addition of -ldl shouldn't be made unconditionally on all systems,
some have the dl* functions in libc and don't have libdl.
GCC/gcc/configure.ac has solved this for more systems, and
libtool.m4:LT_SYS_DLOPEN_SELF for even more systems (but the latter uses
semantics that currently neither GCC nor binutils cope with, so it can
only serve as source to copy from).

It would be a good idea to factor the bits from gcc into a toplevel
config/*.m4 file.

Cheers,
Ralf



More information about the Binutils mailing list