[GHC] #12796: hschooks.c #include path is incorrect

#12796: hschooks.c #include path is incorrect -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Building GHC Unknown/Multiple | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When replacing `rtsBool` with the C99 `bool` type I noticed (I think) that `ghc/hschooks.c` seems to be compiled with an incorrect include path. Namely, the `#include "Rts.h"` ends up including the `Rts.h` from the bootstrap compiler, not the stage1 compiler that we are compiling. I'm still not entirely certain that this is the case since it seems something like this should have blown up long ago, but it's late so I'm just leaving this here for now. Relevant command line: {{{ "/opt/exp/ghc/roots/8.0.1/bin/ghc" -optc-fno-stack-protector -optc-Wall -optc-Werror -optc-Ighc/stage1/build/ghc/autogen -optc-I'/opt/exp/ghc/ghc- linker/compiler/.' -optc-I'/opt/exp/ghc/ghc-linker/compiler/parser' -optc-I'/opt/exp/ghc/ghc-linker/compiler/utils' -optc-I'/opt/exp/ghc/ghc- linker/compiler/stage1' -optc-I'/opt/exp/ghc/roots/8.0.1/lib/ghc-8.0.1/process-1.4.2.0/include' -optc-I'/opt/exp/ghc/roots/8.0.1/lib/ghc-8.0.1/directory-1.2.6.2/include' -optc-I'/opt/exp/ghc/roots/8.0.1/lib/ghc-8.0.1/unix-2.7.2.0/include' -optc-I'/opt/exp/ghc/roots/8.0.1/lib/ghc-8.0.1/time-1.6.0.1/include' -optc-I'/opt/exp/ghc/roots/8.0.1/lib/ghc-8.0.1/bytestring-0.10.8.1/include' -optc-I'/opt/exp/ghc/roots/8.0.1/lib/ghc-8.0.1/base-4.9.0.0/include' -optc-I'/opt/exp/ghc/roots/8.0.1/lib/ghc-8.0.1/integer- gmp-1.0.0.1/include' -optc-I'/opt/exp/ghc/roots/8.0.1/lib/ghc-8.0.1/include' -optc-Werror =unused-but-set-variable -optc-Wno-error=inline -static -O0 -H64m -Wall -package-db libraries/bootstrapping.conf -hide-all-packages -i -ighc/. -ighc/stage1/build -Ighc/stage1/build -ighc/stage1/build/ghc/autogen -Ighc/stage1/build/ghc/autogen -optP-include -optPghc/stage1/build/ghc/autogen/cabal_macros.h -package-id array-0.5.1.1 -package-id base-4.9.0.0 -package-id bytestring-0.10.8.1 -package-id directory-1.2.6.2 -package-id filepath-1.4.1.0 -package-id ghc-8.1 -package-id ghc-boot-8.1 -package-id process-1.4.2.0 -package-id unix-2.7.2.0 -Wall -XHaskell2010 -O -DDEBUG -no-hs-main -no-user-package- db -rtsopts -c ghc/hschooks.c -o ghc/stage1/build/hschooks.o }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12796 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12796: hschooks.c #include path is incorrect
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Building GHC | Unknown/Multiple
failed | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12796: hschooks.c #include path is incorrect -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12796#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12796: hschooks.c #include path is incorrect -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): The patch in comment:1 is very wrong. In fact, we *need* to include `Rts.h` from the bootstrap compiler; afterall, the final `ghc` executable will be linked against the bootstrap RTS. This was reverted in 795f8bd460d604c792a5df8cfec937b2a74c3956. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12796#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC