[GHC] #8748: ghc-7.8-rc1/HEAD: --enable-unregisterised fails to build: threaded RTS, profiling mode
GHC
ghc-devs at haskell.org
Sat Feb 8 09:11:18 UTC 2014
#8748: ghc-7.8-rc1/HEAD: --enable-unregisterised fails to build: threaded RTS,
profiling mode
------------------------------------+-------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.8.1
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
Steps to reproduce:
{{{
0. Pick any platform. I've performed it on amd64, but seen real failures
on unreg arches: ia64, ppc64
1. pull sources
2. ./boot
3. ./configure --enable-unregisterised
# right, no build.mk
4. make
}}}
Here we see 2 kinds of bugs at once:
1. threaded RTS misses '''-DNOSMP''' define. Looks like ghc always needs
to carry that define (what is the mechanism for it BTW?), it
doesn't:
{{{
HC [stage 1] compiler/stage2/build/ExtsCompat46.o
In file included from /home/slyfox/dev/git/ghc/includes/Stg.h:232:0:
0,
from /tmp/ghc6527_0/ghc6527_2.hc:3:
/home/slyfox/dev/git/ghc/includes/stg/Regs.h:443:2:
error: #error BaseReg must be in a register for THREADED_RTS
#error BaseReg must be in a register for THREADED_RTS
^
}}}
The implicit declarations are scary as well:
{{{
/tmp/ghc1420_0/ghc1420_2.hc: In function 'c7WZ_entry':
/tmp/ghc1420_0/ghc1420_2.hc:43:1:
warning: implicit declaration of function 'hs_bswap64' [-Wimplicit-
function-declaration]
_c7X5 = hs_bswap64(*((P_)(R1.w+7)));
^
}}}
I naively tried naive approach:
{{{
mk/config.mk.in:
+# Unregisterised build calls c compiler for every
+# .hs file. thus pass it everywhere.
+ifneq "$(GhcWithSMP)" "YES"
+SRC_HC_OPTS += -optc-DNOSMP
+endif
}}}
but got stage2, which always '''SIGSEGV'''s.
Thus it's either incorrect fix or '''UNREG''' is broken.
2. profiling builds (all files with -prof) miss '''enterFunCCS'''
declaration:
{{{
/tmp/ghc7183_0/ghc7183_1.p_hc: In function 's6Y_entry':
/tmp/ghc7183_0/ghc7183_1.p_hc:79:40:
error: 'enterFunCCS' undeclared (first use in this function)
ghcFunPtr = ((void (*)(void *, void *))enterFunCCS);
^
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8748>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list