arsv/perl-cross

missing byteorder

Closed this issue · 6 comments

BuildRoot just switched on Perl 5.20.1 & perl-cross 0.9.2.
Our autobuilders (http://autobuild.buildroot.org/?reason=perl-5.20.1) report many failures on big endian architecture.

../../config.h:982:19: error: invalid suffix "x" on integer constant
 #define BYTEORDER 0x /* large digits for MSB */
                   ^
../../perl.h:3477:30: note: in expansion of macro `BYTEORDER`
 #elif BYTEORDER == 0x4321 || BYTEORDER == 0x87654321
                              ^
In file included from DynaLoader.xs:122:0:
../../perl.h:3486:4: error: #error "Unsupported byteorder"
 #  error "Unsupported byteorder"
    ^
arsv commented

Hinting is definitely ok in this case, either multiarch or byteorder. The test I put there is rather fragile.

However, it did work, and I assume it worked for 5.20.0.
Looking at the problem now, chances are it can be fixed without using explicit hints.

arsv commented

Ok, fixed I think, at least for powerpc.
Turns out its data section is named .sdata instead of .data

arsv commented

Checked nios, same problem there. So the fix should work for both.

Tested with powerpc.

It works now. Thanks

arsv commented

Ok, that's good. Tagged it as 0.9.3, along with perl version change to 5.20.1.