Make the Makefile require a standard
|TARGET=<arch>-<vendor>-<sys>-<abi>| variable to be set instead of
requiring |TARGET_OS| and |TARGET_ARCH_BASE|.
Also, have the Makefile generate outputs to a subdirectory of build/
that names the target and compiler. This will make it easier and less
error-prone to test multiple configurations using a single source tree,
and will make some future cross-compilation targets easier.
Carl Mehner reported that the build fails on Mac OS X using its
normal Apple Clang toolchain because that toolchain requires a slightly
different set of perlasm and linker options.
This commit introduces the |TARGET_OS| build option to allow us to make
operating-system-dependent choices during the build. It isn't ideal to
use |TARGET_OS| for this problem because it's really an issue with the
toolchain (a host issue), but this seems to be a reasonable first step
while we figure out a long-term solution.
This change is being made in preparation for adding a |TARGET_OS| build
option. |TARGET_ARCH_BASE| is used to decide which assembly language
code to compile, and to set |TARGET_ARCH| (the target flags passed to
the compilers and linker) if it isn't already set.