From: Clemens Fruhwirth Date: Tue, 19 Jun 2007 14:29:31 +0000 (+0000) Subject: Also make proper references when not using fPIC but linking against dynamic libs X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c111317d3209321e5f2ba43304018b132b174415;p=ghc-hetmet.git Also make proper references when not using fPIC but linking against dynamic libs --- diff --git a/compiler/nativeGen/PositionIndependentCode.hs b/compiler/nativeGen/PositionIndependentCode.hs index e2db9da..4001078 100644 --- a/compiler/nativeGen/PositionIndependentCode.hs +++ b/compiler/nativeGen/PositionIndependentCode.hs @@ -131,7 +131,7 @@ cmmMakePicReference :: CLabel -> CmmExpr -- everything gets relocated at runtime cmmMakePicReference lbl - | opt_PIC && absoluteLabel lbl = CmmMachOp (MO_Add wordRep) [ + | (opt_PIC || not opt_Static) && absoluteLabel lbl = CmmMachOp (MO_Add wordRep) [ CmmReg (CmmGlobal PicBaseReg), CmmLit $ picRelative lbl ]