Bug 256007 - lang/spidermonkey185: Fix build with clang 12
Summary: lang/spidermonkey185: Fix build with clang 12
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo G. Baio
URL:
Keywords: easy
Depends on:
Blocks: 255570
  Show dependency treegraph
 
Reported: 2021-05-19 17:38 UTC by Dimitry Andric
Modified: 2021-05-23 23:06 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback+
dbaio: maintainer-feedback+
dbaio: merge-quarterly+


Attachments
Fix www/spidermonkey185 build with clang 12 (4.79 KB, patch)
2021-05-19 17:38 UTC, Dimitry Andric
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2021-05-19 17:38:10 UTC
Created attachment 225091 [details]
Fix www/spidermonkey185 build with clang 12

During an exp-run for llvm 12 (see bug 255570), it turned out that www/spidermonkey185 does not build with clang 12.0.0 [1]:

jsiter.cpp:270:16: error: cannot initialize return object of type 'bool' with an rvalue of type 'nullptr_t'
        return NULL;
               ^~~~

There are a few more of these cases scattered over the source. The attached patch fixes them.

[1] http://package22.nyi.freebsd.org/data/mainamd64PR255570-default/2021-05-08_16h02m24s/logs/errors/spidermonkey185-1.8.5_5.log
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-05-20 02:01:46 UTC
Thanks for this Dim
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-05-20 02:02:06 UTC
Comment on attachment 225091 [details]
Fix www/spidermonkey185 build with clang 12

Approved by: koobs (maintainer)
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2021-05-20 02:02:47 UTC
@ Dim / Danilo: Free to committer and MFH this
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-05-23 23:01:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=760a1742ba6c55d815211aadbaff10ca9acee76e

commit 760a1742ba6c55d815211aadbaff10ca9acee76e
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-05-23 22:51:24 +0000
Commit:     Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2021-05-23 22:58:48 +0000

    lang/spidermonkey185: Fix build with clang 12

    PR:             256007
    Approved by:    koobs (maintainer)

 lang/spidermonkey185/files/patch-c++11             | 44 ++++++++++++++++++++++
 .../files/patch-methodjit_MethodJIT.cpp (new)      | 38 +++++++++++++++++++
 2 files changed, 82 insertions(+)
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-05-23 23:05:56 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ee370aa6a68cf788624f64f3cfeebae02cb91769

commit ee370aa6a68cf788624f64f3cfeebae02cb91769
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-05-23 22:51:24 +0000
Commit:     Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2021-05-23 23:04:43 +0000

    lang/spidermonkey185: Fix build with clang 12

    PR:             256007
    Approved by:    koobs (maintainer)

    (cherry picked from commit 760a1742ba6c55d815211aadbaff10ca9acee76e)

 lang/spidermonkey185/files/patch-c++11             | 44 ++++++++++++++++++++++
 .../files/patch-methodjit_MethodJIT.cpp (new)      | 38 +++++++++++++++++++
 2 files changed, 82 insertions(+)
Comment 6 Danilo G. Baio freebsd_committer freebsd_triage 2021-05-23 23:06:52 UTC
Committed, thanks!