New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prepro is $(CPP) not $(CC) -E #4870
Conversation
could be usefull also to have constantly preprocessor defines -D__CPP__ since preprocessor can choke on cross compiler special includes like emscripten.h on javascript port when building modules. |
I would be slightly wary of this (especially since Merged in 862cc45 |
i was tring new build system for modules for official javascript port, javascript port Makefile does does define CROSS=0 and does not mention CROSS_COMPILE. also $(CC) should use https://emscripten.org/docs/tools_reference/emcc.html also not hacks like micropython/ports/javascript/Makefile Line 19 in 2f262d5
some compilers defines variables that are unknown to preprocessors but user are expected to use them eg i'm not a C expert but even for a hobby i find that a bit messy. |
@dpgeorge i get your point but I can't find a way to launch preprocessor via emcc in emscripten doc i guess there's no other way than using raw emscripten clang and i still wonder how to handle eg "-s USE_SDL=2" or such CFLAGS parameters which forces inclusion of port specific versions that a module could require.
is not that a flaw in emscripten ( not accepting -E and giving proper path to clang ) ? |
it seems all libraries includes ends up in various $(EM_CACHE)/asmjs/ports-builds/*/include |
Add kaluga version 1.3
see Line 75 and most Makefile eg
micropython/ports/javascript/Makefile
Line 16 in 5da60ff