Open LnnrtS opened 2 years ago
Starting point: running that exact same set of commands works fine for me with official arm-gcc 10.3.1 + MacOS clang.
In your case looks like the failure is not with the cross-compiler but with the native GCC. I installed gcc-12 and can reproduce the error. It also fails with gcc-11; gcc-10 and earlier work fine (coincidentally, I did not move my CI checks up to -11 or -12 yet). It could be that the compiler is now defining that value when it wasn't before, which conflicts with the logic to disable threading.
Another data point: builds just fine with native gcc-12 if I don't disable threads.
I see. Didn't realize that the native libs are also automatically built. I expected that to only happen if no cross files where selected. If I manually remove those targets, things work as expected.
Regarding the original issue: Looks like the old gcc behavior was not correct then (the compiler almost certainly had threads support but __STDCPP_THREADS__
was not set). Right?
I think the proper resolution is removing the check in __config (or, generally, updating these sources to a newer commit like we discussed in Slack). I did manage to find this discussion on the topic: https://reviews.llvm.org/D91747 that shows the error message being removed upstream.
I also see reference to an llvm compiler argument (-mthread-model single
) that changes the value of that macro, but I'm not clear on the other implications of using such an argument or the GCC equivalent. So in any case, I'm still predisposed to the library change.
I agree. Haven't seen that this was already fixed upstream
Fyi: I managed to build upstream 'libcxxand
libcxxabi` in a simple configuration against newlib and picolibc with just a few tweaks. I think it should not be too hard to create an own "mirror" (as in just a copy of some directories and small tweaks or moving files around) of those libraries.
That's largely what this repo is (copy of the code + some alternative implementations I substitute), I just need to migrate from the old llvm-mirror submodules to a newer process that keeps them in sync re: what you described with a sparse checkout + filter. Maybe it can even be managed as a subtree.
Yes, I know. I was just suggesting to kind of recreate/reactivate the old mirror so you could just point to a different repo and commit from this repo. Following upstream's history directly is of course preferable if it works easily
Got it, that was the original approach I had in mind and what I'm likely to fall back to - you just got the wheels turning in my head :).
Running the build specified in the ci file (or an example given in the readme) with an official arm-none-eabi toolchain fails to compile.
I set the path to the compiler by editing
build/cross/arm.txt
I can imagine that there are some requirements on how the compiler itself is compiled (in that case having threads enabled?). Could you provide a working example with an official arm-none-eabi-gcc or point to a compiler that works with the example configuration of this project?
Thanks!