Page MenuHomePhabricator

fix build for big endian platforms
ClosedPublic

Authored by sharkcz on Sep 4 2017, 8:02 AM.

Details

Summary

The code in eina_debug.c requires the eina_swapX() functions on big endian platforms, so include the required header.

Test Plan

Do build on big endian platform like ppc64 or s390x.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sharkcz created this revision.Sep 4 2017, 8:02 AM

first there is a warning in the build

...
lib/eina/eina_debug.c: In function ‘eina_debug_session_send’:
lib/eina/eina_debug.c:90:20: warning: implicit declaration of function ‘eina_swap32’ [-Wimplicit-function-declaration]
#define SWAP_32(x) eina_swap32(x)

^

lib/eina/eina_debug.c:149:15: note: in expansion of macro ‘SWAP_32’

hdr.size = SWAP_32(size + sizeof(Eina_Debug_Packet_Header));
           ^~~~~~~

...

then an error
...
lib/eina/.libs/libeina.so: undefined reference to `eina_swap32'

kubu added a subscriber: kubu.Sep 7 2017, 1:21 PM

Hi,

The bump to efl 1.20.2 in Buildroot trigged this issue on powerpc big endian.

See: http://autobuild.buildroot.net/?reason=efl-1.20.2

This patch fix this build issue (build test only).

Best regards,
Romain

Patch looks good. I will just go ahead and give the commit subject a prefix (eina:). Giving it a test now.

This revision was automatically updated to reflect the committed changes.

Looking at the patch again (for a backport) I saw that it was credited under my name instead of the name of the author. I wanted to say sorry for that. No idea what went wrong here. I used my normal script to pick the patch from phab, review and push it.

Looking at the patch again (for a backport) I saw that it was credited under my name instead of the name of the author. I wanted to say sorry for that. No idea what went wrong here. I used my normal script to pick the patch from phab, review and push it.

no problem :-)