aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2018-12-05 21:57:00 +0000
committerIain Sandoe <iains@gcc.gnu.org>2018-12-05 21:57:00 +0000
commite4a9a572770b48375561c7ca424eb94eb45a9fcb (patch)
tree5fcb51fb4479259bf04ee549f9747cc0978d4a4e /gcc
parentddaa5da9d2e9ecb75fb45d7547d7d92e4b8e6ff7 (diff)
downloadgcc-e4a9a572770b48375561c7ca424eb94eb45a9fcb.zip
gcc-e4a9a572770b48375561c7ca424eb94eb45a9fcb.tar.gz
gcc-e4a9a572770b48375561c7ca424eb94eb45a9fcb.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rwxr-xr-xgcc/configure68
-rw-r--r--gcc/configure.ac17
3 files changed, 88 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5b61a4a..533f1a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
* config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
diff --git a/gcc/configure b/gcc/configure
index bdaa6fa..efbf621 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -718,6 +718,7 @@ thin_archive_support
ld_soname_option
ld_version_script_option
libgcc_visibility
+gcc_cv_otool
gcc_cv_readelf
gcc_cv_objdump
ORIGINAL_NM_FOR_TARGET
@@ -18572,7 +18573,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18575 "configure"
+#line 18576 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18678,7 +18679,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18681 "configure"
+#line 18682 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -22518,6 +22519,69 @@ else
$as_echo "$gcc_cv_readelf" >&6; }
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.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler flags" >&5
$as_echo_n "checking assembler flags... " >&6; }
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 2673f80..7fce52a 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2514,6 +2514,23 @@ else
AC_MSG_RESULT($gcc_cv_readelf)
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.
gcc_GAS_CHECK_FEATURE([.balign and .p2align], gcc_cv_as_balign_and_p2align,
[2,6,0],,