Hi OpenBSD ports maintainers, I'm having trouble building security/libnettle on mips64el/loongson which is caused by missing symbol of "__builtin_bswap64" when linking. It looks like this symbol is introduced since GCC 4.3[1], while mips64el ships with GCC 4.2.1. It's interesting because I can compile with the symbol but cannot link. Would like to hear from the ports maintainers' opinion on how to solve this issue?
Here are some tests for showing the problem (please let me know if you need more information): $ uname -a OpenBSD yeeloong.lan 6.6 GENERIC#18 loongson $ gcc -v Reading specs from /usr/lib/gcc-lib/mips64el-unknown-openbsd6.6/4.2.1/specs Target: mips64el-unknown-openbsd6.6 Configured with: OpenBSD/mips64el system compiler Thread model: posix gcc version 4.2.1 20070719 $ cat test.c #include <stdint.h> int main () { uint64_t x = 17; uint64_t y = __builtin_bswap64(x); ; return 0; } $ gcc -c test.c $ gcc test.c /tmp//ccw1b7KO.o: In function `main': test.c:(.text+0x2c): undefined reference to `__builtin_bswap64' test.c:(.text+0x30): undefined reference to `__builtin_bswap64' collect2: ld returned 1 exit status [1] http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Other-Builtins.html
signature.asc
Description: OpenPGP digital signature