winegcc: winecpp support (resent)
Dimitrie O. Paun
dimi at intelliware.ca
Thu Sep 11 17:45:03 CDT 2003
Updated to latest changes.
ChangeLog
Teach winegcc to masquarade as cpp.
Index: tools/winegcc/Makefile.in
===================================================================
RCS file: /var/cvs/wine/tools/winegcc/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- tools/winegcc/Makefile.in 11 Sep 2003 22:16:33 -0000 1.2
+++ tools/winegcc/Makefile.in 11 Sep 2003 22:41:01 -0000
@@ -29,8 +29,10 @@
$(INSTALL_PROGRAM) winegcc $(bindir)/winegcc
$(INSTALL_PROGRAM) winewrap $(bindir)/winewrap
cd $(bindir) && $(RM) wineg++ && $(LN_S) winegcc wineg++
+ cd $(bindir) && $(RM) winecpp && $(LN_S) winegcc winecpp
uninstall::
- $(RM) $(bindir)/winegcc $(bindir)/wineg++ $(bindir)/winewrap
+ $(RM) $(bindir)/winegcc $(bindir)/wineg++ \
+ $(bindir)/winecpp $(bindir)/winewrap
### Dependencies:
Index: tools/winegcc/winegcc.c
===================================================================
RCS file: /var/cvs/wine/tools/winegcc/winegcc.c,v
retrieving revision 1.2
diff -u -r1.2 winegcc.c
--- tools/winegcc/winegcc.c 11 Sep 2003 22:16:33 -0000 1.2
+++ tools/winegcc/winegcc.c 11 Sep 2003 22:43:08 -0000
@@ -102,13 +102,14 @@
{
strarray *gcc_argv;
int i, j;
- int linking = 1, cpp = 0, use_static_linking = 0;
+ int linking = 1, cpp = 0, preprocessor = 0, use_static_linking = 0;
int use_stdinc = 1, use_stdlib = 1, use_msvcrt = 0, gui_app = 0;
tmp_files = strarray_alloc();
atexit(clean_temp_files);
- if (strendswith(argv[0], "++")) cpp = 1;
+ if (strendswith(argv[0], "winecpp")) preprocessor = 1;
+ else if (strendswith(argv[0], "++")) cpp = 1;
for ( i = 1 ; i < argc ; i++ )
{
@@ -161,6 +162,7 @@
}
}
+ if (preprocessor) linking = 0;
if (use_static_linking) error("Static linking is not supported.");
gcc_argv = strarray_alloc();
@@ -241,10 +243,13 @@
}
else
{
- strarray_add(gcc_argv, cpp ? "g++" : "gcc");
+ strarray_add(gcc_argv, preprocessor ? "cpp" : cpp ? "g++" : "gcc");
- strarray_add(gcc_argv, "-fshort-wchar");
- strarray_add(gcc_argv, "-fPIC");
+ if (!preprocessor)
+ {
+ strarray_add(gcc_argv, "-fshort-wchar");
+ strarray_add(gcc_argv, "-fPIC");
+ }
if (use_stdinc)
{
if (use_msvcrt)
--
Dimi.
More information about the wine-patches
mailing list