Skip to content

Commit cef3f69

Browse files
committed
Revert "configure: arrange to use appropriate objcopy"
This reverts commit 6124f42. It lacks pieces to work with system binutils.
1 parent 03b7140 commit cef3f69

File tree

4 files changed

+1
-119
lines changed

4 files changed

+1
-119
lines changed

gcc/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,6 @@ RANLIB_FOR_TARGET := $(shell \
499499
ORIGINAL_LD_FOR_TARGET = @ORIGINAL_LD_FOR_TARGET@
500500
ORIGINAL_NM_FOR_TARGET = @ORIGINAL_NM_FOR_TARGET@
501501
NM_FOR_TARGET = ./nm
502-
ORIGINAL_OBJCOPY_FOR_TARGET = @ORIGINAL_OBJCOPY_FOR_TARGET@
503502
STRIP_FOR_TARGET := $(shell \
504503
if [ -f $(objdir)/../binutils/strip-new ] ; then \
505504
echo $(objdir)/../binutils/strip-new ; \

gcc/configure

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,6 @@ gcc_cv_dsymutil
731731
gcc_cv_otool
732732
gcc_cv_readelf
733733
gcc_cv_objdump
734-
ORIGINAL_OBJCOPY_FOR_TARGET
735-
gcc_cv_objcopy
736734
ORIGINAL_NM_FOR_TARGET
737735
gcc_cv_nm
738736
ORIGINAL_LD_GOLD_FOR_TARGET
@@ -23438,83 +23436,6 @@ case "$ORIGINAL_NM_FOR_TARGET" in
2343823436
;;
2343923437
esac
2344023438

23441-
# Figure out what objcopy we will be using.
23442-
if ${gcc_cv_objcopy+:} false; then :
23443-
23444-
else
23445-
23446-
if test -f $gcc_cv_binutils_srcdir/configure.ac \
23447-
&& test -f ../binutils/Makefile \
23448-
&& test x$build = x$host; then
23449-
gcc_cv_objcopy=../binutils/objcopy$build_exeext
23450-
elif test -x objcopy$build_exeext; then
23451-
gcc_cv_objcopy=./objcopy$build_exeext
23452-
elif ( set dummy $OBJCOPY_FOR_TARGET; test -x $2 ); then
23453-
gcc_cv_objcopy="$OBJCOPY_FOR_TARGET"
23454-
else
23455-
# Extract the first word of "$OBJCOPY_FOR_TARGET", so it can be a program name with args.
23456-
set dummy $OBJCOPY_FOR_TARGET; ac_word=$2
23457-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23458-
$as_echo_n "checking for $ac_word... " >&6; }
23459-
if ${ac_cv_path_gcc_cv_objcopy+:} false; then :
23460-
$as_echo_n "(cached) " >&6
23461-
else
23462-
case $gcc_cv_objcopy in
23463-
[\\/]* | ?:[\\/]*)
23464-
ac_cv_path_gcc_cv_objcopy="$gcc_cv_objcopy" # Let the user override the test with a path.
23465-
;;
23466-
*)
23467-
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23468-
for as_dir in $PATH
23469-
do
23470-
IFS=$as_save_IFS
23471-
test -z "$as_dir" && as_dir=.
23472-
for ac_exec_ext in '' $ac_executable_extensions; do
23473-
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23474-
ac_cv_path_gcc_cv_objcopy="$as_dir/$ac_word$ac_exec_ext"
23475-
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23476-
break 2
23477-
fi
23478-
done
23479-
done
23480-
IFS=$as_save_IFS
23481-
23482-
;;
23483-
esac
23484-
fi
23485-
gcc_cv_objcopy=$ac_cv_path_gcc_cv_objcopy
23486-
if test -n "$gcc_cv_objcopy"; then
23487-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objcopy" >&5
23488-
$as_echo "$gcc_cv_objcopy" >&6; }
23489-
else
23490-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23491-
$as_echo "no" >&6; }
23492-
fi
23493-
23494-
23495-
fi
23496-
fi
23497-
23498-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what objcopy to use" >&5
23499-
$as_echo_n "checking what objcopy to use... " >&6; }
23500-
if test "$gcc_cv_objcopy" = ../binutils/objcopy$build_exeext; then
23501-
# Single tree build which includes binutils.
23502-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: newly built objcopy" >&5
23503-
$as_echo "newly built objcopy" >&6; }
23504-
in_tree_objcopy=yes
23505-
else
23506-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_objcopy" >&5
23507-
$as_echo "$gcc_cv_objcopy" >&6; }
23508-
in_tree_objcopy=no
23509-
fi
23510-
23511-
ORIGINAL_OBJCOPY_FOR_TARGET=$gcc_cv_objcopy
23512-
23513-
case "$ORIGINAL_OBJCOPY_FOR_TARGET" in
23514-
./objcopy | ./objcopy$build_exeext) ;;
23515-
*) ac_config_files="$ac_config_files objcopy:exec-tool.in"
23516-
;;
23517-
esac
2351823439

2351923440
# Figure out what objdump we will be using.
2352023441
if ${gcc_cv_objdump+:} false; then :
@@ -33293,7 +33214,6 @@ do
3329333214
"as") CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
3329433215
"collect-ld") CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
3329533216
"nm") CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
33296-
"objcopy") CONFIG_FILES="$CONFIG_FILES objcopy:exec-tool.in" ;;
3329733217
"dsymutil") CONFIG_FILES="$CONFIG_FILES dsymutil:exec-tool.in" ;;
3329833218
"clearcap.map") CONFIG_LINKS="$CONFIG_LINKS clearcap.map:${srcdir}/config/$clearcap_map" ;;
3329933219
"$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
@@ -33929,7 +33849,6 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
3392933849
"as":F) chmod +x as ;;
3393033850
"collect-ld":F) chmod +x collect-ld ;;
3393133851
"nm":F) chmod +x nm ;;
33932-
"objcopy":F) chmod +x objcopy ;;
3393333852
"dsymutil":F) chmod +x dsymutil ;;
3393433853
"default":C)
3393533854
case ${CONFIG_HEADERS} in

gcc/configure.ac

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,36 +2815,6 @@ case "$ORIGINAL_NM_FOR_TARGET" in
28152815
*) AC_CONFIG_FILES(nm:exec-tool.in, [chmod +x nm]) ;;
28162816
esac
28172817

2818-
# Figure out what objcopy we will be using.
2819-
AS_VAR_SET_IF(gcc_cv_objcopy,, [
2820-
if test -f $gcc_cv_binutils_srcdir/configure.ac \
2821-
&& test -f ../binutils/Makefile \
2822-
&& test x$build = x$host; then
2823-
gcc_cv_objcopy=../binutils/objcopy$build_exeext
2824-
elif test -x objcopy$build_exeext; then
2825-
gcc_cv_objcopy=./objcopy$build_exeext
2826-
elif ( set dummy $OBJCOPY_FOR_TARGET; test -x $[2] ); then
2827-
gcc_cv_objcopy="$OBJCOPY_FOR_TARGET"
2828-
else
2829-
AC_PATH_PROG(gcc_cv_objcopy, $OBJCOPY_FOR_TARGET)
2830-
fi])
2831-
2832-
AC_MSG_CHECKING(what objcopy to use)
2833-
if test "$gcc_cv_objcopy" = ../binutils/objcopy$build_exeext; then
2834-
# Single tree build which includes binutils.
2835-
AC_MSG_RESULT(newly built objcopy)
2836-
in_tree_objcopy=yes
2837-
else
2838-
AC_MSG_RESULT($gcc_cv_objcopy)
2839-
in_tree_objcopy=no
2840-
fi
2841-
2842-
ORIGINAL_OBJCOPY_FOR_TARGET=$gcc_cv_objcopy
2843-
AC_SUBST(ORIGINAL_OBJCOPY_FOR_TARGET)
2844-
case "$ORIGINAL_OBJCOPY_FOR_TARGET" in
2845-
./objcopy | ./objcopy$build_exeext) ;;
2846-
*) AC_CONFIG_FILES(objcopy:exec-tool.in, [chmod +x objcopy]) ;;
2847-
esac
28482818

28492819
# Figure out what objdump we will be using.
28502820
AS_VAR_SET_IF(gcc_cv_objdump,, [

gcc/exec-tool.in

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
# along with GCC; see the file COPYING3. If not see
1818
# <http://www.gnu.org/licenses/>.
1919

20-
# Invoke as, ld, nm, or objcopy from the build tree.
20+
# Invoke as, ld or nm from the build tree.
2121

2222
ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@"
2323
ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@"
2424
ORIGINAL_LD_BFD_FOR_TARGET="@ORIGINAL_LD_BFD_FOR_TARGET@"
2525
ORIGINAL_LD_GOLD_FOR_TARGET="@ORIGINAL_LD_GOLD_FOR_TARGET@"
2626
ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@"
2727
ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@"
28-
ORIGINAL_OBJCOPY_FOR_TARGET="@ORIGINAL_OBJCOPY_FOR_TARGET@"
2928
ORIGINAL_DSYMUTIL_FOR_TARGET="@ORIGINAL_DSYMUTIL_FOR_TARGET@"
3029
exeext=@host_exeext@
3130
fast_install=@enable_fast_install@
@@ -73,11 +72,6 @@ case "$invoked" in
7372
prog=nm-new$exeext
7473
dir=binutils
7574
;;
76-
objcopy)
77-
original=$ORIGINAL_OBJCOPY_FOR_TARGET
78-
prog=objcopy$exeext
79-
dir=binutils
80-
;;
8175
dsymutil)
8276
original=$ORIGINAL_DSYMUTIL_FOR_TARGET
8377
# We do not build this in tree - but still want to be able to execute

0 commit comments

Comments
 (0)