[GHC] #15207: bad dwarf frame in stgRun.c when compiled with with gcc on mac and assembled by as/gcc/clang (aka apple clang assembler)

GHC ghc-devs at haskell.org
Thu May 31 17:33:02 UTC 2018


#15207: bad dwarf frame in stgRun.c when compiled with with gcc on mac and
assembled by as/gcc/clang (aka apple clang assembler)
-------------------------------------+-------------------------------------
        Reporter:  carter            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Runtime System    |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  MacOS X           |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by carter):

 * cc: niteria (removed)


Old description:

> for current master, if i build on a mac / OSX high sierra environment
> with CC set as any flavor of recent GCC rather than  apple clang, i get a
> failure `no open frame` when as (aka apple clang / apple llvm acting as
> the assembler) is run on the `.s` file produced by `stgRun.c`
> (`rts/StgCRun.c` to be exact)
>
> this error message seems to come from https://github.com/llvm-
> mirror/llvm/blob/da4a2839d80ac52958be0129b871beedfe90136e/lib/MC/MCStreamer.cpp#L221
>
> https://gist.github.com/cartazio/8cbfb3305e1daa4f7ffc3f6bb90a2891 has
> the gcc and clang style assembly for
> {{{
> /usr/local/bin/gcc-8 -fno-stack-protector -DTABLES_NEXT_TO_CODE
> -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header
> -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build
> -Irts/dist/build -Irts/dist/build/./autogen -fno-common -U__PIC__
> -D__PIC__ -x assembler -c
> /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc22029_0/ghc_1.s -o
> rts/dist/build/StgCRun.debug_o
> }}}
> this is example asm for the the debug way

New description:

 for current master, if i build on a mac / OSX high sierra environment with
 CC set as any flavor of recent GCC rather than  apple clang, i get a
 failure "no open frame" when as (aka apple clang / apple llvm acting as
 the assembler) is run on the .s file produced by stgRun.c (rts/StgCRun.c
 to be exact)

 this error message seems  to come from https://github.com/llvm-
 mirror/llvm/blob/da4a2839d80ac52958be0129b871beedfe90136e/lib/MC/MCStreamer.cpp#L221

 https://gist.github.com/cartazio/8cbfb3305e1daa4f7ffc3f6bb90a2891 has
 the gcc and clang style assembly for

 /usr/local/bin/gcc-8 -fno-stack-protector -DTABLES_NEXT_TO_CODE -Iincludes
 -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-
 ghcconstants/header -Irts -Irts/dist/build -Irts/dist/build
 -Irts/dist/build/./autogen -fno-common -U__PIC__ -D__PIC__ -x assembler -c
 /var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/ghc22029_0/ghc_1.s -o
 rts/dist/build/StgCRun.debug_o

 this is example asm for the the debug way

--

Comment:

 or if asm with dwarf as emitted by GCC doesn't play nice with
 (apple?)clang's assembler (which is the system assembler on OSX high
 sierra)

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15207#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list