!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

555 Members
117 Servers

Load older messages


SenderMessageTime
9 Jan 2026
@alexfmpe:matrix.orgalexfmpe 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:matrix.orgalexfmpe * 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
@opna2608:matrix.orgPunathe compiler defines them based on the selected/configured target12:12:39
@opna2608:matrix.orgPunahttps://github.com/gcc-mirror/gcc/blob/9a2402ad31db7507cb63905a8d98ce81769d9835/gcc/config/loongarch/loongarch-c.cc#L50-L5612:13:18
@alexfmpe:matrix.orgalexfmpeso in this case GHC? or the c compiler?12:13:19
@opna2608:matrix.orgPunawell, whichever compiler is processing that file ig12:13:45
@alexfmpe:matrix.orgalexfmpehmm the actual failing command seems to be gcc12:15:39
@alexfmpe:matrix.orgalexfmpeoh wait a second it does hit the line 39 error12:37:06
@alexfmpe:matrix.orgalexfmpeboth errors show up actually12:37:19
@alexfmpe:matrix.orgalexfmpeso maybe ghc isn't configuring gcc properly for loongarch?12:37:33

There are no newer messages yet.


Back to Room ListRoom Version: 6