Is it possible to disable the automatic CPU-specific tuning in NaCl?
I would like to compile the reference .c
ignoring any x86 .s
(from qhasm) etc. where applicable.
Setting -march
and -mtune
or -mcpu
appears not to be sufficient.
Is it possible to disable the automatic CPU-specific tuning in NaCl?
I would like to compile the reference .c
ignoring any x86 .s
(from qhasm) etc. where applicable.
Setting -march
and -mtune
or -mcpu
appears not to be sufficient.
libsodium supports cross-compiling.
Use the standard --host=...
switch when running the configure
script.
Every release is verified to cross-compile (and pass all the tests on the actual platform or emulator) at least to iOS, linux/mips, linux/mipsel and linux/arm, as well as to javascript.
And indeed, feel free to open an issue if you have difficulties cross-compiling it to another target.
All the relevant build logic in nacl is in the bourne shell script ./do
To compile portable implementations and only those:
sed -i.original '
# use reference implementations only
/implementationdir=`dirname \$doth`/a\
case "$implementationdir" in\
*/ref|*/portable) ;;\
*) echo "SKIPPING $implementationdir"; continue ;;\
esac
' ./do
(Authored at aetey.se, this piece of code above is hereby put in the public domain)
To be able to cross-compile you would have to remove the parts which compile and run ./try and ./measure (in sed/ex-like notation, given ./do as of nacl-20110221, something similar to: 352,358d; 347d; 275,326d;).
To avoid running the tests:
/for bintype in commandline tests/s/tests//
.