Ticket #3072: ghc-7.7.20121101-corelibs-rpath.patch

File ghc-7.7.20121101-corelibs-rpath.patch, 1.5 KB (added by markwright, 18 months ago)

set RPATH using $ORIGIN in ghc core libs for ghc-7.7.20121101

  • rules/build-package.mk

    old new  
    104104endif 
    105105endif 
    106106 
     107ifneq "$3" "0" 
     108ifeq "$$(BuildSharedLibs)" "YES" 
     109ifeq "$$(TargetOS_CPP)" "linux" 
     110$1_$2_GHC_LD_OPTS = \ 
     111    -fno-use-rpaths \ 
     112    $$(foreach d,$$($1_$2_TRANSITIVE_DEPS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)'$$$$ORIGIN/../$$d') 
     113endif 
     114endif 
     115endif 
     116 
    107117$(call hs-sources,$1,$2) 
    108118$(call c-sources,$1,$2) 
    109119$(call includes-sources,$1,$2) 
  • rules/build-package-way.mk

    old new  
    7070ifeq "$$(HostOS_CPP)" "mingw32" 
    7171$$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS) 
    7272        $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) $$($1_$2_$3_ALL_OBJS) \ 
    73          -shared -dynamic -dynload deploy \ 
     73         -shared -dynamic -dynload deploy $$($1_$2_GHC_LD_OPTS) \ 
    7474         $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) \ 
    7575         -no-auto-link-packages \ 
    7676         -o $$@ 
     
    8080else 
    8181$$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS) 
    8282        $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) $$($1_$2_$3_ALL_OBJS) \ 
    83          -shared -dynamic -dynload deploy \ 
     83         -shared -dynamic -dynload deploy $$($1_$2_GHC_LD_OPTS) \ 
    8484         $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) $$(addprefix -L,$$($1_$2_EXTRA_LIBDIRS)) \ 
    8585         -no-auto-link-packages \ 
    8686         -o $$@