Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reinier Maas
GHC
Commits
4dd52f2a
Commit
4dd52f2a
authored
13 years ago
by
Ian Lynagh
Browse files
Options
Downloads
Patches
Plain Diff
On non-Windows, go back to using the libffi dynlib for the dyn way
parent
ceef80b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libffi/ghc.mk
+26
-5
26 additions, 5 deletions
libffi/ghc.mk
rts/ghc.mk
+17
-10
17 additions, 10 deletions
rts/ghc.mk
with
43 additions
and
15 deletions
libffi/ghc.mk
+
26
−
5
View file @
4dd52f2a
...
...
@@ -11,15 +11,37 @@
# -----------------------------------------------------------------------------
libffi_STAMP_CONFIGURE
=
libffi/stamp.ffi.configure
libffi_STAMP_BUILD
=
libffi/stamp.ffi.build
libffi_STAMP_INSTALL
=
libffi/stamp.ffi.install
libffi_STAMP_STATIC_CONFIGURE
=
libffi/stamp.ffi.static.configure
libffi_STAMP_STATIC_BUILD
=
libffi/stamp.ffi.static.build
libffi_STAMP_STATIC_INSTALL
=
libffi/stamp.ffi.static.install
libffi_STAMP_STATIC_SHARED_CONFIGURE
=
libffi/stamp.ffi.static-shared.configure
libffi_STAMP_STATIC_SHARED_BUILD
=
libffi/stamp.ffi.static-shared.build
libffi_STAMP_STATIC_SHARED_INSTALL
=
libffi/stamp.ffi.static-shared.install
ifeq
"$(BuildSharedLibs)" "YES"
libffi_STAMP_CONFIGURE
=
$(
libffi_STAMP_STATIC_SHARED_CONFIGURE
)
libffi_STAMP_BUILD
=
$(
libffi_STAMP_STATIC_SHARED_BUILD
)
libffi_STAMP_INSTALL
=
$(
libffi_STAMP_STATIC_SHARED_INSTALL
)
libffi_EnableShared
=
yes
else
libffi_STAMP_CONFIGURE
=
$(
libffi_STAMP_STATIC_CONFIGURE
)
libffi_STAMP_BUILD
=
$(
libffi_STAMP_STATIC_BUILD
)
libffi_STAMP_INSTALL
=
$(
libffi_STAMP_STATIC_INSTALL
)
libffi_EnableShared
=
no
endif
libffi_STATIC_LIB
=
libffi/build/inst/lib/libffi.a
ffi_HEADER
=
rts/dist/build/ffi.h
ifneq
"$(BINDIST)" "YES"
$(libffi_STAMP_CONFIGURE)
:
"
$(
RM
)
"
$(
RM_OPTS
)
$(
libffi_STAMP_STATIC_CONFIGURE
)
"
$(
RM
)
"
$(
RM_OPTS
)
$(
libffi_STAMP_STATIC_BUILD
)
"
$(
RM
)
"
$(
RM_OPTS
)
$(
libffi_STAMP_STATIC_INSTALL
)
"
$(
RM
)
"
$(
RM_OPTS
)
$(
libffi_STAMP_STATIC_SHARED_CONFIGURE
)
"
$(
RM
)
"
$(
RM_OPTS
)
$(
libffi_STAMP_STATIC_SHARED_BUILD
)
"
$(
RM
)
"
$(
RM_OPTS
)
$(
libffi_STAMP_STATIC_SHARED_INSTALL
)
"
$(
RM
)
"
$(
RM_OPTS_REC
)
$(
LIBFFI_DIR
)
libffi/build
cat
ghc-tarballs/libffi/libffi
*
.tar.gz |
$(
GZIP_CMD
)
-d
|
{
cd
libffi
&&
$(
TAR_CMD
)
-xf
-
;
}
mv
libffi/libffi-
*
libffi/build
...
...
@@ -43,9 +65,8 @@ $(libffi_STAMP_CONFIGURE):
LDFLAGS
=
"
$(
SRC_LD_OPTS
)
$(
CONF_GCC_LINKER_OPTS_STAGE1
)
-w"
\
"
$(
SHELL
)
"
configure
\
--prefix
=
$(
TOP
)
/libffi/build/inst
\
--with-pic
\
--enable-static
=
yes
\
--enable-shared
=
no
\
--enable-shared
=
$(
libffi_EnableShared
)
\
--host
=
$(
HOSTPLATFORM
)
--build
=
$(
BUILDPLATFORM
)
# wc on OS X has spaces in its output, which libffi's Makefile
...
...
This diff is collapsed.
Click to expand it.
rts/ghc.mk
+
17
−
10
View file @
4dd52f2a
...
...
@@ -21,7 +21,7 @@ rts_WAYS = $(GhcLibWays) $(filter-out $(GhcLibWays),$(GhcRTSWays))
rts_dist_WAYS
=
$(
rts_WAYS
)
ALL_RTS_LIBS
=
rts/dist/build/libHSrtsmain.a
\
$(
foreach way,
$(
rts_WAYS
)
,rts/dist/build/libHSrts
$($(
way
)
_libsuf
))
$(
foreach way,
$(
rts_WAYS
)
,rts/dist/build/libHSrts
$($(
way
)
_libsuf
))
all_rts
:
$(ALL_RTS_LIBS)
# -----------------------------------------------------------------------------
...
...
@@ -119,6 +119,18 @@ rts/dist/build/win32/libHSffi.dll.a : rts/dist/build/win32/libHSffi.def
endif
endif
ifneq
"$(BINDIST)" "YES"
rts_ffi_objs_stamp
=
rts/dist/ffi/stamp
rts_ffi_objs
=
rts/dist/ffi/
*
.o
$(rts_ffi_objs_stamp)
:
$(libffi_STATIC_LIB) | $$(dir $$@)/.
cd
rts/dist/ffi
&&
$(
AR
)
x ../../../
$(
libffi_STATIC_LIB
)
touch
$@
# This is a little hacky. We don't know the SO version, so we only
# depend on libffi.so, but copy libffi.so*
rts/dist/build/libffi$(soext)
:
libffi/build/inst/lib/libffi$(soext)
cp
libffi/build/inst/lib/libffi
$(
soext
)
*
rts/dist/build
endif
#-----------------------------------------------------------------------------
# Building one way
...
...
@@ -177,14 +189,14 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
"
$$(
rts_dist_HC
)
"
-package-name
rts
-shared
-dynamic
-dynload
deploy
\
-no-auto-link-packages
`
cat
rts/libs.depend
`
$$(
rts_
$1_OBJS
)
$$(
ALL_RTS_DEF_LIBS
)
-o
$$
@
else
$$(rts_$1_LIB)
:
$$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
$$(rts_ffi_objs_stamp
)
$$(rts_$1_LIB)
:
$$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
rts/dist/build/libffi$$(soext
)
"
$$(
RM
)
"
$$(
RM_OPTS
)
$$
@
"
$$(
rts_dist_HC
)
"
-package-name
rts
-shared
-dynamic
-dynload
deploy
\
-no-auto-link-packages
`
cat
rts/libs.depend
`
$$(
rts_ffi_objs
)
$$(
rts_
$1_OBJS
)
\
-no-auto-link-packages
-Lrts
/dist/build
-lffi
`
cat
rts/libs.depend
`
$$(
rts_
$1_OBJS
)
\
$$(
rts_
$1_DTRACE_OBJS
)
-o
$$
@
ifeq
"$$(darwin_HOST_OS)" "1"
# Ensure library's install name is correct before anyone links with it.
install_name_tool
-id
$(
ghclibdir
)
/
$$(
rts_
$1_LIB_NAME
)
$$
@
install_name_tool
-id
$
$(
ghclibdir
)
/
$$(
rts_
$1_LIB_NAME
)
$$
@
endif
endif
else
...
...
@@ -198,12 +210,6 @@ endif
endef
rts_ffi_objs_stamp
=
rts/dist/ffi/stamp
rts_ffi_objs
=
rts/dist/ffi/
*
.o
$(rts_ffi_objs_stamp)
:
$(libffi_STATIC_LIB) | $$(dir $$@)/.
cd
rts/dist/ffi
&&
$(
AR
)
x ../../../
$(
libffi_STATIC_LIB
)
touch
$@
# And expand the above for each way:
$(
foreach
way,
$(
rts_WAYS
)
,
$(
eval
$(
call build-rts-way,
$(
way
))))
...
...
@@ -519,6 +525,7 @@ endif
# installing
INSTALL_LIBS
+=
$(
ALL_RTS_LIBS
)
INSTALL_LIBS
+=
$(
wildcard rts/dist/build/libffi
$(
soext
)
*
)
# -----------------------------------------------------------------------------
# cleaning
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment