public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/28318] [gdb/build] std::thread support configure check does not use CXX_DIALECT
Date: Wed, 08 Sep 2021 08:04:48 +0000	[thread overview]
Message-ID: <bug-28318-4717-NpvrRzGOuR@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28318-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28318

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[gdb/build] std::thread     |[gdb/build] std::thread
                   |support configure check     |support configure check
                   |does not used CXX_DIALECT   |does not use CXX_DIALECT
                 CC|                            |palves at sourceware dot org

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
We have a custom implementation of AX_CXX_COMPILE_STDCXX at
gdb/ax_cxx_compile_stdcxx.m4:
...
    Use AX_CXX_COMPILE_STDCXX to detect if the compiler supports C++11,
    and if -std=xxx switches are necessary to enable C++11.

    We need to tweak AX_CXX_COMPILE_STDCXX a bit though.  Pristine
    upstream AX_CXX_COMPILE_STDCXX appends -std=gnu++11 to CXX directly.
    That doesn't work for us, because the top level Makefile passes CXX
    down to subdirs, and that overrides whatever gdb/Makefile may set CXX
    to.  The result would be that a make invocation from the build/gdb/
    directory would use "g++ -std=gnu++11" as expected, while a make
    invocation at the top level would not.

    So instead of having AX_CXX_COMPILE_STDCXX set CXX directly, tweak it
    to AC_SUBST a separate variable -- CXX_DIALECT -- and use '$(CXX)
    (CXX_DIALECT)' to compile/link.
...
which introduced the CXX_DIALECT.

If we would use the regular AX_CXX_COMPILE_STDCXX, AFAIU the problem would not
occur.

So, either:
- we add CXX_DIALECT to all uses of CXX in the configure script, or 
- we add CXX_DIALECT to CXX directly.  AFAIU, that wouldn't break anything
  though it would result in confusing double options in command lines.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  reply	other threads:[~2021-09-08  8:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  7:49 [Bug build/28318] New: [gdb/build] std::thread support configure check does not used CXX_DIALECT vries at gcc dot gnu.org
2021-09-08  8:04 ` vries at gcc dot gnu.org [this message]
2021-09-08  8:48 ` [Bug build/28318] [gdb/build] std::thread support configure check does not use CXX_DIALECT vries at gcc dot gnu.org
2021-09-08  8:51 ` vries at gcc dot gnu.org
2021-09-08 12:16 ` vries at gcc dot gnu.org
2021-10-04 16:56 ` cvs-commit at gcc dot gnu.org
2021-10-04 16:58 ` vries at gcc dot gnu.org
2021-10-04 18:31 ` brobecker at gnat dot com
2021-10-04 18:58 ` vries at gcc dot gnu.org

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=bug-28318-4717-NpvrRzGOuR@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).