1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00

Add needed ARM arch definitions to build natively on ARM.

Upstream commit: https://hg.mozilla.org/projects/nspr/rev/1fb699490ea7

Phabric:	https://reviews.freebsd.org/D617
PR:		192773
Reviewed by:	Jan Beich <jbeich@vfemail.net>
Approved by:	bapt
This commit is contained in:
Sean Bruno 2014-08-28 20:13:23 +00:00
parent 3cab5014d0
commit c6b05f0a30
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=366453
2 changed files with 58 additions and 10 deletions

View File

@ -25,10 +25,6 @@ LIBRARIES= libnspr4.so.1 libplc4.so.1 libplds4.so.1
.include <bsd.port.pre.mk>
.if ${ARCH} == "arm"
BROKEN= Does not compile on arm
.endif
.if !defined(WITH_DEBUG)
CONFIGURE_ARGS+=--disable-debug
.endif

View File

@ -1,6 +1,6 @@
--- ../pr/include/md/_freebsd.cfg
+++ ../pr/include/md/_freebsd.cfg
@@ -251,6 +251,97 @@
--- ../pr/include/md/_freebsd.cfg.orig 2014-06-05 21:42:08.000000000 +0000
+++ ../pr/include/md/_freebsd.cfg 2014-08-18 00:20:35.358964562 +0000
@@ -251,6 +251,147 @@
#define PR_ALIGN_OF_POINTER 8
#define PR_ALIGN_OF_WORD 8
@ -94,13 +94,63 @@
+
+#define PR_BYTES_PER_WORD_LOG2 2
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#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
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 4
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 4
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 32
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 32
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 5
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 5
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 4
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 8
+#define PR_ALIGN_OF_POINTER 4
+#define PR_ALIGN_OF_WORD 4
+
+#define PR_BYTES_PER_WORD_LOG2 2
+#define PR_BYTES_PER_DWORD_LOG2 3
+
#else
#error "Unknown CPU architecture"
--- ../pr/include/md/_freebsd.h
+++ ../pr/include/md/_freebsd.h
@@ -25,6 +25,10 @@
--- ../pr/include/md/_freebsd.h.orig 2014-08-18 00:19:52.236967851 +0000
+++ ../pr/include/md/_freebsd.h 2014-08-18 00:19:52.507967938 +0000
@@ -25,6 +25,12 @@
#define _PR_SI_ARCHITECTURE "ia64"
#elif defined(__amd64__)
#define _PR_SI_ARCHITECTURE "amd64"
@ -108,6 +158,8 @@
+#define _PR_SI_ARCHITECTURE "powerpc64"
+#elif defined(__powerpc__)
+#define _PR_SI_ARCHITECTURE "powerpc"
+#elif defined(__arm__)
+#define _PR_SI_ARCHITECTURE "arm"
#else
#error "Unknown CPU architecture"
#endif