[Bug 242134] graphics/openimageio: fix build on powerpc64 elfv2

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Nov 22 01:40:58 UTC 2019


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

--- Comment #2 from Shane <FreeBSD at ShaneWare.Biz> ---
Actually looking into this more, clang defines __BIG_ENDIAN__ but not gcc. I
have emailed oiio-dev to look into this further.

Both clang and gcc defines __BYTE_ORDER__ so we could use.

# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__


Which is similar to sys/endian.h which has

#define _LITTLE_ENDIAN  1234    /* LSB first: i386, vax */
#define _BIG_ENDIAN     4321    /* MSB first: 68000, ibm, net */
#define _BYTE_ORDER     _LITTLE_ENDIAN

So you could use

#if _BYTE_ORDER == _BIG_ENDIAN

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list