Mail Archives: cygwin/2006/01/09/05:00:20
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hello!
I recently tried to build a package that was using cpp for other
purposes than preprocessing C files. Its configure script was
looking for a way to not have cpp predefine anything, and it
specifically tried the -undef option, but failed. From reading the
docs, I couldn't figure out why. Here's a quote from "info cpp":
'-undef'
Do not predefine any system-specific or GCC-specific macros. The
standard predefined macros remain defined. *Note Standard
Predefined Macros::.
So I searched the web a bit and figured that I could probably fix
it in the specs file. I realise that the specs file probably isn't
the canonical place to change this, but I'll leave that to the gcc
maintainer.
Attached is a patch for the specs file that wraps all old define
rules for cpp inside the following:
%{!undef:old define rules}
I don't know if this is the correct thing to do, but it works for
me<TM>.
Cheers,
Peter
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="cpp-undef.diff"
--- /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs.orig 2005-06-08 00:02:40.001000000 +0200
+++ /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs 2006-01-05 11:33:49.087107900 +0100
@@ -15,7 +15,7 @@
as %(asm_options) %m.s %A }
*cpp:
-%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{!ansi:%{mthreads:-D_MT}}} %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix } %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} %{!nostdinc:%{!mno-win32|mno-cygwin:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}
+%(cpp_cpu) %{!undef:%{posix:-D_POSIX_SOURCE} %{mno-win32:%{mno-cygwin: %emno-cygwin and mno-win32 are not compatible}} %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{!ansi:%{mthreads:-D_MT}}} %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix } %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}}} %{!nostdinc:%{!mno-win32|mno-cygwin:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}
*cpp_options:
%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef}
--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--IS0zKkzwUGydFO0o--
- Raw text -