[project @ 2004-10-08 07:23:40 by dons]
authordons <unknown>
Fri, 8 Oct 2004 07:23:40 +0000 (07:23 +0000)
committerdons <unknown>
Fri, 8 Oct 2004 07:23:40 +0000 (07:23 +0000)
For platforms with no PIC method defined, use
LabelAccessStyle of AccessDirectly, in howToAccessLabel.
This seems to keep the ncg working on OpenBSD.

Is this the correct default, Wolfgang?

ghc/compiler/nativeGen/PositionIndependentCode.hs

index cca5df8..c3b1639 100644 (file)
@@ -243,7 +243,12 @@ howToAccessLabel isJump lbl
    | otherwise = AccessViaSymbolPtr
 
 #else
-howToAccessLabel = panic "PositionIndependentCode.howToAccessLabel"
+--
+-- all other platforms
+--
+howToAccessLabel _ _
+        | not opt_PIC = AccessDirectly
+        | otherwise   = panic "howToAccessLabel: PIC not defined for this platform"
 #endif
 
 -- -------------------------------------------------------------------