Page MenuHomeFreeBSD

Support ARM in devel/nspr
ClosedPublic

Authored by sbruno on Aug 17 2014, 4:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 17, 3:00 AM
Unknown Object (File)
Sun, Mar 17, 3:00 AM
Unknown Object (File)
Mon, Mar 11, 7:44 AM
Unknown Object (File)
Jan 7 2024, 3:58 PM
Unknown Object (File)
Dec 19 2023, 4:36 PM
Unknown Object (File)
Dec 13 2023, 4:20 AM
Unknown Object (File)
Dec 12 2023, 4:18 PM
Unknown Object (File)
Dec 9 2023, 3:44 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