| 9 Jan 2026 |
alexfmpe | where do platform symbols like loongarch come from? I hit symbol issues in libffi when trying to build cross-compiling GHC on several platforms For instance, I'm getting https://github.com/libffi/libffi/blob/2263d6037f8ef6b8d5bef14117ad1a17c32a20b9/src/loongarch64/ffitarget.h#L66 which should mean __loongarch64 isn't defined, but loongarch is or the error on line 39 would trigger first I see both of them in https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html but don't know where they're supposed to come from | 12:07:45 |
alexfmpe | * where do platform symbols like __loongarch__ come from? I hit symbol issues in libffi when trying to build cross-compiling GHC on several platforms For instance, I'm getting https://github.com/libffi/libffi/blob/2263d6037f8ef6b8d5bef14117ad1a17c32a20b9/src/loongarch64/ffitarget.h#L66 which should mean __loongarch64 isn't defined, but __loongarch__ is or the error on line 39 would trigger first I see both of them in https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html but don't know where they're supposed to come from | 12:08:15 |
Puna | the compiler defines them based on the selected/configured target | 12:12:39 |
Puna | https://github.com/gcc-mirror/gcc/blob/9a2402ad31db7507cb63905a8d98ce81769d9835/gcc/config/loongarch/loongarch-c.cc#L50-L56 | 12:13:18 |
alexfmpe | so in this case GHC? or the c compiler? | 12:13:19 |
Puna | well, whichever compiler is processing that file ig | 12:13:45 |
alexfmpe | hmm the actual failing command seems to be gcc | 12:15:39 |
alexfmpe | oh wait a second it does hit the line 39 error | 12:37:06 |
alexfmpe | both errors show up actually | 12:37:19 |
alexfmpe | so maybe ghc isn't configuring gcc properly for loongarch? | 12:37:33 |