Hi all, I have a fix for this. It seems that just recently (since bd8f7fc56b84369f4e820263c0bcdc85760de6d4) ghc has started calling gcc with extra comand line parameters:
-x assembler >From the gcc man page -x language Specify explicitly the language for the following input files (rather than letting the compiler choose a default based on the file name suffix). This option applies to all following input files until the next -x option. Possible values for language are: c c-header cpp-output c++ c++-header c++-cpp-output objective-c objective-c-header objective-c-cpp-output objective-c++ objective-c++-header objective-c++-cpp-output assembler assembler-with-cpp ada f77 f77-cpp-input f95 f95-cpp-input go java The attached patch replaces '-x assembler' with '-x assembler-with-cpp' and fixes the problem for me on powerpc. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
>From 7acb58b06984c10021026833d72a530a2a2f6459 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo <er...@mega-nerd.com> Date: Sun, 16 Dec 2012 04:22:17 +1100 Subject: [PATCH] Call gcc with '-x assembler-with-cpp' instead of '-x assembler'. One x86 and powerpc, the second form above was ignoring all the CPP lines and hence trying to compile x86 asm on powerpc and powerpc asm on x86. --- compiler/main/DriverPipeline.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index a216370..849532d 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1241,7 +1241,7 @@ runPhase As input_fn dflags then [SysTools.Option "-mcpu=v9"] else []) - ++ [ SysTools.Option "-x", SysTools.Option "assembler" + ++ [ SysTools.Option "-x", SysTools.Option "assembler-with-cpp" , SysTools.Option "-c" , SysTools.FileOption "" inputFilename , SysTools.Option "-o" -- 1.7.10.4
_______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc