X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=patches%2Fpatch-rts_StgCRun.c;fp=patches%2Fpatch-rts_StgCRun.c;h=de223003f199cd2e1549aac0d3c3fa90e22f8cbe;hb=0f77a20d07ac42684cc03ecdea0028bea2941488;hp=0000000000000000000000000000000000000000;hpb=af9d73d52d0864b3f8b1ff223e543f9b09e291f7;p=pkgsrc-ghc.git diff --git a/patches/patch-rts_StgCRun.c b/patches/patch-rts_StgCRun.c new file mode 100644 index 0000000..de22300 --- /dev/null +++ b/patches/patch-rts_StgCRun.c @@ -0,0 +1,30 @@ +$NetBSD$ + +We have to make the visiblity of StgRun and StgReturn to "hidden" not +to trigger a bug in old binutils which results in: + + ld: rts/dist/build/RtsStartup.dyn_o: relocation R_X86_64_PC32 + against `StgRun' can not be used when making a shared object; + recompile with -fPIC + +With this workaround we can no longer override those two symbols using +LD_PRELOAD, but I think there is no reason to do so anyway. + +--- rts/StgCRun.c.orig 2012-03-21 03:41:49.000000000 +0000 ++++ rts/StgCRun.c +@@ -238,6 +238,7 @@ StgRunIsImplementedInAssembler(void) + * save callee-saves registers on behalf of the STG code. + */ + ".globl " STG_RUN "\n" ++ ".hidden " STG_RUN "\n" + STG_RUN ":\n\t" + "subq %0, %%rsp\n\t" + "movq %%rsp, %%rax\n\t" +@@ -259,6 +260,7 @@ StgRunIsImplementedInAssembler(void) + "jmp *%%rax\n\t" + + ".globl " STG_RETURN "\n" ++ ".hidden " STG_RETURN "\n" + STG_RETURN ":\n\t" + + "movq %%rbx, %%rax\n\t" /* Return value in R1 */