Skip to content

unix/Makefile: Allow users to specify the C++ standard used.#8305

Closed
stinos wants to merge 2 commits intomicropython:masterfrom
stinos:unixcppstandard
Closed

unix/Makefile: Allow users to specify the C++ standard used.#8305
stinos wants to merge 2 commits intomicropython:masterfrom
stinos:unixcppstandard

Conversation

@stinos
Copy link
Copy Markdown
Contributor

@stinos stinos commented Feb 15, 2022

Mainly for user modules.

Actually, I'm not sure the whole HASCPP17 part should even be there: it's not needed for the MicroPython source itself (that just needs at least c++11 because the usercmodule example uses that). I'd be happy to remove it, but it's maybe too late for that now (as in: people relying on it)?

@dpgeorge
Copy link
Copy Markdown
Member

that just needs at least c++11 because the usercmodule example uses that

Maybe that usercmodule can update the flags in its .mk file?

but it's maybe too late for that now (as in: people relying on it)

I don't think they would be. And if they are it's an easy fix on the command line to append to CFLAGS_EXTRA.

So I'd say remove the HASCCP17 thing.

@stinos
Copy link
Copy Markdown
Contributor Author

stinos commented Feb 17, 2022

Maybe that usercmodule can update the flags in its .mk file?

That probably makes most sense, and then it can be removed from the main Makefile completely. However C++14 has actually been the default for gcc since v6 which is about 6 years old by now. So simply removing, without any addition to the .mk, is actually going to work for a lot of cases. stm32 port does that as well btw. Ok?

@dpgeorge
Copy link
Copy Markdown
Member

So simply removing, without any addition to the .mk, is actually going to work for a lot of cases. stm32 port does that as well btw. Ok?

Yes that sounds OK. As long as the CI passes 😄

This was added merely for building the C++ user module example,
so it's a better fit to add it in the corresponding micropython.mk.
Enables building user modules which use C++ code,
like the unix port.
@stinos
Copy link
Copy Markdown
Contributor Author

stinos commented Feb 17, 2022

As long as the CI passes

Was going to say 'yeah sure' but then the macos build failed, so added in mpconfigport.mk after all.

@dpgeorge
Copy link
Copy Markdown
Member

so added in mpconfigport.mk after all.

That's fine, and it adds more good content to the example anyway, to show other people how to add options there.

Merged in 8bb50c6 and c14f47f

@dpgeorge dpgeorge closed this Feb 18, 2022
@stinos stinos deleted the unixcppstandard branch February 18, 2022 07:40
tannewt added a commit to tannewt/circuitpython that referenced this pull request Aug 29, 2023
raise kernel load addr and slip stack under kernel on both 32bit and 64bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants