https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231965

Yuri Pankov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Yuri Pankov <[email protected]> ---
Looking at this, I wonder if powerpc ISOs (at least, 12-ALPHA10 snapshot)
cross-compiled on amd64 as the locale data files are matching the ones on my
amd64 system.

In any case, it looks like the check in lib/libc/locale/endian.h needs to
include __powerpc__ as well, or just check for big endian.  I've cross-compiled
libc with the following change on amd64, and was able to run simple test
program just doing setlocale(), and even run tmux preloading the resulting
libc.so.7:

diff --git a/lib/libc/locale/endian.h b/lib/libc/locale/endian.h
index d3b822788688..ade03bdc8997 100644
--- a/lib/libc/locale/endian.h
+++ b/lib/libc/locale/endian.h
@@ -45,7 +45,7 @@
  * correct macros here.
  */

-#if BYTE_ORDER == BIG_ENDIAN && defined(__mips__)
+#if BYTE_ORDER == BIG_ENDIAN
 #define        BSWAP(x)        le32toh(x)
 #else
 #define        BSWAP(x)        x

I'm NOT sure if this is correct for all cases, and if it will not break native
powerpc builds, need to investigate a bit more.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to