Ticket #2308 (closed bug: worksforme)

Opened 5 years ago

Last modified 5 years ago

ghc doesn't honor -keep-tmp-files

Reported by: nr Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.6.1
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

ghc 6.6.1 doesn't keep any temporary files when given the -keep-tmp-files flag. The -keep-s-file flag appears to work.

Change History

Changed 5 years ago by simonmar

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to worksforme

Works for me:

~/scratch > ghc -keep-tmp-files -c hello.hs -v -cpp
Glasgow Haskell Compiler, Version 6.8.2, for Haskell 98, stage 3 booted by GHC version 6.8.1
Using package config file: /home/simonmar/fp/lib/x86_64-unknown-linux/ghc-6.8.2/package.conf
Using package config file: /home/simonmar/.ghc/x86_64-linux-6.8.2/package.conf
hiding package Cabal-1.2.3.0 to avoid conflict with later version Cabal-1.3.3
wired-in package base mapped to base-3.0.1.0
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0.1.0
wired-in package template-haskell mapped to template-haskell-2.2.0.0
wired-in package ndp not found.
Hsc static flags: -static
Created temporary directory: /tmp/ghc20258_0
*** C pre-processor:
gcc -E -undef -traditional -v -I /home/simonmar/fp/lib/x86_64-unknown-linux/ghc-6.8.2/lib/base-3.0.1.0/include -I /home/simonmar/fp/lib/x86_64-unknown-linux/ghc-6.8.2/include -D__HASKELL1__=5 -D__GLASGOW_HASKELL__=608 -D__HASKELL98__ -D__CONCURRENT_HASKELL__ -Dlinux_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -x c hello.hs -o /tmp/ghc20258_0/ghc20258_0.hscpp
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.1/cc1 -E -traditional-cpp -quiet -v -I /home/simonmar/fp/lib/x86_64-unknown-linux/ghc-6.8.2/lib/base-3.0.1.0/include -I /home/simonmar/fp/lib/x86_64-unknown-linux/ghc-6.8.2/include -D__HASKELL1__=5 -D__GLASGOW_HASKELL__=608 -D__HASKELL98__ -D__CONCURRENT_HASKELL__ -Dlinux_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1 hello.hs -o /tmp/ghc20258_0/ghc20258_0.hscpp -mtune=generic -undef
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/simonmar/fp/lib/x86_64-unknown-linux/ghc-6.8.2/lib/base-3.0.1.0/include
 /home/simonmar/fp/lib/x86_64-unknown-linux/ghc-6.8.2/include
 /usr/local/include
 /usr/lib/gcc/x86_64-redhat-linux/4.1.1/include
 /usr/include
End of search list.
*** Checking old interface for main:Main:
*** Parser:
*** Renamer/typechecker:
*** Desugar:
    Result size = 10
*** Simplify:
    Result size = 8
    Result size = 8
*** Tidy Core:
    Result size = 8
*** CorePrep:
    Result size = 10
*** Stg2Stg:
*** CodeGen:
*** CodeOutput:
*** Assembler:
gcc -I. -c /tmp/ghc20258_0/ghc20258_0.s -o hello.o
~/scratch > ls /tmp/ghc20258_0 
ghc20258_0.hscpp  ghc20258_0.s

Changed 5 years ago by igloo

It doesn't work in 6.6.1, but that branch is long-dead, I'm afraid.

Note: See TracTickets for help on using tickets.