From ef271579634228a7a5586baa61977e1db9a53aec Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 27 May 2003 12:40:19 +0000 Subject: [PATCH] [project @ 2003-05-27 12:40:19 by simonmar] If we're going to surround all arguments to external functions with quotes (see SysTools.lhs rev. 1.88) then we shouldn't add quotes to the arguments to -D and -U passed to cpp. --- ghc/compiler/main/DriverFlags.hs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/ghc/compiler/main/DriverFlags.hs b/ghc/compiler/main/DriverFlags.hs index e66f718..22e416a 100644 --- a/ghc/compiler/main/DriverFlags.hs +++ b/ghc/compiler/main/DriverFlags.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverFlags.hs,v 1.114 2003/02/24 12:39:26 simonpj Exp $ +-- $Id: DriverFlags.hs,v 1.115 2003/05/27 12:40:19 simonmar Exp $ -- -- Driver flags -- @@ -356,19 +356,8 @@ dynamic_flags = [ #endif ------ HsCpp opts --------------------------------------------------- - -- With a C compiler whose system() doesn't use a UNIX shell (i.e. - -- mingwin gcc), -D and -U args must *not* be quoted, as the quotes - -- will be interpreted as part of the arguments, and not stripped; - -- on all other systems, quoting is necessary, to avoid interpretation - -- of shell metacharacters in the arguments (e.g. green-card's - -- -DBEGIN_GHC_ONLY='}-' trick). -#ifndef mingw32_HOST_OS - , ( "D", Prefix (\s -> addOpt_P ("-D'"++s++"'") ) ) - , ( "U", Prefix (\s -> addOpt_P ("-U'"++s++"'") ) ) -#else - , ( "D", Prefix (\s -> addOpt_P ("-D"++s) ) ) - , ( "U", Prefix (\s -> addOpt_P ("-U"++s) ) ) -#endif + , ( "D", AnySuffix addOpt_P ) + , ( "U", AnySuffix addOpt_P ) ------ Debugging ---------------------------------------------------- , ( "dstg-stats", NoArg (writeIORef v_StgStats True) ) -- 1.7.10.4