Duncan Coutts schrieb: > ghc --make HelloWorld.hs -optc-mcpu=ultrasparc > > then ghc would call gcc to compile .c -> .s with -mcpu=ultrasparc and so > generate sparc V9 instructions. But when it came to assembling the .s > file, we've not passed the abi flag via -opta so it defaults to the > minimum abi. Then of course the assembler bumps into sparc V9 > instructions but it had only been told to expect sparc V8 and so it > complains. > > So I'd suggest building a test file with -split-objs and -v and see > exactly what flags ghc is passing to gcc at the compilation and assembly > stages.
ok, my gcc is called with mcpu=v9. So "ghc -split-objs" works now with either -optc-mcpu=v8 or -opta-mcpu=v9 (or even -opta-mcpu=ultrasparc). Where should I place what so that my stage1 inplace-compiler works without "SplitObjs=NO" in mk/build.mk? Thanks Christian
Glasgow Haskell Compiler, Version 6.6, for Haskell 98, compiled by GHC version 6.6 Using package config file: /usr/local/pub-bkb/ghc/ghc-6.6/lib/ghc-6.6/package.conf wired-in package base mapped to base-2.0 wired-in package rts mapped to rts-1.0 wired-in package haskell98 mapped to haskell98-1.0 wired-in package template-haskell mapped to template-haskell-2.0 Hsc static flags: -static *** Chasing dependencies: Chasing modules from: hello.hs Created temporary directory: /tmp/ghc25062_0 *** Haskell pre-processor: convert.sh hello.hs hello.hs /tmp/ghc25062_0/ghc25062_0.hspp Stable obj: [] Stable BCO: [] compile: input file /tmp/ghc25062_0/ghc25062_0.hspp *** Checking old interface for main:Main: [1 of 1] Compiling Main ( hello.hs, hello.o ) *** Parser: *** Renamer/typechecker: *** Desugar: Result size = 10 *** Simplify: Result size = 8 *** Tidy Core: Result size = 8 *** CorePrep: Result size = 10 *** Stg2Stg: *** CodeGen: *** CodeOutput: *** C Compiler: gcc -x c /tmp/ghc25062_0/ghc25062_0.hc -o /tmp/ghc25062_0/ghc25062_0.raw_s -mcpu=v9 -w -fno-strict-aliasing -v -S -Wimplicit -O -D__GLASGOW_HASKELL__=606 -DUSE_SPLIT_MARKERS -I . -I /usr/local/pub-bkb/ghc/ghc-6.6/lib/ghc-6.6/include Using built-in specs. Target: sparc-sun-solaris2.10 Configured with: ../gcc-4.0.3/configure --prefix=/usr/local/lang -program-suffix=_4.0.3_s10 --with-gnu-as --with-as=/usr/local/bin/gnu-as --with-gnu-ld --with-ld=/usr/local/bin/gnu-ld --enable-version-specific-runtime-libs --enable-languages=c,c++ Thread model: posix gcc version 4.0.3 /export/local/mirror/sparc-solaris/lang/bin/../libexec/gcc/sparc-sun-solaris2.10/4.0.3/cc1 -quiet -v -I . -I /usr/local/pub-bkb/ghc/ghc-6.6/lib/ghc-6.6/include -iprefix /export/local/mirror/sparc-solaris/lang/bin/../lib/gcc/sparc-sun-solaris2.10/4.0.3/ -D__sparcv8 -D__GLASGOW_HASKELL__=606 -DUSE_SPLIT_MARKERS /tmp/ghc25062_0/ghc25062_0.hc -quiet -dumpbase ghc25062_0.hc -mcpu=v9 -auxbase-strip /tmp/ghc25062_0/ghc25062_0.raw_s -O -Wimplicit -w -version -fno-strict-aliasing -o /tmp/ghc25062_0/ghc25062_0.raw_s ignoring nonexistent directory "/export/local/mirror/sparc-solaris/lang/bin/../lib/gcc/sparc-sun-solaris2.10/4.0.3/../../../../sparc-sun-solaris2.10/include" ignoring duplicate directory "/usr/local/lang/lib/gcc/sparc-sun-solaris2.10/4.0.3/include" ignoring nonexistent directory "/usr/local/lang/lib/gcc/sparc-sun-solaris2.10/4.0.3/../../../../sparc-sun-solaris2.10/include" #include "..." search starts here: #include <...> search starts here: . /usr/local/pub-bkb/ghc/ghc-6.6/lib/ghc-6.6/include /export/local/mirror/sparc-solaris/lang/bin/../lib/gcc/sparc-sun-solaris2.10/4.0.3/include /usr/local/include /usr/local/lang/include /usr/include End of search list. GNU C version 4.0.3 (sparc-sun-solaris2.10) compiled by GNU C version 4.0.3. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 *** Mangler: /usr/local/pub-bkb/ghc/ghc-6.6/lib/ghc-6.6/ghc-asm /tmp/ghc25062_0/ghc25062_0.raw_s /tmp/ghc25062_0/ghc25062_0.split_s *** Splitter: /usr/local/pub-bkb/ghc/ghc-6.6/lib/ghc-6.6/ghc-split /tmp/ghc25062_0/ghc25062_0.split_s /tmp/ghc25062_0/ghc25062_0.split /tmp/ghc25062_0/ghc25062_0.split *** Assembler: gcc -c -o hello_split/hello__1.o /tmp/ghc25062_0/ghc25062_0.split__1.s /tmp/ghc25062_0/ghc25062_0.split__1.s: Assembler messages: /tmp/ghc25062_0/ghc25062_0.split__1.s:30:0: Error: Architecture mismatch on "blu,pn %icc,.LL2". /tmp/ghc25062_0/ghc25062_0.split__1.s:30:0: (Requires v9|v9a|v9b; requested architecture is v8.) /tmp/ghc25062_0/ghc25062_0.split__1.s:34:0: Error: Architecture mismatch on "bgu,pt %icc,.LL2". /tmp/ghc25062_0/ghc25062_0.split__1.s:34:0: (Requires v9|v9a|v9b; requested architecture is v8.) /tmp/ghc25062_0/ghc25062_0.split__1.s:63:0: Error: Architecture mismatch on "return". /tmp/ghc25062_0/ghc25062_0.split__1.s:63:0: (Requires v9|v9a|v9b; requested architecture is v8.) *** Deleting temp files: Deleting: /tmp/ghc25062_0/ghc25062_0.split__4.s /tmp/ghc25062_0/ghc25062_0.split__3.s /tmp/ghc25062_0/ghc25062_0.split__2.s /tmp/ghc25062_0/ghc25062_0.split__1.s /tmp/ghc25062_0/ghc25062_0.split /tmp/ghc25062_0/ghc25062_0.split_s /tmp/ghc25062_0/ghc25062_0.raw_s /tmp/ghc25062_0/ghc25062_0.hc /tmp/ghc25062_0/ghc25062_0.hspp *** Deleting temp dirs: Deleting: /tmp/ghc25062_0
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users