Page MenuHomeFreeBSD

Support ARM in devel/nspr
ClosedPublic

Authored by sbruno on Aug 17 2014, 4:05 PM.
Tags
None
Referenced Files
F109141720: D617.diff
Sat, Feb 1, 8:58 AM
Unknown Object (File)
Sun, Jan 26, 3:38 AM
Unknown Object (File)
Fri, Jan 24, 2:19 AM
Unknown Object (File)
Dec 22 2024, 7:41 PM
Unknown Object (File)
Dec 22 2024, 7:40 PM
Unknown Object (File)
Dec 21 2024, 3:51 PM
Unknown Object (File)
Dec 8 2024, 2:01 PM
Unknown Object (File)
Dec 5 2024, 6:07 PM
Subscribers
None

Details

Reviewers
bapt
imp
ian
Summary

Add arch support for all the maths for ARMv6

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

sbruno retitled this revision from to Support ARM in devel/nspr.
sbruno updated this object.
sbruno edited the test plan for this revision. (Show Details)
sbruno added reviewers: imp, bapt, ian.
devel/nspr/files/patch-bug782113
98

arm is little-endian unless ARMEB is defined

devel/nspr/files/patch-bug782113
98

I'm not 100% sure how to do that in this file, so maybe this works, maybe it doesn't?

#elif defined(__arm__)
#if defined(__armeb__)
#undef IS_BIG_ENDIAN
#define IS_LITTLE_ENDIAN 1
#else
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
#endif /*armeb */
In D617#6, @sbruno wrote:

I'm not 100% sure how to do that in this file, so maybe this works, maybe it doesn't?

#elif defined(__arm__)
#if defined(__armeb__)
#undef IS_BIG_ENDIAN
#define IS_LITTLE_ENDIAN 1
#else
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
#endif /*armeb */

Upper case is needed. ARMEB. However, that's just for gcc. If you want to future proof this against clang supporting arm big endian, the Arm C Language Extention (ACLE) specifies that this is ARM_BIG_ENDIAN, so I'd test for both for now.

The web page is rendering double underscore as an underscored thing. There are two leading and trailing underscores for the symbols in my last comment.

In D617#8, @imp wrote:

The web page is rendering double underscore as an underscored thing. There are two leading and trailing underscores for the symbols in my last comment.

This is what you guys are going for right?

#elif defined(__arm__)
  
#if defined(__ARMEB__) || defined(__ARM_BIG_ENDIAN__)
#undef  IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN    1
#else
#undef  IS_BIG_ENDIAN
#define IS_LITTLE_ENDIAN 1
#endif

Yes. the quoted code looks good.

sbruno edited edge metadata.

Update with ARMEB/ARM_BIG_ENDIAN conditionals

Final version, now under redbuild testing

https://redports.org/buildarchive/20140818002502-52216/

All groovy on amd64/i386

Confirmed builds on armv6 qemu-user enabled jail

bapt edited edge metadata.

Please upstream the changes as well!

This revision is now accepted and ready to land.Aug 26 2014, 9:12 AM