Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

iserv-bin requires a wrapper #105

Closed
angerman opened this issue Jan 5, 2016 · 10 comments
Closed

iserv-bin requires a wrapper #105

angerman opened this issue Jan 5, 2016 · 10 comments

Comments

@angerman
Copy link
Collaborator

angerman commented Jan 5, 2016

See #102. This is here, so we don't forget to implement the wrapper.

@angerman
Copy link
Collaborator Author

And it also requires to build p and dyn versions.

@snowleopard
Copy link
Owner

Just for the record: I think profiling might work already (it's currently disabled not to slow down test builds), and dynamic is handled in this unbelievably old issue: #4.

@angerman
Copy link
Collaborator Author

Ohh, what I meant was that the ghc.mk for iserv does some really weird stuff. It basically add's iserv in dynamic and profiling to the targets. The ghc.mk looks like this:

# -----------------------------------------------------------------------------
#
# (c) 2009-2012 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
#      http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
#      http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------

iserv_USES_CABAL = YES
iserv_PACKAGE = iserv-bin

ifeq "$(GhcDebugged)" "YES"
iserv_stage2_MORE_HC_OPTS += -debug
iserv_stage2_p_MORE_HC_OPTS += -debug
iserv_stage2_dyn_MORE_HC_OPTS += -debug
endif

iserv_stage2_MORE_HC_OPTS += -threaded
iserv_stage2_p_MORE_HC_OPTS += -threaded
iserv_stage2_dyn_MORE_HC_OPTS += -threaded

# Override the default way, because we want a specific version of this
# program for each way.  Note that it's important to do this even for
# the vanilla version, otherwise we get a dynamic executable when
# DYNAMIC_GHC_PROGRAMS=YES.
iserv_stage2_PROGRAM_WAY = v
iserv_stage2_p_PROGRAM_WAY = p
iserv_stage2_dyn_PROGRAM_WAY = dyn

iserv_stage2_PROGNAME = ghc-iserv
iserv_stage2_p_PROGNAME = ghc-iserv-prof
iserv_stage2_dyn_PROGNAME = ghc-iserv-dyn

iserv_stage2_MORE_HC_OPTS += -no-hs-main
iserv_stage2_p_MORE_HC_OPTS += -no-hs-main
iserv_stage2_dyn_MORE_HC_OPTS += -no-hs-main

iserv_stage2_INSTALL = YES
iserv_stage2_p_INSTALL = YES
iserv_stage2_dyn_INSTALL = YES

# Install in $(libexec), not in $(bindir)
iserv_stage2_TOPDIR = YES
iserv_stage2_p_TOPDIR = YES
iserv_stage2_dyn_TOPDIR = YES

iserv_stage2_INSTALL_INPLACE = YES
iserv_stage2_p_INSTALL_INPLACE = YES
iserv_stage2_dyn_INSTALL_INPLACE = YES

$(eval $(call build-prog,iserv,stage2,1))

ifneq "$(findstring p, $(GhcLibWays))" ""
$(eval $(call build-prog,iserv,stage2_p,1))
endif

ifneq "$(findstring dyn, $(GhcLibWays))" ""
$(eval $(call build-prog,iserv,stage2_dyn,1))
endif

all_ghc_stage2 : $(iserv-stage2_INPLACE)
all_ghc_stage2 : $(iserv-stage2_p_INPLACE)
all_ghc_stage2 : $(iserv-stage2_dyn_INPLACE)

@snowleopard
Copy link
Owner

Interesting! I think to implement all iserv wrappers we still require profiling and dynamic ways to work, right?

@angerman
Copy link
Collaborator Author

@snowleopard that's how I would understand this. We are forcefully building iserv with profiling and dynamic way.

@izgzhen
Copy link
Collaborator

izgzhen commented Jul 16, 2017

What is the story of iserv-bin? It looks relevant to RemoteGHCi, but I can't find much information regarding how to use it, and neither can I build it in a standard Make system.

@izgzhen
Copy link
Collaborator

izgzhen commented Jul 16, 2017

It looks like we need dynamic to use this, which we already have, so I am thinking about testing it.

@snowleopard
Copy link
Owner

@izgzhen Yes, please go ahead. Hopefully we can now resolve this.

@izgzhen
Copy link
Collaborator

izgzhen commented Jul 17, 2017

These are what might be relevant in inplace/lib/bin in a recent Make built GHC:

ghc-iserv
ghc-iserv.bin
ghc-iserv-dyn
ghc-iserv-dyn.bin

Nothing like iserv-bin is found in inplace/bin.

After checking out https://github.com/ghc/ghc/blob/master/iserv/ghc.mk, it looks like they don't build a wrapper at all.

@izgzhen
Copy link
Collaborator

izgzhen commented Jul 17, 2017

Nope, the ones not ending with .bin are wrappers. I previously assumed that everything in lib/bin are binaries...

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants