On Mon, May 13, 2024 at 6:00 PM Iain Sandoe <i...@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?

> Iain
>
> >> In light of that, I feel that skipping it for bootstrap is probably the
> >> right solution here. Alas, my skill with autotools is closer to the
> >> caveman-with-club level rather than that of a surgeon.
> >
> > I am not sure we have an easy way to exclude a host module from
> > stage1 only (but ICBW).
> >
> > Iain
> >
> >>
> >> --Ben
>

Reply via email to