projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduce anchor scope.
[cparser]
/
main.c
diff --git
a/main.c
b/main.c
index
d20f550
..
2497541
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-80,7
+80,11
@@
#include "warning.h"
#ifndef PREPROCESSOR
#include "warning.h"
#ifndef PREPROCESSOR
-#define PREPROCESSOR "cpp -std=c99 -U__WCHAR_TYPE__ -D__WCHAR_TYPE__=int -U__SIZE_TYPE__ -D__SIZE_TYPE__=__SIZE_TYPE__ -m32 -U__STRICT_ANSI__"
+#ifdef __APPLE__
+#define PREPROCESSOR "gcc -E -std=c99 -U__WCHAR_TYPE__ -D__WCHAR_TYPE__=int -U__SIZE_TYPE__ -D__SIZE_TYPE__=unsigned\\ long -m32 -U__STRICT_ANSI__"
+#else
+#define PREPROCESSOR "cpp -std=c99 -U__WCHAR_TYPE__ -D__WCHAR_TYPE__=int -U__SIZE_TYPE__ -D__SIZE_TYPE__=unsigned\\ long -m32 -U__STRICT_ANSI__"
+#endif
#endif
#ifndef LINKER
#endif
#ifndef LINKER
@@
-88,8
+92,12
@@
#endif
#ifndef ASSEMBLER
#endif
#ifndef ASSEMBLER
+#ifdef __APPLE__
+#define ASSEMBLER "gcc -c -xassembler"
+#else
#define ASSEMBLER "as --32"
#endif
#define ASSEMBLER "as --32"
#endif
+#endif
/** The current c mode/dialect. */
unsigned int c_mode = _C89|_C99|_GNUC;
/** The current c mode/dialect. */
unsigned int c_mode = _C89|_C99|_GNUC;
@@
-572,6
+580,11
@@
int main(int argc, char **argv)
break;
}
break;
}
+#ifdef __APPLE__
+ /* Darwin expects the stack to be aligned to 16byte boundary */
+ firm_be_option("ia32-stackalign=4");
+#endif
+
/* parse rest of options */
filetype_t forced_filetype = FILETYPE_AUTODETECT;
bool help_displayed = false;
/* parse rest of options */
filetype_t forced_filetype = FILETYPE_AUTODETECT;
bool help_displayed = false;