Bug 197577 - [PATCH] devel/nspr: Has no mips/mips64 knowledge
Summary: [PATCH] devel/nspr: Has no mips/mips64 knowledge
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: mips Any
: --- Affects Some People
Assignee: freebsd-gecko (Nobody)
URL: http://dirty.ysv.freebsd.org/data/11m...
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2015-02-12 18:36 UTC by Sean Bruno
Modified: 2015-05-12 21:03 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments
Add proper types and defines for mips and mips64 architectures (3.13 KB, patch)
2015-05-03 17:03 UTC, Sean Bruno
no flags Details | Diff
patch to enable proper support on mips/mips64 (3.11 KB, patch)
2015-05-05 03:24 UTC, Sean Bruno
no flags Details | Diff
mips64 and mips*el fixup (4.54 KB, patch)
2015-05-11 18:35 UTC, Jan Beich
no flags Details | Diff
(followup) fix mips64 and mips*el, v2 (4.28 KB, patch)
2015-05-11 19:10 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer 2015-02-12 18:36:52 UTC
gmake[4]: Entering directory '/wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/build/pr/src/io'
/nxb-bin/usr/bin/cc -o prfdcach.o -c -fvisibility=hidden    -O -pipe -G0  -fno-strict-aliasing  -ansi -Wall -fPIC  -UDEBUG -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DNDEBUG=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1 -DFREEBSD=1 -DHAVE_BSD_FLOCK=1 -DHAVE_SOCKLEN_T=1 -DHAVE_DLADDR=1 -DHAVE_LCHOWN=1 -DHAVE_SETPRIORITY=1 -DHAVE_STRERROR=1 -DHAVE_SYSCALL=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -D_NSPR_BUILD_ -I../../../dist/include/nspr -I/wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/include -I/wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/include/private  /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/src/io/prfdcach.c
In file included from ../../../dist/include/nspr/prtypes.h:26,
                 from ../../../dist/include/nspr/pratom.h:14,
                 from ../../../dist/include/nspr/nspr.h:9,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/include/private/primpl.h:39,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/src/io/prfdcach.c:6:
../../../dist/include/nspr/prcpucfg.h:397:2: error: #error "Unknown CPU architecture"
In file included from ../../../dist/include/nspr/pratom.h:14,
                 from ../../../dist/include/nspr/nspr.h:9,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/include/private/primpl.h:39,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/src/io/prfdcach.c:6:
../../../dist/include/nspr/prtypes.h:263:2: error: #error No suitable type for PRInt8/PRUint8
../../../dist/include/nspr/prtypes.h:288:2: error: #error No suitable type for PRInt16/PRUint16
../../../dist/include/nspr/prtypes.h:320:2: error: #error No suitable type for PRInt32/PRUint32
../../../dist/include/nspr/prtypes.h:413:2: error: #error 'sizeof(int)' not sufficient for platform use
In file included from ../../../dist/include/nspr/pratom.h:14,
                 from ../../../dist/include/nspr/nspr.h:9,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/include/private/primpl.h:39,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/src/io/prfdcach.c:6:
../../../dist/include/nspr/prtypes.h:436: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PROffset32'
../../../dist/include/nspr/prtypes.h:467: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PRBool'
../../../dist/include/nspr/prtypes.h:477: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PRPackedBool'
../../../dist/include/nspr/prtypes.h:490: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PRUnichar'
In file included from ../../../dist/include/nspr/prtypes.h:549,
                 from ../../../dist/include/nspr/pratom.h:14,
                 from ../../../dist/include/nspr/nspr.h:9,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/include/private/primpl.h:39,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/src/io/prfdcach.c:6:
../../../dist/include/nspr/obsolete/protypes.h:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uintn'
../../../dist/include/nspr/obsolete/protypes.h:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'intn'
In file included from ../../../dist/include/nspr/prtypes.h:549,
                 from ../../../dist/include/nspr/pratom.h:14,
                 from ../../../dist/include/nspr/nspr.h:9,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/include/private/primpl.h:39,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/src/io/prfdcach.c:6:
../../../dist/include/nspr/obsolete/protypes.h:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uint32'
../../../dist/include/nspr/obsolete/protypes.h:88: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uint16'
../../../dist/include/nspr/obsolete/protypes.h:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uint8'
../../../dist/include/nspr/obsolete/protypes.h:114: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int32'
../../../dist/include/nspr/obsolete/protypes.h:126: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int16'
../../../dist/include/nspr/obsolete/protypes.h:135: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int8'
In file included from ../../../dist/include/nspr/nspr.h:9,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/include/private/primpl.h:39,
                 from /wrkdirs/usr/ports/devel/nspr/work/nspr-4.10.8/nspr/pr/src/io/prfdcach.c:6:
../../../dist/include/nspr/pratom.h:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PR_AtomicIncrement'
../../../dist/include/nspr/pratom.h:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PR_AtomicDecrement'
../../../dist/include/nspr/pratom.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PR_AtomicSet'
../../../dist/include/nspr/pratom.h:63: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PR_AtomicAdd'
Comment 1 Bugzilla Automation freebsd_committer 2015-02-12 18:36:52 UTC
Auto-assigned to maintainer gecko@FreeBSD.org
Comment 2 Sean Bruno freebsd_committer 2015-05-03 17:03:20 UTC
Created attachment 156292 [details]
Add proper types and defines for mips and mips64 architectures

Place this file into the files/ dir
Comment 3 Sean Bruno freebsd_committer 2015-05-03 17:05:08 UTC
I'm not sure that gecko@ has any reviewers on it, so firing this off to the last few folks that did stuff here.
Comment 5 Ed Maste freebsd_committer 2015-05-05 02:19:38 UTC
How is the IS_64 macro used (is it supposed to be #defined for mips)?
Comment 6 Sean Bruno freebsd_committer 2015-05-05 03:20:22 UTC
(In reply to Ed Maste from comment #5)

No, it is not.  :-) fixing.
Comment 7 Sean Bruno freebsd_committer 2015-05-05 03:24:10 UTC
Created attachment 156362 [details]
patch to enable proper support on mips/mips64
Comment 8 Ed Maste freebsd_committer 2015-05-05 20:03:18 UTC
Assuming the only change is removing IS_64 this looks reasonable to me
Comment 9 Sean Bruno freebsd_committer 2015-05-05 20:12:10 UTC
(In reply to Ed Maste from comment #8)
How do we get this up to the mozilla peoples?
Comment 10 Baptiste Daroussin freebsd_committer 2015-05-05 20:34:40 UTC
Jan this sounds like a job for you :)
Comment 11 commit-hook freebsd_committer 2015-05-09 22:22:08 UTC
A commit references this bug:

Author: jbeich
Date: Sat May  9 22:21:56 UTC 2015
New revision: 385914
URL: https://svnweb.freebsd.org/changeset/ports/385914

Log:
  devel/nspr: add support for mips/mips64

  PR:		197577
  Submitted by:	sbruno

Changes:
  head/devel/nspr/files/patch-bug1163346
Comment 12 Jan Beich freebsd_committer 2015-05-09 22:48:22 UTC
Thanks. Forwarded upstream.

(In reply to Sean Bruno from comment #9)
> How do we get this up to the mozilla peoples?

Try the following workflow if want to get more involved.
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch
Comment 13 Jan Beich freebsd_committer 2015-05-11 18:16:26 UTC
Comment on attachment 156362 [details]
patch to enable proper support on mips/mips64

>+#elif defined(__mips__)
>+#define _PR_SI_ARCHITECTURE "mips"
>+#elif defined(__mips64__)
>+#define _PR_SI_ARCHITECTURE "mips64"

__mips__ is defined for both in gcc and clang which means the first match wins i.e., always 32bit.

  contrib/gcc/config/mips/freebsd.h
  contrib/llvm/tools/clang/lib/Basic/Targets.cpp.

I wonder if regression-test target would have caught it.

>+#elif defined(__mips__)
>+
>+#undef  IS_LITTLE_ENDIAN
>+#define IS_BIG_ENDIAN    1

See upstream reviewer comment. We may need to do smth similar to _linux.cfg.
Comment 14 Jan Beich freebsd_committer 2015-05-11 18:35:17 UTC
Created attachment 156665 [details]
mips64 and mips*el fixup

Can you test/review this patch? It tries to follow the style in arm and powerpc checks.
Comment 15 Jan Beich freebsd_committer 2015-05-11 19:10:49 UTC
Created attachment 156666 [details]
(followup) fix mips64 and mips*el, v2

*sigh* Clang defines are different: __MIPSEB__ vs. _MIPSEB.
Comment 16 commit-hook freebsd_committer 2015-05-12 21:01:08 UTC
A commit references this bug:

Author: jbeich
Date: Tue May 12 21:00:54 UTC 2015
New revision: 386173
URL: https://svnweb.freebsd.org/changeset/ports/386173

Log:
  devel/nspr: fix up mips64 and mips*el support

  This syncs the patch with what landed upstream.

  PR:		197577

Changes:
  head/devel/nspr/files/patch-bug1163346
Comment 17 commit-hook freebsd_committer 2015-05-12 21:03:10 UTC
A commit references this bug:

Author: jbeich
Date: Tue May 12 21:02:28 UTC 2015
New revision: 386174
URL: https://svnweb.freebsd.org/changeset/ports/386174

Log:
  devel/nspr: bump PORTREVISION after r386173 to rebuild mips packages

  PR:		197577

Changes:
  head/devel/nspr/Makefile