summaryrefslogtreecommitdiff
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* clang: mark inline functions unused and add warning optionsH. Peter Anvin (Intel)2020-06-301-13/+25
| | | | | | | | | | | | | clang, unlike gcc, will warn on inline functions which are unused. This can happen if a function is either intended to be used in the future, or it is only used under certain config options. Mark those functions with the "unused" attribute; not only does it quiet the warning, but it also documents it for the user. Shuffle around the warning options in configure and add a few more that are specific to clang. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* BR 3392667: more reasonable limit for expression descentH. Peter Anvin (Intel)2020-06-011-0/+2
| | | | | | | | Set an expression descent limit to 8192, which is more reasonable to expect to work on most platforms. Furthermore, if getrlimit() exists, then try to use it to see if we need to further limit the size. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* Makefile portability improvement, build nasmdoc.pdf.xzH. Peter Anvin (Intel)2020-05-261-6/+52
| | | | | | | | Significantly improve the portability/reliability of a general make command. Build a .pdf.xz version of the documentation, using an uncompressed pdf as basis. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* config/unconfig.h: eliminate #undef directivesH. Peter Anvin2019-10-031-2/+2
| | | | | | | | | | config/config.h as generated by autoconf has #undef directives commented out, but the autoheader-generated template contains them, and config/unconfig.h should not contain them. Re-introduce config/config.h.in, and postprocess it to generate config/unconfig.h by commenting out all the #undef directives, just as configure does. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* configure.ac: look for unconfig.h not uninit.h...H. Peter Anvin2019-08-271-1/+1
|
* BR 3392601: allow the user to disable pedantic warningsH. Peter Anvin (Intel)2019-08-161-3/+6
| | | | | | | | --disable-pedantic passed to configure will now disable -W, -Wc90-c99-compat, and -pedantic. Requested-by: Orzkan Sezer <sezeroz@gmail.com> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* config.h: separate function and function pointer attributes; automateH. Peter Anvin (Intel)2019-08-161-7/+8
| | | | | | | | | | | | Separate out function and function pointer attributes, as not all versions of all compilers support both. Have macros related to function attributes auto-generated by autoheader. As a result, rename config.h.in to unconfig.h, to make it more obvious that it is really intended to be included from some C programs. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* file.c: handle long pathnames on WindowsH. Peter Anvin (Intel)2019-05-151-1/+1
| | | | | | | | | | Windows supports pathnames up to 32767 UTF-16 characters, but using the standard interfaces only up to 260 characters. Wrap the functions that take filenames on Windows. Clean up the compatiblity layers some more for reduced #ifdefs. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* Merge branch 'evalmacro'H. Peter Anvin (Intel)2019-04-241-0/+5
|\ | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: asm/preproc.c output/elf.h output/outelf.c output/outelf.h version Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * configure.ac: add --enable-profiling optionH. Peter Anvin2019-02-251-0/+5
| | | | | | | | | | | | Add option to enable profiling without having to modify Makefile. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | autoconf: move aux directory, define AC_CONFIG_AUX_DIR()H. Peter Anvin2019-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The name "aux" is reserved on Windows platforms, a legacy from CP/M via MS-DOS. Rename it to "helpers". Turns out that that directory wasn't actually used properly, because AC_CONFIG_AUX_DIR was never defined, and there was a redundant copy of install-sh checked into the base of the source tree. Reported-by: Ehsan Alem Mohammad Ghasemlou <e.ghasemloo@gmail.com> NASM-Bugzilla: https://bugzilla.nasm.us/show_bug.cgi?id=3392560 Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Test for the mempcpy() function and add alternative if missingH. Peter Anvin2018-12-261-0/+1
| | | | | | | | | | | | | | If memcpy() doesn't exist, then add an inline alternative using memcpy(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | build: Add missing PA_ADD_LDFLAGS helperCyrill Gorcunov2018-12-231-1/+1
| | | | | | | | | | | | Fixes b0121dc312a83ab4912769e36c9f2cbe9493545d Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | autoconf: use librarized autoconf setupH. Peter Anvin2018-12-221-7/+7
| | | | | | | | | | | | | | I have been setting up a cross-project librarized autoconf setup; use it for NASM as well. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | nasm_assert(): try to run at compile time if possibleH. Peter Anvin (Intel)2018-12-141-1/+2
| | | | | | | | | | | | | | | | | | | | Try to make nasm_assert() do a static assert if the argument can be evaluated at compile time by any particular compiler. We also provide nasm_try_static_assert() which will assert a compile-time expression if and only if we can determine we have a constant at compile time *and* we know that the compiler has a way to handle it. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | configure: make section garbage collect the defaultH. Peter Anvin (Intel)2018-12-131-3/+4
| | | | | | | | | | | | | | | | | | Section garbage collect really is quite useful, and it makes managing library source code management a little bit less stressful. It has been used by the official builds for a while now, turn it on by default. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | strlist: can be unique or not, add printf functionsH. Peter Anvin (Intel)2018-12-131-2/+0
| | | | | | | | | | | | | | | | | | | | Make it a selectable option at allocation time if a strlist should contain only unique strings or not. If not, we omit the hash table and strlist_find() will not do anything. Add printf()-style functions to a strlist. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Merge remote-tracking branch 'origin/nasm-2.14.xx'H. Peter Anvin (Intel)2018-12-121-0/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: asm/assemble.c asm/directiv.c asm/error.c asm/float.c asm/labels.c asm/listing.c asm/nasm.c asm/parser.c asm/preproc.c asm/stdscan.c include/error.h output/outelf.c version Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * configure: add -Wno-shift-negative-valueH. Peter Anvin (Intel)2018-12-121-0/+5
| | | | | | | | | | | | | | | | | | | | Shifting negative values is undefined in standard C, but we have tons of dependencies that signed arithmetic is 2's-complement in the code anyway, and on gcc-like compilers we pass the -fwrapv option to indicate exactly that. Therefore, this is not a valid warning in our case and should be suppressed. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | nasmlib: Add nasm_(v)asprintf()H. Peter Anvin (Intel)2018-12-121-0/+2
| | | | | | | | | | | | | | | | | | Add a version of (v)asprintf(), which allocates a string on the heap. Unlike the standard version of (v)asprintf(), we return the pointer; if one wants the length of the string then one can simply use the %n pattern. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | ctype: create our own ctype tableH. Peter Anvin2018-11-281-0/+2
| | | | | | | | | | | | | | | | Create our own ctype table where we can do the tests we want to do cheaply, instead of calling ctype functions and then adding additional tests all over the code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge remote-tracking branch 'origin/nasm-2.14.xx'H. Peter Anvin2018-06-151-0/+3
|\ \ | |/ | | | | | | | | Fixes for various build problems. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * gcc: newer gcc trip on -Wstringop-truncation for valid uses of strncpy()H. Peter Anvin2018-06-021-0/+3
| | | | | | | | | | | | | | | | strncpy() is correctly used to fill in a zero-*padded* (not zero-terminated) field in several places. Make gcc not complain about those uses. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | configure.ac: drop -O3; it is excessive and produces huge codeH. Peter Anvin2018-06-141-11/+10
|/ | | | | | | There is no reason to use -O3; it causes code to be insanely duplicated. Simplify the configure.ac file too. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* configure.ac: add -fvisibility=hidden if supportedH. Peter Anvin2018-05-301-0/+6
| | | | | | | | None of our symbols are available for a dynamic library, and if they were, there would be no point in allowing them to be overridden. This optimizes code generation for global symbols. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* malloc: simplify nasm_malloc code, add nasm_strcatn()H. Peter Anvin2018-05-301-0/+1
| | | | | | | | | | | | | | Simplify the nasm_malloc() code by moving the pointer check into a common subroutine. We can now issue a filename error even for failures like malloc(). Add support for the gcc sentinel attribute (verify that a list ends with NULL). Add a handful of safe_alloc attributes. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Revert "compiler: Add fallthrough() helper"Cyrill Gorcunov2018-02-251-5/+0
| | | | This reverts commit 8ba28e13ea4453a587d08e5533e60f4ff2b4781a.
* compiler: Add fallthrough() helperCyrill Gorcunov2018-02-251-0/+5
| | | | | | https://bugzilla.nasm.us/show_bug.cgi?id=3392465 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Merge branch 'master' of ssh://repo.or.cz/srv/git/nasmH. Peter Anvin2018-02-221-0/+7
|\
| * Fix problem with C99 inlines and -Werror=missing-prototypesH. Peter Anvin2018-02-201-0/+7
| | | | | | | | | | | | | | | | | | | | Some older versions of gcc (gcc 4.2.1 at least) produce a warning, promoted to error, on C99 inlines. Do some work to figure out if we need to fall back to GNU inline syntax. Fix some issues with GNU inline syntax. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Introduce cold function attributeH. Peter Anvin2018-02-221-0/+1
|/ | | | | | Attribute to deemphasize certain code paths. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Eliminate filename length restrictions, remote ofmt->filename()H. Peter Anvin2017-12-201-1/+4
| | | | | | | | | | | Get rid of remaining dependencies on FILENAME_MAX, which ought to have been removed a long time ago. Remove ofmt->filename(); all implementations pretty much do the same thing and there is absolutely no reason to duplicate that functionality all over the place. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* error: add --enable-panic-abort config optionsH. Peter Anvin2017-12-201-0/+7
| | | | | | | For debugging purposes, make it possible to force calling abort() on ERR_PANIC. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* configure.ac: add endian headers to configure testH. Peter Anvin2017-11-291-1/+6
| | | | | | | - Add endian headers to the standard tests if present - Check for __builtin_constant_p() Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* More autoconf modernizations; upgrade AC_PREREQ to 2.69H. Peter Anvin2017-11-081-2/+2
| | | | | | | | | | Make further autoconf rule improvements and update the required version of autoconf to 2.69. That version is now 5+ years old and although there might be older versions which have the prerequisite macros they are known to have lots of bugs, and we can't really test them. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge remote-tracking branch 'origin/nasm-2.13.xx'H. Peter Anvin2017-11-011-5/+20
|\ | | | | | | | | | | | | Resolved conflicts: version Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * configure.ac: more debugging optionsH. Peter Anvin2017-10-111-5/+20
| | | | | | | | | | | | | | | | Make -O0 imply -fno-omit-frame-pointer Add options to compile/link with AddressSanitizer and UndefinedSanitizer. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * configure: Add --enable-gdb optionCyrill Gorcunov2017-08-161-0/+6
| | | | | | | | | | | | | | When one needs to run nasm under GDB Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | configure: Add --enable-gdb optionCyrill Gorcunov2017-07-291-0/+6
| | | | | | | | | | | | When one needs to run nasm under GDB Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | endian.h: can be called sys/endian.h or machine/endian.hH. Peter Anvin2017-04-241-1/+1
| | | | | | | | | | | | | | On some platforms, endian.h may exist but be called sys/endian.h or machine/endian.h. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Clean up byteorder functionsH. Peter Anvin2017-04-241-5/+1
| | | | | | | | | | | | | | Move byte order handling functions to their own header file, and try to be more specific about how exactly to handle things. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' into elfH. Peter Anvin2017-04-231-2/+3
|\ \ | |/
| * configure.ac: fix --enable-sectionsH. Peter Anvin2017-04-231-2/+3
| | | | | | | | | | | | | | | | The --enable-sections option isn't too useful without -Wl,--gc-sections. It's unclear if gcc will provide that option by default. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' into elfH. Peter Anvin2017-04-181-55/+66
|\ \ | |/ | | | | | | | | | | | | Resolved Conflicts: aclocal.m4 output/outelf.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * configure.ac, doc/Makefile.in: fix out-of-directory buildEd Beroset2017-04-141-1/+1
| | | | | | | | | | | | | | Missed some necessary updates. Signed-off-by: Ed Beroset <beroset@ieee.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * configure, doc/Makefile.in: fix out-of-directory buildEd Beroset2017-04-141-1/+1
| | | | | | | | | | | | | | Fix bit rot for out of directory builds. Signed-off-by: Ed Beroset <beroset@mindspring.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * doc: add the option to generate an uncompressed PDFH. Peter Anvin2017-04-101-0/+8
| | | | | | | | | | | | | | | | An uncompressed PDF is about twice as big, but if one is using an external compression program (e.g. .pdf.xz) it compresses far better. Use it for the RPM specfile. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * doc: don't bother using autoconf to search for pdf toolsH. Peter Anvin2017-04-061-3/+0
| | | | | | | | | | | | | | | | We have separate invocations for the various PDF tools anyway. It generates a slightly annoying error message, but makes some other things a little easier. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * rdoff: move rdoff build into main Makefile to make it build on WindowsH. Peter Anvin2017-04-061-2/+2
| | | | | | | | | | | | | | NSIS packages rdoff, and we really want to be able to build the full NSIS package on an MSVC platform. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Windows: clean up the handling of stat on WindowsH. Peter Anvin2017-04-061-2/+6
| | | | | | | | | | | | | | | | [f]stat on Windows is messy: we need to use _stati64 for maximum compatibility, but because there is a bunch of stuff wrapped in macros, autoconf sometimes gets the wrong answers. Signed-off-by: H. Peter Anvin <hpa@zytor.com>