mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
configure: Move nm, objdump, and readelf to LIBC_PROG_BINUTILS
Allow the variables to be overriden or have the defaults come from the compiler currently in use. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
12
aclocal.m4
vendored
12
aclocal.m4
vendored
@ -133,6 +133,18 @@ if test -z "$GPROF"; then
|
|||||||
GPROF=`$CC -print-prog-name=gprof`
|
GPROF=`$CC -print-prog-name=gprof`
|
||||||
fi
|
fi
|
||||||
AC_SUBST(GPROF)
|
AC_SUBST(GPROF)
|
||||||
|
if test -z "$READELF"; then
|
||||||
|
READELF=`$CC -print-prog-name=readelf`
|
||||||
|
fi
|
||||||
|
AC_SUBST(READELF)
|
||||||
|
if test -z "$OBJDUMP"; then
|
||||||
|
OBJDUMP=`$CC -print-prog-name=objdump`
|
||||||
|
fi
|
||||||
|
AC_SUBST(OBJDUMP)
|
||||||
|
if test -z "$NM"; then
|
||||||
|
NM=`$CC -print-prog-name=nm`
|
||||||
|
fi
|
||||||
|
AC_SUBST(NM)
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl Run a static link test with -nostdlib -nostartfiles.
|
dnl Run a static link test with -nostdlib -nostartfiles.
|
||||||
|
295
configure
vendored
295
configure
vendored
@ -646,7 +646,6 @@ libc_cv_with_fp
|
|||||||
PYTHON
|
PYTHON
|
||||||
PYTHON_PROG
|
PYTHON_PROG
|
||||||
AUTOCONF
|
AUTOCONF
|
||||||
NM
|
|
||||||
BISON
|
BISON
|
||||||
AWK
|
AWK
|
||||||
SED
|
SED
|
||||||
@ -654,6 +653,9 @@ MAKEINFO
|
|||||||
MSGFMT
|
MSGFMT
|
||||||
MAKE
|
MAKE
|
||||||
LD
|
LD
|
||||||
|
NM
|
||||||
|
OBJDUMP
|
||||||
|
READELF
|
||||||
GPROF
|
GPROF
|
||||||
OBJCOPY
|
OBJCOPY
|
||||||
AR
|
AR
|
||||||
@ -683,8 +685,6 @@ sysheaders
|
|||||||
ac_ct_CXX
|
ac_ct_CXX
|
||||||
CXXFLAGS
|
CXXFLAGS
|
||||||
CXX
|
CXX
|
||||||
OBJDUMP
|
|
||||||
READELF
|
|
||||||
CPP
|
CPP
|
||||||
cross_compiling
|
cross_compiling
|
||||||
BUILD_CC
|
BUILD_CC
|
||||||
@ -2870,190 +2870,6 @@ if test -z "$CPP"; then
|
|||||||
CPP="$CC -E"
|
CPP="$CC -E"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$ac_tool_prefix"; then
|
|
||||||
# Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
|
|
||||||
set dummy ${ac_tool_prefix}readelf; ac_word=$2
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
|
||||||
if ${ac_cv_prog_READELF+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
if test -n "$READELF"; then
|
|
||||||
ac_cv_prog_READELF="$READELF" # Let the user override the test.
|
|
||||||
else
|
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
||||||
for as_dir in $PATH
|
|
||||||
do
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
test -z "$as_dir" && as_dir=.
|
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
|
||||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
||||||
ac_cv_prog_READELF="${ac_tool_prefix}readelf"
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
READELF=$ac_cv_prog_READELF
|
|
||||||
if test -n "$READELF"; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
|
|
||||||
$as_echo "$READELF" >&6; }
|
|
||||||
else
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
if test -z "$ac_cv_prog_READELF"; then
|
|
||||||
ac_ct_READELF=$READELF
|
|
||||||
# Extract the first word of "readelf", so it can be a program name with args.
|
|
||||||
set dummy readelf; ac_word=$2
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
|
||||||
if ${ac_cv_prog_ac_ct_READELF+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
if test -n "$ac_ct_READELF"; then
|
|
||||||
ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
|
|
||||||
else
|
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
||||||
for as_dir in $PATH
|
|
||||||
do
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
test -z "$as_dir" && as_dir=.
|
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
|
||||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
||||||
ac_cv_prog_ac_ct_READELF="readelf"
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
|
|
||||||
if test -n "$ac_ct_READELF"; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
|
|
||||||
$as_echo "$ac_ct_READELF" >&6; }
|
|
||||||
else
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$ac_ct_READELF" = x; then
|
|
||||||
READELF="false"
|
|
||||||
else
|
|
||||||
case $cross_compiling:$ac_tool_warned in
|
|
||||||
yes:)
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
|
||||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
|
||||||
ac_tool_warned=yes ;;
|
|
||||||
esac
|
|
||||||
READELF=$ac_ct_READELF
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
READELF="$ac_cv_prog_READELF"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$ac_tool_prefix"; then
|
|
||||||
# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
|
|
||||||
set dummy ${ac_tool_prefix}objdump; ac_word=$2
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
|
||||||
if ${ac_cv_prog_OBJDUMP+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
if test -n "$OBJDUMP"; then
|
|
||||||
ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
|
|
||||||
else
|
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
||||||
for as_dir in $PATH
|
|
||||||
do
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
test -z "$as_dir" && as_dir=.
|
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
|
||||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
||||||
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
OBJDUMP=$ac_cv_prog_OBJDUMP
|
|
||||||
if test -n "$OBJDUMP"; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
|
|
||||||
$as_echo "$OBJDUMP" >&6; }
|
|
||||||
else
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
if test -z "$ac_cv_prog_OBJDUMP"; then
|
|
||||||
ac_ct_OBJDUMP=$OBJDUMP
|
|
||||||
# Extract the first word of "objdump", so it can be a program name with args.
|
|
||||||
set dummy objdump; ac_word=$2
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
|
||||||
if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
if test -n "$ac_ct_OBJDUMP"; then
|
|
||||||
ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
|
|
||||||
else
|
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
||||||
for as_dir in $PATH
|
|
||||||
do
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
test -z "$as_dir" && as_dir=.
|
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
|
||||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
||||||
ac_cv_prog_ac_ct_OBJDUMP="objdump"
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
|
|
||||||
if test -n "$ac_ct_OBJDUMP"; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
|
|
||||||
$as_echo "$ac_ct_OBJDUMP" >&6; }
|
|
||||||
else
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$ac_ct_OBJDUMP" = x; then
|
|
||||||
OBJDUMP="false"
|
|
||||||
else
|
|
||||||
case $cross_compiling:$ac_tool_warned in
|
|
||||||
yes:)
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
|
||||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
|
||||||
ac_tool_warned=yes ;;
|
|
||||||
esac
|
|
||||||
OBJDUMP=$ac_ct_OBJDUMP
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
OBJDUMP="$ac_cv_prog_OBJDUMP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# We need the C++ compiler only for testing.
|
# We need the C++ compiler only for testing.
|
||||||
ac_ext=cpp
|
ac_ext=cpp
|
||||||
@ -4160,6 +3976,18 @@ if test -z "$GPROF"; then
|
|||||||
GPROF=`$CC -print-prog-name=gprof`
|
GPROF=`$CC -print-prog-name=gprof`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -z "$READELF"; then
|
||||||
|
READELF=`$CC -print-prog-name=readelf`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$OBJDUMP"; then
|
||||||
|
OBJDUMP=`$CC -print-prog-name=objdump`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$NM"; then
|
||||||
|
NM=`$CC -print-prog-name=nm`
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Accept binutils 2.25 or newer.
|
# Accept binutils 2.25 or newer.
|
||||||
@ -4781,99 +4609,6 @@ if test $libc_cv_compiler_ok != yes; then :
|
|||||||
critic_missing="$critic_missing compiler"
|
critic_missing="$critic_missing compiler"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$ac_tool_prefix"; then
|
|
||||||
# Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
|
|
||||||
set dummy ${ac_tool_prefix}nm; ac_word=$2
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
|
||||||
if ${ac_cv_prog_NM+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
if test -n "$NM"; then
|
|
||||||
ac_cv_prog_NM="$NM" # Let the user override the test.
|
|
||||||
else
|
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
||||||
for as_dir in $PATH
|
|
||||||
do
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
test -z "$as_dir" && as_dir=.
|
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
|
||||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
||||||
ac_cv_prog_NM="${ac_tool_prefix}nm"
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
NM=$ac_cv_prog_NM
|
|
||||||
if test -n "$NM"; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
|
|
||||||
$as_echo "$NM" >&6; }
|
|
||||||
else
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
if test -z "$ac_cv_prog_NM"; then
|
|
||||||
ac_ct_NM=$NM
|
|
||||||
# Extract the first word of "nm", so it can be a program name with args.
|
|
||||||
set dummy nm; ac_word=$2
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
|
||||||
if ${ac_cv_prog_ac_ct_NM+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
if test -n "$ac_ct_NM"; then
|
|
||||||
ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
|
|
||||||
else
|
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
||||||
for as_dir in $PATH
|
|
||||||
do
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
test -z "$as_dir" && as_dir=.
|
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
|
||||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
||||||
ac_cv_prog_ac_ct_NM="nm"
|
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
IFS=$as_save_IFS
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
ac_ct_NM=$ac_cv_prog_ac_ct_NM
|
|
||||||
if test -n "$ac_ct_NM"; then
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
|
|
||||||
$as_echo "$ac_ct_NM" >&6; }
|
|
||||||
else
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$ac_ct_NM" = x; then
|
|
||||||
NM="false"
|
|
||||||
else
|
|
||||||
case $cross_compiling:$ac_tool_warned in
|
|
||||||
yes:)
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
|
||||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
|
||||||
ac_tool_warned=yes ;;
|
|
||||||
esac
|
|
||||||
NM=$ac_ct_NM
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
NM="$ac_cv_prog_NM"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test "x$maintainer" = "xyes"; then
|
if test "x$maintainer" = "xyes"; then
|
||||||
for ac_prog in autoconf
|
for ac_prog in autoconf
|
||||||
do
|
do
|
||||||
|
@ -51,8 +51,6 @@ if test $host != $build; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(cross_compiling)
|
AC_SUBST(cross_compiling)
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_CHECK_TOOL(READELF, readelf, false)
|
|
||||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
|
||||||
|
|
||||||
# We need the C++ compiler only for testing.
|
# We need the C++ compiler only for testing.
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
@ -632,8 +630,6 @@ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[
|
|||||||
AS_IF([test $libc_cv_compiler_ok != yes],
|
AS_IF([test $libc_cv_compiler_ok != yes],
|
||||||
[critic_missing="$critic_missing compiler"])
|
[critic_missing="$critic_missing compiler"])
|
||||||
|
|
||||||
AC_CHECK_TOOL(NM, nm, false)
|
|
||||||
|
|
||||||
if test "x$maintainer" = "xyes"; then
|
if test "x$maintainer" = "xyes"; then
|
||||||
AC_CHECK_PROGS(AUTOCONF, autoconf, no)
|
AC_CHECK_PROGS(AUTOCONF, autoconf, no)
|
||||||
case "x$AUTOCONF" in
|
case "x$AUTOCONF" in
|
||||||
|
@ -1521,10 +1521,7 @@ class GlibcPolicyDefault(object):
|
|||||||
'--host=%s' % glibc.triplet,
|
'--host=%s' % glibc.triplet,
|
||||||
'CC=%s' % glibc.tool_name('gcc'),
|
'CC=%s' % glibc.tool_name('gcc'),
|
||||||
'CXX=%s' % glibc.tool_name('g++'),
|
'CXX=%s' % glibc.tool_name('g++'),
|
||||||
'NM=%s' % glibc.tool_name('nm'),
|
|
||||||
'OBJDUMP=%s' % glibc.tool_name('objdump'),
|
|
||||||
'RANLIB=%s' % glibc.tool_name('ranlib'),
|
'RANLIB=%s' % glibc.tool_name('ranlib'),
|
||||||
'READELF=%s' % glibc.tool_name('readelf'),
|
|
||||||
'STRIP=%s' % glibc.tool_name('strip'),
|
'STRIP=%s' % glibc.tool_name('strip'),
|
||||||
]
|
]
|
||||||
if glibc.os == 'gnu':
|
if glibc.os == 'gnu':
|
||||||
|
Reference in New Issue
Block a user