mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
sim: build: switch to bfd & opcodes libtool linker scripts
Now that we use libtool to link, we don't need to duplicate all the libs that bfd itself uses. This simplifies the configure & Makefile.
This commit is contained in:
363
sim/configure
vendored
363
sim/configure
vendored
@ -861,7 +861,6 @@ READLINE_LIB
|
||||
TERMCAP_LIB
|
||||
SDL_LIBS
|
||||
SDL_CFLAGS
|
||||
lt_cv_dlopen_libs
|
||||
OTOOL64
|
||||
OTOOL
|
||||
LIPO
|
||||
@ -878,24 +877,6 @@ LD
|
||||
FGREP
|
||||
SED
|
||||
LIBTOOL
|
||||
PLUGINS_FALSE
|
||||
PLUGINS_TRUE
|
||||
ZSTD_LIBS
|
||||
ZSTD_CFLAGS
|
||||
zlibinc
|
||||
zlibdir
|
||||
CATOBJEXT
|
||||
GENCAT
|
||||
INSTOBJEXT
|
||||
DATADIRNAME
|
||||
CATALOGS
|
||||
POSUB
|
||||
GMSGFMT
|
||||
XGETTEXT
|
||||
INCINTL
|
||||
LIBINTL_DEP
|
||||
LIBINTL
|
||||
USE_NLS
|
||||
LIBOBJS
|
||||
C_DIALECT
|
||||
PKG_CONFIG_LIBDIR
|
||||
@ -984,9 +965,6 @@ ac_user_opts='
|
||||
enable_option_checking
|
||||
with_pkgversion
|
||||
with_bugurl
|
||||
with_system_zlib
|
||||
with_zstd
|
||||
enable_plugins
|
||||
enable_shared
|
||||
enable_static
|
||||
with_pic
|
||||
@ -1030,8 +1008,6 @@ CPP
|
||||
PKG_CONFIG
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG_LIBDIR
|
||||
ZSTD_CFLAGS
|
||||
ZSTD_LIBS
|
||||
SDL_CFLAGS
|
||||
SDL_LIBS
|
||||
AS_FOR_TARGET_AARCH64
|
||||
@ -1755,7 +1731,6 @@ Optional Features:
|
||||
--disable-option-checking ignore unrecognized --enable/--with options
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-plugins Enable support for plugins
|
||||
--enable-shared[=PKGS] build shared libraries [default=yes]
|
||||
--enable-static[=PKGS] build static libraries [default=yes]
|
||||
--enable-fast-install[=PKGS]
|
||||
@ -1813,9 +1788,6 @@ Optional Packages:
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-pkgversion=PKG Use PKG in the version string in place of "SIM"
|
||||
--with-bugurl=URL Direct users to URL to report a bug
|
||||
--with-system-zlib use installed libz
|
||||
--with-zstd support zstd compressed debug sections
|
||||
(default=auto)
|
||||
--with-pic try to use only PIC/non-PIC objects [default=use
|
||||
both]
|
||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||
@ -1834,8 +1806,6 @@ Some influential environment variables:
|
||||
directories to add to pkg-config's search path
|
||||
PKG_CONFIG_LIBDIR
|
||||
path overriding pkg-config's built-in search path
|
||||
ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
|
||||
ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
|
||||
SDL_CFLAGS C compiler flags for SDL, overriding pkg-config
|
||||
SDL_LIBS linker flags for SDL, overriding pkg-config
|
||||
AS_FOR_TARGET_AARCH64
|
||||
@ -8988,336 +8958,16 @@ $as_echo "#define gid_t int" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
ALL_LINGUAS=
|
||||
# If we haven't got the data from the intl directory,
|
||||
# assume NLS is disabled.
|
||||
USE_NLS=no
|
||||
LIBINTL=
|
||||
LIBINTL_DEP=
|
||||
INCINTL=
|
||||
XGETTEXT=
|
||||
GMSGFMT=
|
||||
POSUB=
|
||||
|
||||
if test -f ../intl/config.intl; then
|
||||
. ../intl/config.intl
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
|
||||
$as_echo_n "checking whether NLS is requested... " >&6; }
|
||||
if test x"$USE_NLS" != xyes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
$as_echo "#define ENABLE_NLS 1" >>confdefs.h
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
|
||||
$as_echo_n "checking for catalogs to be installed... " >&6; }
|
||||
# Look for .po and .gmo files in the source directory.
|
||||
CATALOGS=
|
||||
XLINGUAS=
|
||||
for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
|
||||
# If there aren't any .gmo files the shell will give us the
|
||||
# literal string "../path/to/srcdir/po/*.gmo" which has to be
|
||||
# weeded out.
|
||||
case "$cat" in *\**)
|
||||
continue;;
|
||||
esac
|
||||
# The quadruple backslash is collapsed to a double backslash
|
||||
# by the backticks, then collapsed again by the double quotes,
|
||||
# leaving us with one backslash in the sed expression (right
|
||||
# before the dot that mustn't act as a wildcard).
|
||||
cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
|
||||
lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
|
||||
# The user is allowed to set LINGUAS to a list of languages to
|
||||
# install catalogs for. If it's empty that means "all of them."
|
||||
if test "x$LINGUAS" = x; then
|
||||
CATALOGS="$CATALOGS $cat"
|
||||
XLINGUAS="$XLINGUAS $lang"
|
||||
else
|
||||
case "$LINGUAS" in *$lang*)
|
||||
CATALOGS="$CATALOGS $cat"
|
||||
XLINGUAS="$XLINGUAS $lang"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
LINGUAS="$XLINGUAS"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
|
||||
$as_echo "$LINGUAS" >&6; }
|
||||
|
||||
|
||||
DATADIRNAME=share
|
||||
|
||||
INSTOBJEXT=.mo
|
||||
|
||||
GENCAT=gencat
|
||||
|
||||
CATOBJEXT=.gmo
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# Use the system's zlib library.
|
||||
zlibdir="-L\$(top_builddir)/../zlib"
|
||||
zlibinc="-I\$(top_srcdir)/../zlib"
|
||||
|
||||
# Check whether --with-system-zlib was given.
|
||||
if test "${with_system_zlib+set}" = set; then :
|
||||
withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
|
||||
zlibdir=
|
||||
zlibinc=
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-zstd was given.
|
||||
if test "${with_zstd+set}" = set; then :
|
||||
withval=$with_zstd;
|
||||
else
|
||||
with_zstd=auto
|
||||
fi
|
||||
|
||||
|
||||
if test "$with_zstd" != no; then :
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd" >&5
|
||||
$as_echo_n "checking for libzstd... " >&6; }
|
||||
|
||||
if test -n "$ZSTD_CFLAGS"; then
|
||||
pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libzstd") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$ZSTD_LIBS"; then
|
||||
pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "libzstd") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
if test $pkg_failed = no; then
|
||||
pkg_save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $pkg_cv_ZSTD_LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LDFLAGS=$pkg_save_LDFLAGS
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd" 2>&1`
|
||||
else
|
||||
ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$ZSTD_PKG_ERRORS" >&5
|
||||
|
||||
|
||||
if test "$with_zstd" = yes; then
|
||||
as_fn_error $? "--with-zstd was given, but pkgconfig/libzstd.pc is not found" "$LINENO" 5
|
||||
fi
|
||||
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if test "$with_zstd" = yes; then
|
||||
as_fn_error $? "--with-zstd was given, but pkgconfig/libzstd.pc is not found" "$LINENO" 5
|
||||
fi
|
||||
|
||||
else
|
||||
ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
|
||||
ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
|
||||
$as_echo "#define HAVE_ZSTD 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
maybe_plugins=no
|
||||
for ac_header in dlfcn.h
|
||||
do :
|
||||
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
|
||||
"
|
||||
if test "x$ac_cv_header_dlfcn_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DLFCN_H 1
|
||||
_ACEOF
|
||||
maybe_plugins=yes
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
for ac_header in windows.h
|
||||
do :
|
||||
ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
|
||||
"
|
||||
if test "x$ac_cv_header_windows_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_WINDOWS_H 1
|
||||
_ACEOF
|
||||
maybe_plugins=yes
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
# Check whether --enable-plugins was given.
|
||||
if test "${enable_plugins+set}" = set; then :
|
||||
enableval=$enable_plugins; case "${enableval}" in
|
||||
no) plugins=no ;;
|
||||
*) plugins=yes
|
||||
if test "$maybe_plugins" != "yes" ; then
|
||||
as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
|
||||
fi ;;
|
||||
esac
|
||||
else
|
||||
plugins=$maybe_plugins
|
||||
|
||||
fi
|
||||
|
||||
if test "$plugins" = "yes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
|
||||
$as_echo_n "checking for library containing dlsym... " >&6; }
|
||||
if ${ac_cv_search_dlsym+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_func_search_save_LIBS=$LIBS
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char dlsym ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return dlsym ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
for ac_lib in '' dl; do
|
||||
if test -z "$ac_lib"; then
|
||||
ac_res="none required"
|
||||
else
|
||||
ac_res=-l$ac_lib
|
||||
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||
fi
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_search_dlsym=$ac_res
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext
|
||||
if ${ac_cv_search_dlsym+:} false; then :
|
||||
break
|
||||
fi
|
||||
done
|
||||
if ${ac_cv_search_dlsym+:} false; then :
|
||||
|
||||
else
|
||||
ac_cv_search_dlsym=no
|
||||
fi
|
||||
rm conftest.$ac_ext
|
||||
LIBS=$ac_func_search_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
|
||||
$as_echo "$ac_cv_search_dlsym" >&6; }
|
||||
ac_res=$ac_cv_search_dlsym
|
||||
if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "$plugins" = yes; then
|
||||
PLUGINS_TRUE=
|
||||
PLUGINS_FALSE='#'
|
||||
else
|
||||
PLUGINS_TRUE='#'
|
||||
PLUGINS_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Set options
|
||||
enable_dlopen=yes
|
||||
|
||||
|
||||
|
||||
enable_dlopen=no
|
||||
|
||||
|
||||
enable_win32_dll=no
|
||||
|
||||
@ -12776,7 +12426,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12779 "configure"
|
||||
#line 12429 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -12882,7 +12532,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 12885 "configure"
|
||||
#line 12535 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -13120,7 +12770,6 @@ CC="$lt_save_CC"
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind in -lsocket" >&5
|
||||
$as_echo_n "checking for bind in -lsocket... " >&6; }
|
||||
if ${ac_cv_lib_socket_bind+:} false; then :
|
||||
@ -16625,10 +16274,6 @@ LTLIBOBJS=$ac_ltlibobjs
|
||||
|
||||
|
||||
|
||||
if test -z "${PLUGINS_TRUE}" && test -z "${PLUGINS_FALSE}"; then
|
||||
as_fn_error $? "conditional \"PLUGINS\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
|
||||
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
Reference in New Issue
Block a user