There is not yet a CHERI port of v8 and so node and npm must be installed as A64 programs. If you then use npm to install something with native components then gyp then it will build using cc, which defaults to building pure-capability binaries. I have worked around this locally by hacking /usr/local64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi to change this bit at the end of the file:
[ 'OS in "freebsd openbsd netbsd solaris android" or \
(OS=="linux" and target_arch!="ia32")', {
'cflags': [ '-fPIC' ],
}],
to this:
[ 'OS in "freebsd openbsd netbsd solaris android" or \
(OS=="linux" and target_arch!="ia32")', {
'cflags': [ '-fPIC', '-mabi=aapcs' ],
'ldflags': [ '-mabi=aapcs' ],
}],
There is not yet a CHERI port of
v8
and sonode
andnpm
must be installed as A64 programs. If you then use npm to install something with native components thengyp
then it will build usingcc
, which defaults to building pure-capability binaries. I have worked around this locally by hacking/usr/local64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
to change this bit at the end of the file:to this: