Make the NSIS output automatically select the output architecture to
generate the proper filename and, much more importantly, set up the
proper default install directory.
This requires Perl as well as makensis to be present in order to make
an installer, but that doesn't really seem like a too onerous of a
requirement (NSIS being the big external dependency here.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Most preprocessor warnings are ERR_PASS1, but we want to see them in
the listing file too. If we make it to the code-generation pass,
ignore ERR_PASS* for the purpose of emitting warnings to the list
file.
While we are at it, allow ERR_DEBUG to specify ERR_PASS* too.
From master branch checkin 4a8d10c1a0
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Additional places where we can change ERR_PANIC and ERR_FATAL to
nasm_panic and nasm_fatal. Note that nasm_panic and nasm_fatal should
*aways* be expected to be fatal; they should never be used in a
suppressed context. It is critical that we verify that this doesn't
break anything.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
We pass around a whole bunch of function pointers in arguments,
which then just get stashed in static variables. Clean this mess
up and in particular handle the error management in the preprocessor
using nasm_set_verror() which already exists.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
From master branch checkin 130736c0cf
Resolved Conflicts:
nasm.c
preproc-nop.c
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Replace all instances of ERR_FATAL or ERR_PANIC with nasm_fatal or
nasm_panic so the compiler knows that these functions cannot return,
*and* we trigger abort() if we were to ever violate that constraint.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Just like nasm_panic(), nasm_fatal() tells the compiler that
we can never return from this call.
From master branch checkin bbbf508394
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
When we have to die due to an assertion violation, then show the
missing symbol. Also, use nasm_panic() rather than nasm_assert() for
this purpose.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
We probably ought to release 2.12.01 in the short term. So far the
changes that have accumulated have all been build fixes.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
autoconf's handling of --without and --disable are a bit
counterintuitive: instead of calling the "not given" branch of the
conditional, they instead call the "given" part of the conditional
with an argument of "no". Make --disable-werror work as expected.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Remove unused debugging functions, and the _unused macro which turned
out to cause compilation problems on Linux/PowerPC.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Look for WORDS_LITTLEENDIAN instead of the gcc-specific __BYTE_ORDER.
Use our existing "compiler.h" portability layer.
Make functions which are not exported static.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
In order to make it more likely to compile cleanly with "C90 plus long
long" style compilers, remove existing constructs (mostly commas at
the end of enums) that aren't compliant.
Ironically enough this was most likely an unintentional omission in
C90...
From master branch checkin 7214d18b40
Resolved Conflicts:
output/outelf32.c
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
In order to make it more likely to compile cleanly with "C90 plus long
long" style compilers, make gcc warn for incompatible constructs.
Remove existing constructs (mostly commas at the end of enums) that
aren't compliant.
Ironically enough this was most likely an unintentional omission in
C90...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
We are supposed to handle compiling on a "C90 plus long long"
compiler, so make gcc (our most common development platform compiler)
complain when we don't.
However, suppress the complaints about the Microsoft definitions of
the <inttypes.h> strings.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
We can always operate correctly if neither WORDS_BIGENDIAN nor
WORDS_LITTLEENDIAN are defined, so if the word order is either
indeterminable or universal (the compiler generates both bigendian and
litteendian output from the same sources) then define neither.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add the -fwrapv to gcc and compatible C compilers, to enforce
deterministic 2's-complement behavior with regards to signed and
unsigned integer types.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Fixes Visual C++ 2010 breakage in recently added Codeview 8 code;
these are C99 features which were not necessary to introduce.
Signed-off-by: Knut St. Osmundsen <bird-nasm@anduin.net>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Removes help text left behind when --allow-64-bit was turned into
default behavior + warning.
Signed-off-by: Knut St. Osmundsen <bird-nasm@anduin.net>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Correctly generate references between sections. The previous
version would work correctly as long as all relative references
came from the first section, which is usually __TEXT,__text and
so it usually worked.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Better handling of the replacement for fseeko() in its absence; also
look for the Windows _fseeki64() function.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
For 64 bits, a BRANCH reloc is sometimes needed to fix up PIC
problems. Make a best effort at generating BRANCH relocs just as
we make a best effort at distinguishing GOTLOAD from GOT.
This needs to be replaced with information from the assembler to
the backend.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
On systems that support it, allow the writing of sparse files.
This can be useful for some file formats (like binary, or ELF if the
alignments are very large) that can contain large amounts of zeroes.
This is not inherently portable code, so condition it on certain known
systems.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Add an option to compile with -Werror, useful for development.
Change --with-ccache to --enable-ccache to match guidelines.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Windows: indicate that we support multibyte character sets in file
names.
Unix: support gigantic input and output files. Might be useful
especially in the presence of the INCBIN directive.
Signed-off-by: H. Peter Anvin <hpa@linux.kernel.org>
The __TEXT segment in particular contains both code and data. The
most consistent thing is to look only at the section name, and have
the same behavior across sections.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Make struct dfmt and the struct dfmt arrays const across the board,
and make them static whereever possible.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>