I want to live in a cygwin bash shell but still build things using
emscripten. Trying to set up emscripten for that gave me trouble in
a range of ways, and the safest solution I have found is to install
emscripten for native Windows and then place these little wrapper
scripts in my /usr/local/bin. They run the Windows tools from a Cygwin
shell, setting up environment each time.
An especially ugly issue is that when trying to build crlibm in this mode
I find that libtool creates some fragments of C code that use the function
setmode() in such a way that emcc can not find a declaration for same and so
fails. Because this is in code synthesised by libtool I can not patch it in
any comfortable way. So I abandon principles and in the emcc script I
define a macro that disables that function. For the bulk of Reduce this
will certainbly not be an issue because that is all compiled using em++ not
emcc. If I was a great expert regarding emcc and libtool I might have been
able to find a better resolution of this issue.

The scripts here are (obviously when you look at them) keyed to the exact
location where I had installed emsdk, and so they would need adjustment for
use by others.

Note also that when crlibm is built there are uses of "strip" that is not
relevant in the javascript situation and that the output from the build
includes diagnostics from when strip is invoked on nonexistent files of the
form *.exe. This does not appear to be to be damaging.

Arthur Norman, November 2020