Some versions of "make" do not predefine make variable RM (looking at you, FreeBSD)
so if it has NOT been defined we define it as "rm -f"
Also, update the cleanup target to use $(RM) rather than refering directly to "rm".
This was making sure that the overflow in some our opcode
implementations was visible to the C code so that overflow
detection would work in gcc and clang.
This is now handled on those compilers by using some built-ins
that detect overflow.
The `-fwrapv` should no longer be needed.
ClosesInterlisp/medley#90.
This is the old way that releases were built and isn't relevant
today. It made a variety of assumptions about how things were
linked and allowed for the user to re-link an executable, but
that isn't something we need to do any longer.
This doesn't yet remove the checksum, ldechecksum, and related
scripts.
In the SunOS 4 days, the system cc apparently couldn't compile
the lp* files, so there was an arrangement to use an `ANSICC`,
which was just `gcc`, to build those files.
We no longer have this issue.
Add standardized options for Oracle Developer Studio C compiler (aka SunPro C)
Using -funsigned-char causes the Oracle Developer Studio C compiler typedefs for
int8_t to become unsigned (uint8_t) rather than signed, with no warning or
other indication that this has happened.
We currently build for ISO C90 with GNU extensions. The GNU
extensions include both library and language features.
Compiling without GNU extensions results in a number of compilation
failures due to use of those library features.
With this, we'll build for ISO C99 with the GNU extensions and
can evaluate what's going on with those library features in the
future.
* Move clang/gcc options into makefile-header.
This puts all of the shared options into a single place so that
we can easily update it.
* Add -fwrapv to the clang/gcc command lines.
This is a step along the way to fixing interlisp/medley#90.
Enabling `-fwrapv` will let overflow checks that rely upon undefined
behavior to work correctly. Without this, with modern versions of
clang and gcc, the overflow checks in the C code are eliminated
by the compiler, resulting in incorrect behavior on the part of
Maiko.
See the linked bug for details and discussion.
Hopefully, this usage of `-fwrapv` will go away once we're using
the correct compiler builtins to detect and handle overflow
correctly.