From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>,
gdb-patches@sourceware.org, Alan Hayward <alan.hayward@arm.com>
Subject: Re: [RFA 2/2] Add -Wduplicated-cond
Date: Sun, 22 Apr 2018 15:47:00 -0000 [thread overview]
Message-ID: <af441688-b528-ba31-48f4-cce4e1159c9f@redhat.com> (raw)
In-Reply-To: <20180421214721.7232-3-tom@tromey.com>
On 04/21/2018 10:47 PM, Tom Tromey wrote:
> diff --git a/gdb/configure b/gdb/configure
> index b313152018..29efb4b81c 100755
> --- a/gdb/configure
> +++ b/gdb/configure
> @@ -4463,9 +4463,9 @@ else
> fi
>
> if test "$plugins" = "yes"; then
> - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
> -$as_echo_n "checking for library containing dlopen... " >&6; }
> -if test "${ac_cv_search_dlopen+set}" = set; then :
> + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
> +$as_echo_n "checking for library containing dlsym... " >&6; }
> +if test "${ac_cv_search_dlsym+set}" = set; then :
> $as_echo_n "(cached) " >&6
> else
> ac_func_search_save_LIBS=$LIBS
> @@ -4478,11 +4478,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> #ifdef __cplusplus
> extern "C"
> #endif
> -char dlopen ();
> +char dlsym ();
> int
> main ()
> {
> -return dlopen ();
> +return dlsym ();
> ;
> return 0;
> }
> @@ -4495,25 +4495,25 @@ for ac_lib in '' dl; do
> LIBS="-l$ac_lib $ac_func_search_save_LIBS"
> fi
> if ac_fn_c_try_link "$LINENO"; then :
> - ac_cv_search_dlopen=$ac_res
> + ac_cv_search_dlsym=$ac_res
> fi
> rm -f core conftest.err conftest.$ac_objext \
> conftest$ac_exeext
> - if test "${ac_cv_search_dlopen+set}" = set; then :
> + if test "${ac_cv_search_dlsym+set}" = set; then :
> break
> fi
> done
> -if test "${ac_cv_search_dlopen+set}" = set; then :
> +if test "${ac_cv_search_dlsym+set}" = set; then :
>
> else
> - ac_cv_search_dlopen=no
> + ac_cv_search_dlsym=no
> fi
> rm conftest.$ac_ext
> LIBS=$ac_func_search_save_LIBS
> fi
> -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
> -$as_echo "$ac_cv_search_dlopen" >&6; }
> -ac_res=$ac_cv_search_dlopen
> +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
> +$as_echo "$ac_cv_search_dlsym" >&6; }
> +ac_res=$ac_cv_search_dlsym
> if test "$ac_res" != no; then :
> test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
>
> @@ -15365,7 +15365,8 @@ build_warnings="-Wall -Wpointer-arith \
> -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
> -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
> -Wno-mismatched-tags \
> --Wno-error=deprecated-register"
> +-Wno-error=deprecated-register \
> +-Wduplicated-cond"
>
> case "${host}" in
> *-*-mingw32*)
> diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
> index ab09261946..48af8310d9 100755
> --- a/gdb/gdbserver/configure
> +++ b/gdb/gdbserver/configure
> @@ -4658,7 +4658,7 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
> # We require a C++11 compiler. Check if one is available, and if
> # necessary, set CXX_DIALECT to some -std=xxx switch.
>
> - ax_cxx_compile_cxx11_required=true
> + ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
> ac_ext=cpp
> ac_cpp='$CXXCPP $CPPFLAGS'
> ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
> @@ -4974,7 +4974,8 @@ $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
> fi
>
> if test x$ac_success = xno; then
> - for switch in -std=gnu++11 -std=gnu++0x; do
> + for alternative in ${ax_cxx_compile_alternatives}; do
> + switch="-std=gnu++${alternative}"
> cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
> { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
> $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
> @@ -5292,16 +5293,17 @@ $as_echo "$ac_res" >&6; }
> fi
>
> if test x$ac_success = xno; then
> - for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
> - cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
> - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
> + for alternative in ${ax_cxx_compile_alternatives}; do
> + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
> + cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
> + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
> $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
> if { as_var=$cachevar; eval "test \"\${$as_var+set}\" = set"; }; then :
> $as_echo_n "(cached) " >&6
> else
> ac_save_CXX="$CXX"
> - CXX="$CXX $switch"
> - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> + CXX="$CXX $switch"
> + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> /* end confdefs.h. */
>
>
> @@ -5596,14 +5598,18 @@ else
> eval $cachevar=no
> fi
> rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
> - CXX="$ac_save_CXX"
> + CXX="$ac_save_CXX"
> fi
> eval ac_res=\$$cachevar
> { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
> $as_echo "$ac_res" >&6; }
> - if eval test x\$$cachevar = xyes; then
> - CXX_DIALECT="$switch"
> - ac_success=yes
> + if eval test x\$$cachevar = xyes; then
> + CXX_DIALECT="$switch"
> + ac_success=yes
> + break
> + fi
> + done
> + if test x$ac_success = xyes; then
> break
> fi
> done
The patch looks fine to me, but the above looks like unrelated changes.
Very much looks like gdbserver/configure was not regenerated
when gdb/warning.m4 was last touched for -Wno-error=deprecated-register,
and gdb's configure hadn't picked up the changes to config/plugin.m4
yet either.
Could you please push the obvious preliminary patch that just
regenerates gdb/configure and gdbserver/configure,
then rebase your patch on top of that.
I've not looked at the ARM patch; Alan, do you know who can
lend a hand with that?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-04-22 15:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-21 21:47 [RFA 0/2] " Tom Tromey
2018-04-21 21:47 ` [RFA 2/2] " Tom Tromey
2018-04-22 15:47 ` Pedro Alves [this message]
2018-04-24 23:07 ` Tom Tromey
2018-04-21 21:47 ` [RFA 1/2] Fix decoding of ARM VFP instructions Tom Tromey
2018-04-24 21:10 ` Omair Javaid
2018-05-04 17:07 ` Tom Tromey
2018-05-07 14:35 ` Pedro Alves
2018-04-23 15:36 ` [RFA 0/2] Add -Wduplicated-cond Sergio Durigan Junior
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=af441688-b528-ba31-48f4-cce4e1159c9f@redhat.com \
--to=palves@redhat.com \
--cc=alan.hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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: link
Be 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