
#7922: adding direct *.c -> object code (*.o/so/dylib) support to compilation driver ---------------------------------+------------------------------------------ Reporter: carter | Owner: Type: feature request | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: #7904 | ---------------------------------+------------------------------------------ Comment(by carter): {{{carter code/test ยป '/usr/local/bin/ghc' '-c' '-static' '-odir' 'dist/build/test/test-tmp' '-Idist/build/test/test-tmp' '-optc- march=native' '-opta-march=native' '-optc-O3' '-optc-O2' '-package-db' 'dist/package.conf.inplace' '-package-id' 'base-4.6.0.1-2514ecbfe6573e639515d3e91d6e1f29' '-package-id' 'vector-0.10.0.1-04d4a4538e7c444d2821bb98877cda5f' 'cbits/daft.c' -opta- march=native -v3 Glasgow Haskell Compiler, Version 7.6.2, stage 2 booted by GHC version 7.4.2 Using binary package database: /usr/local/lib/ghc-7.6.2/package.conf.d/package.cache Using binary package database: /Users/carter/.ghc/x86_64-darwin-7.6.2/package.conf.d/package.cache Using package config file: dist/package.conf.inplace hiding package hashable-1.1.2.5 to avoid conflict with later version hashable-1.2.0.5 hiding package unordered-containers-0.2.3.0 to avoid conflict with later version unordered-containers-0.2.3.1 wired-in package ghc-prim mapped to ghc- prim-0.3.0.0-bd1d393903577692a5ef2aa7027b71f6 wired-in package integer-gmp mapped to integer- gmp-0.5.0.0-49dcb29a60dab14e03e6dd01e871a242 wired-in package base mapped to base-4.6.0.1-2514ecbfe6573e639515d3e91d6e1f29 wired-in package rts mapped to builtin_rts wired-in package template-haskell mapped to template- haskell-2.8.0.0-0ad833f8876aca146ee7fa686b5bc01a wired-in package dph-seq not found. wired-in package dph-par not found. Hsc static flags: -static -static Created temporary directory: /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc47284_0 *** C Compiler: 'gcc' '-m64' '-fno-stack-protector' '-m64' '-x' 'c' 'cbits/daft.c' '-o' '/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc47284_0/ghc47284_0.s' '-fno-common' '-U __PIC__' '-D__PIC__' '-Wimplicit' '-S' '-O' '-D__GLASGOW_HASKELL__=706' '-DTABLES_NEXT_TO_CODE' '-march=native' '-O3' '-O2' '-I' 'dist/build/test/test-tmp' '-I' '/Users/carter/Library/Haskell//lib/x86_64-osx- ghc-7.6.2/vector-0.10.0.1/include' '-I' '/Users/carter/Library/Haskell//lib/x86_64-osx- ghc-7.6.2/primitive-0.5.0.1/include' '-I' '/usr/local/lib/ghc-7.6.2/base-4.6.0.1/include' '-I' '/usr/local/lib/ghc-7.6.2/include' *** Assembler: 'gcc' '-m64' '-fno-stack-protector' '-m64' '-march=native' '-march=native' '-Idist/build/test/test-tmp' '-c' '/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc47284_0/ghc47284_0.s' '-o' 'dist/build/test/test-tmp/cbits/daft.o' /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc47284_0/ghc47284_0.s:6:0: no such instruction: `vmovupd (%rdi), %xmm0' /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc47284_0/ghc47284_0.s:7:0: no such instruction: `vaddpd %xmm0, %xmm0,%xmm0' /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc47284_0/ghc47284_0.s:8:0: no such instruction: `vmovupd %xmm0, (%rsi)' *** Deleting temp files: Deleting: /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc47284_0/ghc47284_0.s *** Deleting temp dirs: Deleting: /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc47284_0 }}} oddly, even though it says its using gcc to do the assembly in the verbose log, running dtrace via the instruments application confirms that its actually using the '''as ''' apple assembler. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7922#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler