* Address older versions of C compiler which don't have __BYTE_ORDER__
* Checking for __GNUC__ is not sufficient to determine if builtins are available.
* Add makefile fragment for 32-bit PowerPC on Mac OSX build, and ignore the build directories.
* Add comment describing use of __BIG/LITTLE_ENDIAN__ definition
* `LOGINT` is only useful when `MAIKO_HANDLE_CONSOLE_MESSAGES`
is set.
* Only define some variables if `MAIKO_HANDLE_CONSOLE_MESSAGES`
is set. Flag them as static.
* Remove setting `LOGINT` from the build system as it isn't
needed because we aren't handling console messages.
Rather than having to specify or omit -DBYTESWAP in the Makefile
fragment for each system we can detect whether the system requires
byte swapping based on the __BYTE_ORDER__ C preprocessor definition.
Update CMakeLists.txt to account for this as well.
This was a machine running SunOS 4, which we no longer support.
It had an odd display controller and a compiler with issues that
required workarounds. Those compiler issues aren't an issue in
today's world, so we don't need to keep the workarounds present
for reference.
It had a bit of inline assembly, but that is still present in
other files for other platforms.
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".
We no longer need to run a separate peephole optimization pass over the
compiler generated or hand-coded assembler for SunOS3 and SunOS4 on 68K or SPARC
We remove the preprocessor symbols and code controlled by them
SUN4_OS4_IL
SUN3_OS3_IL
SUN3_OS4_IL
and SUN3_OS3_OR_OS4_IL
This removes a bit of the debug info printing, but other than
that, is pretty close to what it was before.
We also now build it in both the make and cmake build systems.
This code has not worked for a long time. Most systems now maintain
the password entries so that a password is not accessible through the
getpwent() interface. The SUBR that calls this interface may be
removed at a future time.
We need to build `.o` files for the executables separately from
their link step. This lets us have the `CFLAGS` only get used
by the compilation step and not the link step (which uses
`LDFLAGS` or a variant).
This is a prerequisite for doing automatic dependency tracking.
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 no longer had anything to do with profiling and was
only doing some defines for the switch case block addresses,
which we no longer need since there's no longer optional
asm generated for them.
This feature was controlled by the compilation flag `OPDISP`
which would enable some bits of assembler on the x86 (ISC or DOS)
or some other specialized code on SPARC. On SPARC hardware, there
was a special compilation process that would preprocess the code
and generate dispatch tables.
We do this now when this feature is enabled using gcc's computed
gotos feature. This is available in clang and some other compilers.
Notably, it isn't present in Visual Studio.
This doesn't decrease our portability at all as this feature is
optional and it replaces specialized assembler code with C using
compiler extensions (making it cross-platform).
In doing this, we've removed a bunch of related code, however,
it is likely that other pieces yet remain and will be removed
in subsequent commits as we clean things up and refine them.
This feature remains disabled by default for now.
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.
We now can handle these via `inc/maiko/platform.h` and the
constants defined there.
This doesn't change `OS5` for Solaris yet as that's a much wider
set of changes.
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.
This wasn't actually hooked up any more, so it was pretty much
all dead code. The handling of this in the command line options
is gone.
In `bin/makefile-tail`, `DEVFILES` and `LIBFILES` became identical, so
`DEVFILES` went away.
* Delete code related to NATIVETRAN feature.
This was obsolete work that had been done for generating
native code from the bytecode.
ClosesInterlisp/medley#89.
* Remove unused SaveD6.
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.
This might have been necessary before where we had bits of code
that were still `#ifdef LINUX`, but that's mostly gone now, so
this should no longer be required.
The NOFORN flag controls foreign function interface code, which
was written using the dld_* APIs which haven't existed in years.
There was a GNU dld that provided this API, but it was withdrawn
in 2006.
If this code is to be re-enabled, it will have to be changed to
use the `dlopen` family of APIs.
* Support building on OpenBSD, x86-64
* Clean up OpenBSD Makefile
* Add OpenBSD to cmake build
* Use clang as CC for OpenBSD
Co-authored-by: Alex Segura <alex@lispm.dev>
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.