[GHC] #8562: Builtin function __builtin___clear_cache is unavailable on GCC 4.2

GHC ghc-devs at haskell.org
Sun Nov 24 18:33:29 UTC 2013


#8562: Builtin function __builtin___clear_cache is unavailable on GCC 4.2
------------------------------+--------------------------------------------
       Reporter:  heatsink    |             Owner:  simonmar
           Type:  bug         |            Status:  new
       Priority:  normal      |         Milestone:
      Component:  Runtime     |           Version:  7.7
  System                      |  Operating System:  MacOS X
       Keywords:              |   Type of failure:  GHC doesn't work at all
   Architecture:  x86_64      |         Test Case:
  (amd64)                     |          Blocking:
     Difficulty:  Unknown     |
     Blocked By:              |
Related Tickets:  #8561       |
------------------------------+--------------------------------------------
 A recent update to the RTS uses the GCC builtin function
 `__builtin___clear_cache`.  This function was introduced in GCC 4.3.  In
 older GCCs that don't have this builtin function, it's treated as an
 undefined function, leading to a link-time error.  My system has GCC
 4.2.1, bundled with XCode 3.2.6.

 The function is called from `rts/sm/Storage.c`.

 It seems that x86 architectures don't need a cache flush, so a possible
 fix is to do nothing on GCC < 4.3.6 on x86 architectures.

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


More information about the ghc-tickets mailing list