Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 411925
Collapse All | Expand All

(-)ghc-7.4.1/ghc.mk (-1 lines)
Lines 579-585 BUILD_DIRS += \ Link Here
579
   driver/ghci \
579
   driver/ghci \
580
   driver/ghc \
580
   driver/ghc \
581
   driver/haddock \
581
   driver/haddock \
582
   libffi \
583
   includes \
582
   includes \
584
   rts
583
   rts
585
584
(-)ghc-7.4.1/rts/ghc.mk (-9 / +12 lines)
Lines 86-93 Link Here
86
ALL_RTS_DEF_LIBNAMES 	= base ghc-prim
86
ALL_RTS_DEF_LIBNAMES 	= base ghc-prim
87
ALL_RTS_DEF_LIBS	= \
87
ALL_RTS_DEF_LIBS	= \
88
	rts/dist/build/win32/libHSbase.dll.a \
88
	rts/dist/build/win32/libHSbase.dll.a \
89
	rts/dist/build/win32/libHSghc-prim.dll.a \
89
	rts/dist/build/win32/libHSghc-prim.dll.a 
90
	libffi/build/inst/lib/libffi.dll.a
91
90
92
# -- import libs for the regular Haskell libraries
91
# -- import libs for the regular Haskell libraries
93
define make-importlib-def # args $1 = lib name
92
define make-importlib-def # args $1 = lib name
Lines 172-183 Link Here
172
# Making a shared library for the RTS.
171
# Making a shared library for the RTS.
173
ifneq "$$(findstring dyn, $1)" ""
172
ifneq "$$(findstring dyn, $1)" ""
174
ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
173
ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
175
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/libffi-5.dll
174
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
176
	"$$(RM)" $$(RM_OPTS) $$@
175
	"$$(RM)" $$(RM_OPTS) $$@
177
	"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
176
	"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
178
	  -no-auto-link-packages -Lrts/dist/build -lffi-5 `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
177
	  -no-auto-link-packages -Lrts/dist/build -lffi-5 `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
179
else
178
else
180
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
179
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
181
	"$$(RM)" $$(RM_OPTS) $$@
180
	"$$(RM)" $$(RM_OPTS) $$@
182
	"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
181
	"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
183
	  -no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
182
	  -no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
Lines 188-196 Link Here
188
endif
187
endif
189
endif
188
endif
190
else
189
else
191
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
190
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
192
	"$$(RM)" $$(RM_OPTS) $$@
191
	"$$(RM)" $$(RM_OPTS) $$@
193
	echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
192
	echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
194
		$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
193
		$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
195
endif
194
endif
196
195
Lines 403-408 Link Here
403
rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
402
rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
404
rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
403
rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
405
404
405
# Use system libffi
406
libffi_include_flags:=$(shell pkg-config --cflags-only-I libffi)
407
rts/Adjustor_CC_OPTS += $(libffi_include_flags)
408
rts/Interpreter_CC_OPTS += $(libffi_include_flags)
409
rts/sm/Storage_CC_OPTS += $(libffi_include_flags)
410
406
#-----------------------------------------------------------------------------
411
#-----------------------------------------------------------------------------
407
# Add PAPI library if needed
412
# Add PAPI library if needed
408
413
Lines 504-513 Link Here
504
# installing
509
# installing
505
510
506
INSTALL_LIBS += $(ALL_RTS_LIBS)
511
INSTALL_LIBS += $(ALL_RTS_LIBS)
507
INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
508
INSTALL_LIBS += $(wildcard rts/dist/build/libffi-5.dll)
509
512
510
install: install_libffi_headers
513
install:
511
514
512
.PHONY: install_libffi_headers
515
.PHONY: install_libffi_headers
513
install_libffi_headers :
516
install_libffi_headers :
(-)ghc-7.4.1/rts/package.conf.in (-1 / +2 lines)
Lines 24-31 Link Here
24
hs-libraries:   "HSrts"
24
hs-libraries:   "HSrts"
25
25
26
extra-libraries:
26
extra-libraries:
27
				"ffi"
27
#ifdef HAVE_LIBM
28
#ifdef HAVE_LIBM
28
                		"m"		/* for ldexp() */
29
			      , "m"		/* for ldexp() */
29
#endif
30
#endif
30
#ifdef HAVE_LIBRT
31
#ifdef HAVE_LIBRT
31
			      , "rt"
32
			      , "rt"
(-)ghc-7.4.1/compiler/ghc.mk (+2 lines)
Lines 260-265 Link Here
260
260
261
compiler_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
261
compiler_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
262
compiler_CPP_OPTS += ${GhcCppOpts}
262
compiler_CPP_OPTS += ${GhcCppOpts}
263
libffi_include_flags := $(shell pkg-config --cflags-only-I libffi)
264
compiler/ghci/LibFFI_HSC2HS_OPTS += $(addprefix --cflag=,$(libffi_include_flags))
263
265
264
$(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
266
$(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
265
	$(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
267
	$(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@

Return to bug 411925