Commit graph

18 commits

Author SHA1 Message Date
Peter Johnson
5501768adb Use queue.h HEAD macros more portably (also avoiding compiler warning).
svn path=/trunk/yasm/; revision=2258
2010-01-03 01:04:18 +00:00
Peter Johnson
36598c7334 Don't assume CPP_PROG is 3 characters long (e.g. "gcc -E" isn't).
Reported and fix submitted by: Mark Charney

svn path=/trunk/yasm/; revision=2159
2008-11-25 09:16:26 +00:00
Peter Johnson
b7f2fbc64f Add cmake build infrastructure.
Not default nor even distributed in the .tar.gz, the cmake build allows for
loadable yasm plugins by building libyasm as a shared library.
Example plugins are in the plugins/ directory, and may be loaded into a
cmake-built yasm using the -N command line option (non-cmake builds will
not have this option).

Tested only on Linux so far, but should be relatively painless to port to
Windows thanks to the use of cmake rather than libtool to create shared
libraries.

The only modification to the main source tree is some conditional-compiled
additions to yasm.c.

svn path=/trunk/yasm/; revision=2098
2008-05-22 09:08:03 +00:00
Peter Johnson
cbf0c7befd Split NASM preprocessor standard macro set between various modules.
Standard macro sets are looked up based on parser and preprocessor keyword
from individual modules.

The "standard" NASM parser macros now reside in the NASM parser, so when
the GAS parser is used with the NASM preprocessor, the NASM-specific macros
are no longer defined.

Object-format specific macros are now individually defined by each object
formatm module.  This allows for the object formats to be independent of the
NASM preprocessor module and yields a small optimization benefit as unused
object format macros don't need to be skipped over.

Also add GAS macro equivalents for the Win64 SEH more complex directives [1].

[1] Requested by Brian Gladman <brg@gladman.plus.com>

svn path=/trunk/yasm/; revision=2082
2008-05-09 06:46:02 +00:00
Peter Johnson
bd06f1aace Support use of EQU values within NASM preprocessor.
Note: label values are still not supported, and probably never will be,
as yasm is single-pass parsing, and only reads the source file once.
Someday we may add specific support for relatively common %if-%error
idioms.

svn path=/trunk/yasm/; revision=2008
2007-11-03 04:37:44 +00:00
Peter Johnson
f9824d2cfc Change preprocessor interface from block-oriented to line-oriented.
This will make certain types of parser-preprocessor synchronization
easier for upcoming feature enhancements.

Due to additional complexity in GAS (rept), internally GAS converts
lines back into blocks.

svn path=/trunk/yasm/; revision=2007
2007-11-03 04:27:35 +00:00
Peter Johnson
c79ad07fae cpp-preproc.c: Fix typo in description (enternal -> external).
svn path=/trunk/yasm/; revision=2005
2007-10-22 06:27:02 +00:00
Peter Johnson
4db86bc131 Autoconfize cpp program name and popen. This commit inactivates cpp in the
VC build files, as there's no popen.

svn path=/trunk/yasm/; revision=1970
2007-09-20 04:24:46 +00:00
paulbarker
5cbc876ef5 * Added code to the cpp module to pass include directories to the cpp program.
* Marked a string for gettext.
* Fixed a comment error.

svn path=/branches/multiarch/; revision=1961
2007-09-18 12:41:57 +00:00
paulbarker
11543884ff Added dependency generation to cpp module.
svn path=/branches/multiarch/; revision=1941
2007-09-10 10:46:31 +00:00
paulbarker
ca7439276e Delayed destruction of arguments list until cpp_preproc_destroy() in cpp module.
svn path=/branches/multiarch/; revision=1940
2007-09-10 10:17:19 +00:00
paulbarker
d628c6a315 * Marked message strings so gettext can find them.
* Updated POTFILES.in

svn path=/branches/multiarch/; revision=1925
2007-09-01 20:11:11 +00:00
paulbarker
a956b0e1db Removed FILE* argument from preprocessor create() interface. The preprocessor now opens the input file itself.
svn path=/branches/multiarch/; revision=1923
2007-08-30 21:08:33 +00:00
paulbarker
c88fd9dd7e Changed cpp module to destroy the argument list and free the memory it uses.
svn path=/branches/multiarch/; revision=1921
2007-08-30 19:36:57 +00:00
paulbarker
1069d0fce3 Modified cpp module to read directly from the preprocessor using a pipe, rather than storing the output in a temporary file.
svn path=/branches/multiarch/; revision=1920
2007-08-30 11:39:15 +00:00
paulbarker
dc23b37308 Simplified cpp module, re-structuring much of the code and improving comments.
svn path=/branches/multiarch/; revision=1919
2007-08-29 15:40:09 +00:00
paulbarker
09403aea2a Cleaned up cpp_invoke() function and removed call to asprintf().
svn path=/branches/multiarch/; revision=1917
2007-08-29 12:23:39 +00:00
paulbarker
4f95e61961 Initial version of cpp module (on multiarch branch).
svn path=/branches/multiarch/; revision=1916
2007-08-29 11:33:05 +00:00