public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Alan Modra <amodra@sourceware.org> To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] Re: Merge configure.ac from gcc project Date: Tue, 11 Oct 2022 23:39:56 +0000 (GMT) [thread overview] Message-ID: <20221011233956.8752D3858404@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b95bb5267e30b26d0831b6ba01d9bd25835d1046 commit b95bb5267e30b26d0831b6ba01d9bd25835d1046 Author: Alan Modra <amodra@gmail.com> Date: Wed Oct 12 10:06:35 2022 +1030 Re: Merge configure.ac from gcc project Also copy over config.acx.m4, and regenerate. Diff: --- config/acx.m4 | 31 +++++++++++++- configure | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 156 insertions(+), 5 deletions(-) diff --git a/config/acx.m4 b/config/acx.m4 index 87c1b5e2932..7efe98aaf96 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -393,9 +393,13 @@ AC_DEFUN([ACX_PROG_GNAT], AC_REQUIRE([AC_PROG_CC]) AC_CHECK_TOOL(GNATBIND, gnatbind, no) AC_CHECK_TOOL(GNATMAKE, gnatmake, no) -AC_CACHE_CHECK([whether compiler driver understands Ada], +AC_CACHE_CHECK([whether compiler driver understands Ada and is recent enough], acx_cv_cc_gcc_supports_ada, [cat >conftest.adb <<EOF +pragma Warnings (Off); +with System.CRTL; +pragma Warnings (On); +use type System.CRTL.int64; procedure conftest is begin null; end conftest; EOF acx_cv_cc_gcc_supports_ada=no @@ -420,6 +424,31 @@ else fi ]) +# Test for D. +AC_DEFUN([ACX_PROG_GDC], +[AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) +AC_REQUIRE([AC_PROG_CC]) +AC_CHECK_TOOL(GDC, gdc, no) +AC_CACHE_CHECK([whether the D compiler works], + acx_cv_d_compiler_works, +[cat >conftest.d <<EOF +module conftest; int main() { return 0; } +EOF +acx_cv_d_compiler_works=no +if test "x$GDC" != xno; then + errors=`(${GDC} $1[]m4_ifval([$1], [ ])-c conftest.d) 2>&1 || echo failure` + if test x"$errors" = x && test -f conftest.$ac_objext; then + acx_cv_d_compiler_works=yes + fi + rm -f conftest.* +fi]) +if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then + have_gdc=yes +else + have_gdc=no +fi +]) + dnl 'make compare' can be significantly faster, if cmp itself can dnl skip bytes instead of using tail. The test being performed is dnl "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2" diff --git a/configure b/configure index d7d97700563..4d328b735a3 100755 --- a/configure +++ b/configure @@ -622,7 +622,6 @@ CC_FOR_TARGET RANLIB_PLUGIN_OPTION AR_PLUGIN_OPTION GDCFLAGS -GDC READELF OTOOL OBJDUMP @@ -709,6 +708,7 @@ PGO_BUILD_GEN_CFLAGS HAVE_CXX11_FOR_BUILD HAVE_CXX11 do_compare +GDC GNATMAKE GNATBIND ac_ct_CXX @@ -5664,12 +5664,16 @@ else GNATMAKE="$ac_cv_prog_GNATMAKE" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada" >&5 -$as_echo_n "checking whether compiler driver understands Ada... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada and is recent enough" >&5 +$as_echo_n "checking whether compiler driver understands Ada and is recent enough... " >&6; } if ${acx_cv_cc_gcc_supports_ada+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.adb <<EOF +pragma Warnings (Off); +with System.CRTL; +pragma Warnings (On); +use type System.CRTL.int64; procedure conftest is begin null; end conftest; EOF acx_cv_cc_gcc_supports_ada=no @@ -5696,7 +5700,125 @@ else have_gnat=no fi -ACX_PROG_GDC + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gdc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gdc; 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_GDC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GDC"; then + ac_cv_prog_GDC="$GDC" # 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_GDC="${ac_tool_prefix}gdc" + $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 +GDC=$ac_cv_prog_GDC +if test -n "$GDC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDC" >&5 +$as_echo "$GDC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_GDC"; then + ac_ct_GDC=$GDC + # Extract the first word of "gdc", so it can be a program name with args. +set dummy gdc; 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_GDC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_GDC"; then + ac_cv_prog_ac_ct_GDC="$ac_ct_GDC" # 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_GDC="gdc" + $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_GDC=$ac_cv_prog_ac_ct_GDC +if test -n "$ac_ct_GDC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GDC" >&5 +$as_echo "$ac_ct_GDC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_GDC" = x; then + GDC="no" + 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 + GDC=$ac_ct_GDC + fi +else + GDC="$ac_cv_prog_GDC" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5 +$as_echo_n "checking whether the D compiler works... " >&6; } +if ${acx_cv_d_compiler_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.d <<EOF +module conftest; int main() { return 0; } +EOF +acx_cv_d_compiler_works=no +if test "x$GDC" != xno; then + errors=`(${GDC} -c conftest.d) 2>&1 || echo failure` + if test x"$errors" = x && test -f conftest.$ac_objext; then + acx_cv_d_compiler_works=yes + fi + rm -f conftest.* +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5 +$as_echo "$acx_cv_d_compiler_works" >&6; } +if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then + have_gdc=yes +else + have_gdc=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compare bootstrapped objects" >&5 $as_echo_n "checking how to compare bootstrapped objects... " >&6; } if ${gcc_cv_prog_cmp_skip+:} false; then :
reply other threads:[~2022-10-11 23:39 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221011233956.8752D3858404@sourceware.org \ --to=amodra@sourceware.org \ --cc=bfd-cvs@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).