Bug 281746 - www/node22: add JIT option to allow compilation without JIT
Summary: www/node22: add JIT option to allow compilation without JIT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-27 21:10 UTC by Piotr Kubaj
Modified: 2025-01-03 04:55 UTC (History)
1 user (show)

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


Attachments
patch (833 bytes, patch)
2024-09-27 21:10 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2024-09-27 21:10:42 UTC
Created attachment 253859 [details]
patch

This allows building on systems with kern.elf64.allow_wx=0.

This patch should be backported to older node versions.
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-10-07 14:59:25 UTC
A commit in branch main references this bug:

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

commit bf4c86a9e27395fdfce99b91d8cc1a0f12c1b3ab
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-10-07 14:58:07 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-10-07 14:58:46 +0000

    www/node{18,20,22}: Add JIT option

    PR:             281746

 www/node18/Makefile | 5 ++++-
 www/node20/Makefile | 5 ++++-
 www/node22/Makefile | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2024-10-07 15:03:43 UTC
Thanks for the patch. I made minor modification to JIT_DESC to avoid ambiguity. Committed and applied to all node ports.
Comment 3 Sean McBride 2025-01-01 02:05:55 UTC
Thanks for your work on this!

I'm pretty ignorant of node (it's just a dependency of something for me). Does this option affect the end result, or only the build machine?

From this: https://v8.dev/blog/jitless I see there can be a big performance hit. I don't want this in my actual web app.  I just want the build machine itself to be able to run with w^x.
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2025-01-01 15:40:08 UTC
(In reply to Sean McBride from comment #3)

IMHO, if you care about the performance, you should enable WX while building this port.
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2025-01-03 04:55:02 UTC
(In reply to Po-Chuan Hsieh from comment #4)

See also bug #276806. I've tried USES=elfctl but no luck.