emscripten-core / emscripten-core/emscripten
emconfigure sets both, CROSS_COMPILE and CC to absolute path, which seems to fail with man projects
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
I'm not sure if that is a bug of `emconfigure` or of other projects using environment variables incorrectly but when I run `emconfigure ./configure ...` two environment variables are set:
```
CROSS_COMPILE=/full/path/to/emscripten/em
CC=/full/path/to/emscripten/emcc
```
And that causes issues since makefiles (like the one of OpenSSL for eample), will then read
```
CROSS_COMPILE=/full/path/to/emscripten/em
CC=($CROSS_COMPILE)=/full/path/to/emscripten/em/full/path/to/emscripten/emcc
```
Which will of course not work. I know little about UNIX build system details but to me it looks like you either set `CROSS_COMPILE` and keep CC as `cc` or you directly set CC to the full path but you are not expected to two both as that is then "doubly doubled".
If you think you are setting variables correctly and projects like OpenSSL are simply not using them correctly, as they should either just use `$CC` as is or use `$(CROSS_COMPILE)cc` but never both, just let me know and I will be happy to report that to projects I came across instead.
**Version of emscripten/emsdk:**
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.31-git
clang version 19.0.0git
Target: wasm32-unknown-emscripten
Thread model: posix
Contributor guide
Assessment
This issue has not been assessed yet.