darwin - add configuration support for 'otool'

2018-12-05  Iain Sandoe  <iain@sandoe.co.uk>

	* configure.ac (NCN_STRICT_CHECK_TOOLS): Check otool.
	(ACX_CHECK_INSTALLED_TARGET_TOOL): Likewise
	(GCC_TARGET_TOOL): Likewise.
	* Makefile.tpl (HOST_EXPORTS): Add OTOOL, OTOOL_FOR_TARGET.
	(BASE_TARGET_EXPORTS): OTOOL, export OTOOL_FOR_TARGET.
	OTOOL, OTOOL_FOR_TARGET: New substitutions. 
	(EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS): Add OTOOL.
	* configure: Regenerate. 
	* Makefile.in: Likewise.

gcc/

	* configure.ac (gcc_cv_otool): Set.
	* configure: Regenerate.

From-SVN: r266831
This commit is contained in:
Iain Sandoe 2018-12-05 21:57:00 +00:00 committed by Iain Sandoe
parent ddaa5da9d2
commit e4a9a57277
8 changed files with 524 additions and 2 deletions

View File

@ -1,3 +1,15 @@
2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
* configure.ac (NCN_STRICT_CHECK_TOOLS): Check otool.
(ACX_CHECK_INSTALLED_TARGET_TOOL): Likewise
(GCC_TARGET_TOOL): Likewise.
* Makefile.tpl (HOST_EXPORTS): Add OTOOL, OTOOL_FOR_TARGET.
(BASE_TARGET_EXPORTS): OTOOL, export OTOOL_FOR_TARGET.
OTOOL, OTOOL_FOR_TARGET: New substitutions.
(EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS): Add OTOOL.
* configure: Regenerate.
* Makefile.in: Likewise.
2018-11-28 Johannes Pfau <johannespfau@gmail.com> 2018-11-28 Johannes Pfau <johannespfau@gmail.com>
* MAINTAINERS (Write After Approval): Add myself. * MAINTAINERS (Write After Approval): Add myself.

View File

@ -207,6 +207,7 @@ HOST_EXPORTS = \
WINDMC="$(WINDMC)"; export WINDMC; \ WINDMC="$(WINDMC)"; export WINDMC; \
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
OTOOL="$(OTOOL)"; export OTOOL; \
READELF="$(READELF)"; export READELF; \ READELF="$(READELF)"; export READELF; \
AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
@ -215,6 +216,7 @@ HOST_EXPORTS = \
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \ OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \
OTOOL_FOR_TARGET="$(OTOOL_FOR_TARGET)"; export OTOOL_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
@ -297,6 +299,7 @@ BASE_TARGET_EXPORTS = \
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \ NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \ OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \ OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \
OTOOL="$(OTOOL_FOR_TARGET)"; export OTOOL; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
READELF="$(READELF_FOR_TARGET)"; export READELF; \ READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
@ -406,6 +409,7 @@ LD = @LD@
LIPO = @LIPO@ LIPO = @LIPO@
NM = @NM@ NM = @NM@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
OTOOL = @OTOOL@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
READELF = @READELF@ READELF = @READELF@
STRIP = @STRIP@ STRIP = @STRIP@
@ -597,6 +601,7 @@ LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@ NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@ OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@ OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@
OTOOL_FOR_TARGET=@OTOOL_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
READELF_FOR_TARGET=@READELF_FOR_TARGET@ READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@ STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
@ -881,6 +886,7 @@ EXTRA_HOST_FLAGS = \
'LIPO=$(LIPO)' \ 'LIPO=$(LIPO)' \
'NM=$(NM)' \ 'NM=$(NM)' \
'OBJDUMP=$(OBJDUMP)' \ 'OBJDUMP=$(OBJDUMP)' \
'OTOOL=$(OTOOL)' \
'RANLIB=$(RANLIB)' \ 'RANLIB=$(RANLIB)' \
'READELF=$(READELF)' \ 'READELF=$(READELF)' \
'STRIP=$(STRIP)' \ 'STRIP=$(STRIP)' \

View File

@ -210,6 +210,7 @@ HOST_EXPORTS = \
WINDMC="$(WINDMC)"; export WINDMC; \ WINDMC="$(WINDMC)"; export WINDMC; \
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
OTOOL="$(OTOOL)"; export OTOOL; \
READELF="$(READELF)"; export READELF; \ READELF="$(READELF)"; export READELF; \
AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
@ -218,6 +219,7 @@ HOST_EXPORTS = \
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \ OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \
OTOOL_FOR_TARGET="$(OTOOL_FOR_TARGET)"; export OTOOL_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
@ -300,6 +302,7 @@ BASE_TARGET_EXPORTS = \
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \ NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \ OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \ OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \
OTOOL="$(OTOOL_FOR_TARGET)"; export OTOOL; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
READELF="$(READELF_FOR_TARGET)"; export READELF; \ READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
@ -409,6 +412,7 @@ LD = @LD@
LIPO = @LIPO@ LIPO = @LIPO@
NM = @NM@ NM = @NM@
OBJDUMP = @OBJDUMP@ OBJDUMP = @OBJDUMP@
OTOOL = @OTOOL@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
READELF = @READELF@ READELF = @READELF@
STRIP = @STRIP@ STRIP = @STRIP@
@ -520,6 +524,7 @@ LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@ NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@ OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@ OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@
OTOOL_FOR_TARGET=@OTOOL_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
READELF_FOR_TARGET=@READELF_FOR_TARGET@ READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@ STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
@ -644,6 +649,7 @@ EXTRA_HOST_FLAGS = \
'LIPO=$(LIPO)' \ 'LIPO=$(LIPO)' \
'NM=$(NM)' \ 'NM=$(NM)' \
'OBJDUMP=$(OBJDUMP)' \ 'OBJDUMP=$(OBJDUMP)' \
'OTOOL=$(OTOOL)' \
'RANLIB=$(RANLIB)' \ 'RANLIB=$(RANLIB)' \
'READELF=$(READELF)' \ 'READELF=$(READELF)' \
'STRIP=$(STRIP)' \ 'STRIP=$(STRIP)' \

409
configure vendored
View File

@ -603,6 +603,7 @@ WINDRES_FOR_TARGET
STRIP_FOR_TARGET STRIP_FOR_TARGET
READELF_FOR_TARGET READELF_FOR_TARGET
RANLIB_FOR_TARGET RANLIB_FOR_TARGET
OTOOL_FOR_TARGET
OBJDUMP_FOR_TARGET OBJDUMP_FOR_TARGET
OBJCOPY_FOR_TARGET OBJCOPY_FOR_TARGET
NM_FOR_TARGET NM_FOR_TARGET
@ -618,6 +619,7 @@ GCC_FOR_TARGET
CXX_FOR_TARGET CXX_FOR_TARGET
CC_FOR_TARGET CC_FOR_TARGET
READELF READELF
OTOOL
OBJDUMP OBJDUMP
OBJCOPY OBJCOPY
WINDMC WINDMC
@ -857,6 +859,7 @@ WINDRES
WINDMC WINDMC
OBJCOPY OBJCOPY
OBJDUMP OBJDUMP
OTOOL
READELF READELF
CC_FOR_TARGET CC_FOR_TARGET
CXX_FOR_TARGET CXX_FOR_TARGET
@ -872,6 +875,7 @@ LIPO_FOR_TARGET
NM_FOR_TARGET NM_FOR_TARGET
OBJCOPY_FOR_TARGET OBJCOPY_FOR_TARGET
OBJDUMP_FOR_TARGET OBJDUMP_FOR_TARGET
OTOOL_FOR_TARGET
RANLIB_FOR_TARGET RANLIB_FOR_TARGET
READELF_FOR_TARGET READELF_FOR_TARGET
STRIP_FOR_TARGET STRIP_FOR_TARGET
@ -1635,6 +1639,7 @@ Some influential environment variables:
WINDMC WINDMC for the host WINDMC WINDMC for the host
OBJCOPY OBJCOPY for the host OBJCOPY OBJCOPY for the host
OBJDUMP OBJDUMP for the host OBJDUMP OBJDUMP for the host
OTOOL OTOOL for the host
READELF READELF for the host READELF READELF for the host
CC_FOR_TARGET CC_FOR_TARGET
CC for the target CC for the target
@ -1664,6 +1669,8 @@ Some influential environment variables:
OBJCOPY for the target OBJCOPY for the target
OBJDUMP_FOR_TARGET OBJDUMP_FOR_TARGET
OBJDUMP for the target OBJDUMP for the target
OTOOL_FOR_TARGET
OTOOL for the target
RANLIB_FOR_TARGET RANLIB_FOR_TARGET
RANLIB for the target RANLIB for the target
READELF_FOR_TARGET READELF_FOR_TARGET
@ -9844,6 +9851,147 @@ fi
if test -n "$OTOOL"; then
ac_cv_prog_OTOOL=$OTOOL
elif test -n "$ac_cv_prog_OTOOL"; then
OTOOL=$ac_cv_prog_OTOOL
fi
if test -n "$ac_cv_prog_OTOOL"; then
for ncn_progname in otool; do
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; 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_OTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ncn_progname}"
$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
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
$as_echo "$OTOOL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
done
fi
for ncn_progname in otool; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; 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_OTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ncn_tool_prefix}${ncn_progname}"
$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
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
$as_echo "$OTOOL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_OTOOL" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; 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_OTOOL+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ncn_progname}"
$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
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
$as_echo "$OTOOL" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
test -n "$ac_cv_prog_OTOOL" && break
done
if test -z "$ac_cv_prog_OTOOL" ; then
set dummy otool
if test $build = $host ; then
OTOOL="$2"
else
OTOOL="${ncn_tool_prefix}$2"
fi
fi
if test -n "$READELF"; then if test -n "$READELF"; then
ac_cv_prog_READELF=$READELF ac_cv_prog_READELF=$READELF
elif test -n "$ac_cv_prog_READELF"; then elif test -n "$ac_cv_prog_READELF"; then
@ -12824,6 +12972,236 @@ fi
if test -z "$ac_cv_path_OTOOL_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for otool in $with_build_time_tools" >&5
$as_echo_n "checking for otool in $with_build_time_tools... " >&6; }
if test -x $with_build_time_tools/otool; then
OTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/otool
ac_cv_path_OTOOL_FOR_TARGET=$OTOOL_FOR_TARGET
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_OTOOL_FOR_TARGET" >&5
$as_echo "$ac_cv_path_OTOOL_FOR_TARGET" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
OTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=otool`
test $OTOOL_FOR_TARGET = otool && OTOOL_FOR_TARGET=
test -n "$OTOOL_FOR_TARGET" && ac_cv_path_OTOOL_FOR_TARGET=$OTOOL_FOR_TARGET
fi
fi
if test -z "$ac_cv_path_OTOOL_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "otool", so it can be a program name with args.
set dummy otool; 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_path_OTOOL_FOR_TARGET+:} false; then :
$as_echo_n "(cached) " >&6
else
case $OTOOL_FOR_TARGET in
[\\/]* | ?:[\\/]*)
ac_cv_path_OTOOL_FOR_TARGET="$OTOOL_FOR_TARGET" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $gcc_cv_tool_dirs
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_path_OTOOL_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
$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
;;
esac
fi
OTOOL_FOR_TARGET=$ac_cv_path_OTOOL_FOR_TARGET
if test -n "$OTOOL_FOR_TARGET"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL_FOR_TARGET" >&5
$as_echo "$OTOOL_FOR_TARGET" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_OTOOL_FOR_TARGET" ; then
if test -n "$OTOOL_FOR_TARGET"; then
ac_cv_prog_OTOOL_FOR_TARGET=$OTOOL_FOR_TARGET
elif test -n "$ac_cv_prog_OTOOL_FOR_TARGET"; then
OTOOL_FOR_TARGET=$ac_cv_prog_OTOOL_FOR_TARGET
fi
if test -n "$ac_cv_prog_OTOOL_FOR_TARGET"; then
for ncn_progname in otool; do
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; 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_OTOOL_FOR_TARGET+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OTOOL_FOR_TARGET"; then
ac_cv_prog_OTOOL_FOR_TARGET="$OTOOL_FOR_TARGET" # 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_OTOOL_FOR_TARGET="${ncn_progname}"
$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
OTOOL_FOR_TARGET=$ac_cv_prog_OTOOL_FOR_TARGET
if test -n "$OTOOL_FOR_TARGET"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL_FOR_TARGET" >&5
$as_echo "$OTOOL_FOR_TARGET" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
done
fi
if test -z "$ac_cv_prog_OTOOL_FOR_TARGET" && test -n "$with_build_time_tools"; then
for ncn_progname in otool; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_OTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
done
fi
if test -z "$ac_cv_prog_OTOOL_FOR_TARGET"; then
for ncn_progname in otool; do
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; 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_OTOOL_FOR_TARGET+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OTOOL_FOR_TARGET"; then
ac_cv_prog_OTOOL_FOR_TARGET="$OTOOL_FOR_TARGET" # 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_OTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
$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
OTOOL_FOR_TARGET=$ac_cv_prog_OTOOL_FOR_TARGET
if test -n "$OTOOL_FOR_TARGET"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL_FOR_TARGET" >&5
$as_echo "$OTOOL_FOR_TARGET" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_prog_OTOOL_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; 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_OTOOL_FOR_TARGET+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$OTOOL_FOR_TARGET"; then
ac_cv_prog_OTOOL_FOR_TARGET="$OTOOL_FOR_TARGET" # 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_OTOOL_FOR_TARGET="${ncn_progname}"
$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
OTOOL_FOR_TARGET=$ac_cv_prog_OTOOL_FOR_TARGET
if test -n "$OTOOL_FOR_TARGET"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL_FOR_TARGET" >&5
$as_echo "$OTOOL_FOR_TARGET" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
test -n "$ac_cv_prog_OTOOL_FOR_TARGET" && break
done
fi
if test -z "$ac_cv_prog_OTOOL_FOR_TARGET" ; then
set dummy otool
if test $build = $target ; then
OTOOL_FOR_TARGET="$2"
else
OTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
else
OTOOL_FOR_TARGET="$ac_cv_prog_OTOOL_FOR_TARGET"
fi
else
OTOOL_FOR_TARGET=$ac_cv_path_OTOOL_FOR_TARGET
fi
if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then if test -n "$with_build_time_tools"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ranlib in $with_build_time_tools" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ranlib in $with_build_time_tools" >&5
@ -14608,6 +14986,37 @@ $as_echo "pre-installed" >&6; }
fi fi
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target otool" >&5
$as_echo_n "checking where to find the target otool... " >&6; }
if test "x${build}" != "x${host}" ; then
if expr "x$OTOOL_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
ac_dir=`dirname $OTOOL_FOR_TARGET`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
$as_echo "pre-installed in $ac_dir" >&6; }
else
# Canadian cross, just use what we found
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
$as_echo "pre-installed" >&6; }
fi
else
if expr "x$OTOOL_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
ac_dir=`dirname $OTOOL_FOR_TARGET`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
$as_echo "pre-installed in $ac_dir" >&6; }
elif test "x$target" = "x$host"; then
# We can use an host tool
OTOOL_FOR_TARGET='$(OTOOL)'
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
$as_echo "host tool" >&6; }
else
# We need a cross tool
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
$as_echo "pre-installed" >&6; }
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ranlib" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ranlib" >&5
$as_echo_n "checking where to find the target ranlib... " >&6; } $as_echo_n "checking where to find the target ranlib... " >&6; }
if test "x${build}" != "x${host}" ; then if test "x${build}" != "x${host}" ; then

View File

@ -3354,6 +3354,7 @@ NCN_STRICT_CHECK_TOOLS(WINDRES, windres)
NCN_STRICT_CHECK_TOOLS(WINDMC, windmc) NCN_STRICT_CHECK_TOOLS(WINDMC, windmc)
NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy) NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy)
NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump) NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump)
NCN_STRICT_CHECK_TOOLS(OTOOL, otool)
NCN_STRICT_CHECK_TOOLS(READELF, readelf) NCN_STRICT_CHECK_TOOLS(READELF, readelf)
AC_SUBST(CC) AC_SUBST(CC)
AC_SUBST(CXX) AC_SUBST(CXX)
@ -3388,6 +3389,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo)
ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm) ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm)
ACX_CHECK_INSTALLED_TARGET_TOOL(OBJCOPY_FOR_TARGET, objcopy) ACX_CHECK_INSTALLED_TARGET_TOOL(OBJCOPY_FOR_TARGET, objcopy)
ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump) ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump)
ACX_CHECK_INSTALLED_TARGET_TOOL(OTOOL_FOR_TARGET, otool)
ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib) ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib)
ACX_CHECK_INSTALLED_TARGET_TOOL(READELF_FOR_TARGET, readelf) ACX_CHECK_INSTALLED_TARGET_TOOL(READELF_FOR_TARGET, readelf)
ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip) ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
@ -3419,6 +3421,7 @@ GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new]) GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
GCC_TARGET_TOOL(objcopy, OBJCOPY_FOR_TARGET, OBJCOPY, [binutils/objcopy]) GCC_TARGET_TOOL(objcopy, OBJCOPY_FOR_TARGET, OBJCOPY, [binutils/objcopy])
GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump]) GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump])
GCC_TARGET_TOOL(otool, OTOOL_FOR_TARGET, OTOOL)
GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib]) GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib])
GCC_TARGET_TOOL(readelf, READELF_FOR_TARGET, READELF, [binutils/readelf]) GCC_TARGET_TOOL(readelf, READELF_FOR_TARGET, READELF, [binutils/readelf])
GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip-new]) GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip-new])

View File

@ -1,3 +1,8 @@
2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
* configure.ac (gcc_cv_otool): Set.
* configure: Regenerate.
2018-12-05 Uros Bizjak <ubizjak@gmail.com> 2018-12-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove. * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.

68
gcc/configure vendored
View File

@ -718,6 +718,7 @@ thin_archive_support
ld_soname_option ld_soname_option
ld_version_script_option ld_version_script_option
libgcc_visibility libgcc_visibility
gcc_cv_otool
gcc_cv_readelf gcc_cv_readelf
gcc_cv_objdump gcc_cv_objdump
ORIGINAL_NM_FOR_TARGET ORIGINAL_NM_FOR_TARGET
@ -18572,7 +18573,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 18575 "configure" #line 18576 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -18678,7 +18679,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 18681 "configure" #line 18682 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -22518,6 +22519,69 @@ else
$as_echo "$gcc_cv_readelf" >&6; } $as_echo "$gcc_cv_readelf" >&6; }
fi fi
# Figure out what otool we will be using.
if ${gcc_cv_otool+:} false; then :
else
if test -x otool$build_exeext; then
gcc_cv_otool=./otool$build_exeext
elif ( set dummy $OTOOL_FOR_TARGET; test -x $2 ); then
gcc_cv_otool="$OTOOL_FOR_TARGET"
else
# Extract the first word of "$OTOOL_FOR_TARGET", so it can be a program name with args.
set dummy $OTOOL_FOR_TARGET; 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_path_gcc_cv_otool+:} false; then :
$as_echo_n "(cached) " >&6
else
case $gcc_cv_otool in
[\\/]* | ?:[\\/]*)
ac_cv_path_gcc_cv_otool="$gcc_cv_otool" # Let the user override the test with a path.
;;
*)
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_path_gcc_cv_otool="$as_dir/$ac_word$ac_exec_ext"
$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
;;
esac
fi
gcc_cv_otool=$ac_cv_path_gcc_cv_otool
if test -n "$gcc_cv_otool"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_otool" >&5
$as_echo "$gcc_cv_otool" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what otool to use" >&5
$as_echo_n "checking what otool to use... " >&6; }
if test x$gcc_cv_otool = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_otool" >&5
$as_echo "$gcc_cv_otool" >&6; }
fi
# Figure out what assembler alignment features are present. # Figure out what assembler alignment features are present.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler flags" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler flags" >&5
$as_echo_n "checking assembler flags... " >&6; } $as_echo_n "checking assembler flags... " >&6; }

View File

@ -2514,6 +2514,23 @@ else
AC_MSG_RESULT($gcc_cv_readelf) AC_MSG_RESULT($gcc_cv_readelf)
fi fi
# Figure out what otool we will be using.
AS_VAR_SET_IF(gcc_cv_otool,, [
if test -x otool$build_exeext; then
gcc_cv_otool=./otool$build_exeext
elif ( set dummy $OTOOL_FOR_TARGET; test -x $[2] ); then
gcc_cv_otool="$OTOOL_FOR_TARGET"
else
AC_PATH_PROG(gcc_cv_otool, $OTOOL_FOR_TARGET)
fi])
AC_MSG_CHECKING(what otool to use)
if test x$gcc_cv_otool = x; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT($gcc_cv_otool)
fi
# Figure out what assembler alignment features are present. # Figure out what assembler alignment features are present.
gcc_GAS_CHECK_FEATURE([.balign and .p2align], gcc_cv_as_balign_and_p2align, gcc_GAS_CHECK_FEATURE([.balign and .p2align], gcc_cv_as_balign_and_p2align,
[2,6,0],, [2,6,0],,