From c111317d3209321e5f2ba43304018b132b174415 Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Tue, 19 Jun 2007 14:29:31 +0000 Subject: [PATCH] Also make proper references when not using fPIC but linking against dynamic libs --- compiler/nativeGen/PositionIndependentCode.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ] -- 1.7.10.4