public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Development <gcc@gcc.gnu.org>, Ben Boeckel <ben.boeckel@kitware.com>
Subject: Re: isl 0.26 C++17 issues when bootstrapping with GCC
Date: Mon, 13 May 2024 20:37:37 +0100	[thread overview]
Message-ID: <AA34237F-72F2-4586-AF14-DF31549DB405@sandoe.co.uk> (raw)
In-Reply-To: <C0A0AB2B-F34F-4068-AEEE-ED1F2BE281B8@sandoe.co.uk>



> On 13 May 2024, at 19:43, Iain Sandoe <iain@sandoe.co.uk> wrote:
> 
> 
> 
>> On 13 May 2024, at 18:46, Richard Biener <richard.guenther@gmail.com> wrote:
>> 
>> On Mon, May 13, 2024 at 6:00 PM Iain Sandoe <iain@sandoe.co.uk> wrote:
>>> 
>>> 
>>> 
>>>> On 13 May 2024, at 16:05, Iain Sandoe via Gcc <gcc@gcc.gnu.org> wrote:
>>>>> On 30 Aug 2023, at 00:32, Ben Boeckel via Gcc <gcc@gcc.gnu.org> wrote:
>>>>> 
>>>>> On Tue, Aug 29, 2023 at 18:57:37 +0200, Richard Biener wrote:
>>>>>> I suppose for bootstrapping we could disable ISL during stage1 since
>>>>>> it enables an optional feature only.  Other than that GCC only
>>>>>> requires a C++11 compiler for building, so ISL breaks that constraint
>>>>>> with requiring C++17.
>>>>> 
>>>>> Note that it doesn't *require* it per sé; the tests that try it are
>>>>> compiled if C++17 support was detected at all. The headers seem to just
>>>>> have optional header-only `std::any`-using APIs if C++17 is around.
>>>>> `isl` supporting a flag to disable the tests would also work, but that
>>>>> doesn't fix 0.26. It also doesn't mean it won't start requiring C++17 at
>>>>> some point in the future.
>>>> 
>>>> Perhaps, in the short-term (i.e. before it requires C++ > 11) we can
>>>> solve this by ensuring that we pass -std=c++11 to the configure stages
>>>> as well as to the build.  ISTM that configure is finding C++17-capability
>>>> (because we do not, I think, force C++11 for the configure) and then
>>>> the build takes it away by forcing -std=c++11.
>>> 
>>> That was not right.
>>> We add std=c++11 to the compiler command.
>>> 
>>> However,as noted (earlier in this thread) the isl configure has the idiom
>>> - does the compiler do c++17 with no options?
>>> - does the compiler do c++17 if we add -std=c++17?
>>> 
>>> where the second one overrides our setting of std=c++11 in the compiler
>>> comand.
>>> 
>>> (I think that this is a reasonably often used idiom in configures)
>>> 
>>> However the isl configure _does_ still append CXXFLAGS, and so that if
>>> we add -std=c++11 to those, it re-asserts our intent.
>>> 
>>> Maybe we should just add the -std=c++11 to CXXFLAGS instead of the
>>> compiler command?
>> 
>> I don't understand.  If we set CXX to g++ -std=c++11 and ISL checks
>> for -std=c++17 why does it then fail to add that to CXXFLAGS?
> 
> This appears to be the underlying bug.
> 
> — isl configure.ac does:
> 
> AX_CXX_COMPILE_STDCXX_17([], [optional])
> 
> ….
> 
> AM_CONDITIONAL(HAVE_CXX17, test "x$HAVE_CXX17" = "x1”)
> 
> — and then Makefile.am adds the c++17-requirements:
> 
> if HAVE_CXX17
>  noinst_PROGRAMS += isl_test_cpp17 isl_test_cpp17-checked
>  TESTS += isl_test_cpp17 isl_test_cpp17-checked
> endif
> 
> .. this mechanism does not seem to preserve the fact that an additional
> -std=c++17 was needed to get the CXX17 (and there is no mention of
> CXXFLAGS in Makefile.am) 
> 
> Not sure if it’s a bug in isl’s config - or a limitation of 
> AX_CXX_COMPILE_STDCXX_17 itself.
> 
> — assuming we file a bug and it gets agreed and fixed, we’ll still need 
> either to skip broken versions or work around it (I have no specific
> preference - although I do build isl in-tree, so far 0.24 has been OK)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115077



      reply	other threads:[~2024-05-13 19:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 14:29 Ben Boeckel
2023-08-29 16:57 ` Richard Biener
2023-08-29 23:32   ` Ben Boeckel
2024-05-13 15:05     ` Iain Sandoe
2024-05-13 16:00       ` Iain Sandoe
2024-05-13 17:46         ` Richard Biener
2024-05-13 18:43           ` Iain Sandoe
2024-05-13 19:37             ` Iain Sandoe [this message]

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=AA34237F-72F2-4586-AF14-DF31549DB405@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=ben.boeckel@kitware.com \
    --cc=gcc@gcc.gnu.org \
    --cc=richard.guenther@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).