| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Key changes:
* Always build as if BIN_DIST is 1. BIN_DIST is thus removed.
* Libraries are configured with prefix set to $$topdir rather than $(prefix)
|
|
|
|
|
|
|
|
|
|
| |
OS X
The official options to use for building a dylib on Mac OS X are now
-undefined dynamic_lookup -single_module -Wl,-macosx_version_min -Wl,10.3
... which should work on all arches (10.3 or later).
MERGE TO STABLE
|
|
|
|
|
|
|
|
|
|
| |
Supporting x86_64-apple-darwin in the NCG basically boils down to supporting
position-independent code in the NCG.
PIC code works almost exactly the same as on x86_64-linux, while position-dependent
code is not supported at all.
This patch implements -fPIC for x86_64-linux, too, but that is untested.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now we can only manage to add a source code link for the module,
but that's better than nothing.
I had to put the list of core packages in a Makefile variable,
$(CorePackages), so we'll have to be careful to keep this up to date.
(I could have slurped it out of libraries/core-packages with $(shell),
but that's ugly and really slow on Windows).
There are a couple of new tweakables: CorePackageSourceURL and
ExtraPackageSourceURL in config.mk.in, set these to the appropriate
patterns for generating source links.
(when we merge this patch onto the HEAD we'll have to tweak these
settings).
Unfortunately it still doesn't work for all the modules, because
modules compiled without -cpp don't get any #line directives. More
hackery required...
|
| |
|
|
|
|
|
|
|
|
|
| |
We need the #line directives left in, so that Haddock can figure out
what the name of the original source file was called, which is
necessary for generating source links. You probably now need an
updated Haddock to generate HTML from the libraries, but a release
will be forthcoming shortly.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the other users of the fptools build system have migrated to
Cabal, and with the move to darcs we can now flatten the source tree
without losing history, so here goes.
The main change is that the ghc/ subdir is gone, and most of what it
contained is now at the top level. The build system now makes no
pretense at being multi-project, it is just the GHC build system.
No doubt this will break many things, and there will be a period of
instability while we fix the dependencies. A straightforward build
should work, but I haven't yet fixed binary/source distributions.
Changes to the Building Guide will follow, too.
|
| |
|
|
|
|
| |
Fixed install-docs
|
|
|
|
|
| |
Small fixes that adds chm and HxS targets to the build system. The former is used
to build all documentation in HtmlHelp format while the letter uses HtmlHelp2 format.
|
|
|
|
| |
LIBRARY, GHCI_LIBRARY: permit settings of these to be overridden in Makefiles; Merge to STABLE
|
|
|
|
| |
Simplify the -ignore-package/-package-name logic a bit
|
|
|
|
| |
Old GHCs used -package-name instead of -ignore-package.
|
|
|
|
|
|
|
|
| |
SRC_HC_OPTS: only add -ignore-package if supported by underlying GHC.
(reqd to be able to compile greencard/lib, hdirect/(com)lib with
non-cutting edge GHCen.)
Merge to STABLE.
|
|
|
|
|
|
|
| |
Install dynamic libraries even when they're not part of a package,
but honor NO_INSTALL_LIBRARY instead.
MERGE TO STABLE
|
|
|
|
|
| |
Fix library installation: we now install libraries *unless*
NO_INSTALL_LIBRARY=YES.
|
|
|
|
|
| |
oops, fix building of GHCi libraries. We only want to avoid the
*install* if this isn't a package.
|
|
|
|
|
| |
Only build GHCi libs, install libs, and make Haddock docs for packages
(not ordinary libraries, like libghccompat.a).
|
|
|
|
|
| |
In the installed package.conf, all includeDirs were empty, so no GHC/package
headers were found. This commit fixes that (in a hopefully correct way).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fill in the haddock-interfaces and haddock-html fields in the
package.conf files.
To do this I had to make some changes:
- haddock-interfaces requires the value of $(datadir). We can't
just plug this in, because $(datadir) might change at install-time
(eg. a Windows installer can be placed anywhere, as can a Unix
binary .tar.gz distribution). The current trick is for the
compiler to splice in the value of $libdir in package.conf at
runtime. So we could extend this mechanism and tell the compiler
the value of $datadir via a command-line option, but that seems
ugly.
On Windows, $datadir==$libdir, so we don't need any changes:
package.conf still uses $libdir, and a Windows installation is
independent of its absolute location. Even 'make install' on
Windows should have this property.
On Unix:
- for 'make install' and in-place execution, we just use
absolute paths in package.conf
- for a binary dist, we generate a package.conf that refers
to $libdir and $datadir, and splice in the values at
install-time (distrib/Makefile-bin.in).
- Also, I renamed $libdir to $topdir to more closely reflect its
actual meaning. This is somewhat malicious in that it will flush
out all those clients using $libdir when they really shouldn't
be :-)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dynamic Linking, Part 2:
Hack the Makefiles to build dynamic libraries.
This allows you to actually use dynamic libraries to greatly reduce binary
sizes on Darwin/PowerPC and on powerpc64-linux (for now).
To use this, add the following to your build.mk
SplitObjs=NO
GhcBuildDylibs=YES
GhcStage2HcOpts=-dynamic
GhcLibHcOpts+=-fPIC -dynamic
GhcRtsHcOpts+=-fPIC -dynamic
GHC_CC_OPTS+=-fPIC
(You can leave out the last three lines on powerpc64-linux).
Then, to compile a program using dynamic libraries, pass the -dynamic option to GHC.
To make GHCi use the dynamic libraries instead of .o files, just delete the HS*.o files.
The dynamic library files are named libHSfoo_dyn.dylib or libHSfoo_dyn.so.
Note that the dynamic and static libraries are build from the same .o files,
but we really want to build the static libraries with SplitObjs and without
-fPIC -dynamic to achieve better code size and performance.
ghc/compiler/ghci/Linker.lhs:
When looking for a library, look for HSfoo.o first (as before),
then look for libHSfoo_dyn.[so/dylib] before looking for
libHSfoo.[so/dylib].
ghc/compiler/main/DriverPipeline.hs:
Main.dll_o and PrelMain.dll_o are dead, at least for now.
ghc/compiler/main/Packages.lhs:
When -dynamic is specified, add "_dyn" to all libraries specified in
hs-libraries (not to the extra-libs).
ghc/lib/compat/Makefile:
Never build libghccompat as a dynamic lib.
mk/package.mk:
if GhcBuildDylibs is set to YES, build dynamic libraries.
mk/target.mk:
When installing .dylibs (Darwin only), update the install_name to point
to the final location.
(Somebody please read Apple's documentation on what install_names are,
and then comment on whether this is a useful feature or whether it should
be done the "normal" unix way).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Further integration with the new package story. GHC now supports
pretty much everything in the package proposal.
- GHC now works in terms of PackageIds (<pkg>-<version>) rather than
just package names. You can still specify package names without
versions on the command line, as long as the name is unambiguous.
- GHC understands hidden/exposed modules in a package, and will refuse
to import a hidden module. Also, the hidden/eposed status of packages
is taken into account.
- I had to remove the old package syntax from ghc-pkg, backwards
compatibility isn't really practical.
- All the package.conf.in files have been rewritten in the new syntax,
and contain a complete list of modules in the package. I've set all
the versions to 1.0 for now - please check your package(s) and fix the
version number & other info appropriately.
- New options:
-hide-package P sets the expose flag on package P to False
-ignore-package P unregisters P for this compilation
For comparison, -package P sets the expose flag on package P
to True, and also causes P to be linked in eagerly.
-package-name is no longer officially supported. Unofficially, it's
a synonym for -ignore-package, which has more or less the same effect
as -package-name used to.
Note that a package may be hidden and yet still be linked into
the program, by virtue of being a dependency of some other package.
To completely remove a package from the compiler's internal database,
use -ignore-package.
The compiler will complain if any two packages in the
transitive closure of exposed packages contain the same
module.
You *must* use -ignore-package P when compiling modules for
package P, if package P (or an older version of P) is already
registered. The compiler will helpfully complain if you don't.
The fptools build system does this.
- Note: the Cabal library won't work yet. It still thinks GHC uses
the old package config syntax.
Internal changes/cleanups:
- The ModuleName type has gone away. Modules are now just (a
newtype of) FastStrings, and don't contain any package information.
All the package-related knowledge is in DynFlags, which is passed
down to where it is needed.
- DynFlags manipulation has been cleaned up somewhat: there are no
global variables holding DynFlags any more, instead the DynFlags
are passed around properly.
- There are a few less global variables in GHC. Lots more are
scheduled for removal.
- -i is now a dynamic flag, as are all the package-related flags (but
using them in {-# OPTIONS #-} is Officially Not Recommended).
- make -j now appears to work under fptools/libraries/. Probably
wouldn't take much to get it working for a whole build.
|
|
|
|
|
|
|
| |
Make the X11 and HGL packages more independent, and pass configuration
parameters to package.conf.in via header files.
Also removed residual traces of OpenGL/GLUT/OpenAL from mk/config.mk.in
|
|
|
|
| |
standalone packages: eliminate the extraneous final comma on PACKAGE_DEPS
|
|
|
|
|
|
|
|
|
|
|
| |
Deal with Apple's broken cpp 3.3 (you know, the one that inserts useless
#pragma lines into it's output) by filtering it's output through
grep -v.
This shouldn't be a problem for other platforms, and it's much simpler
than to make the parsers for ghc-pkg, genprimopcode and happy ignore
those lines.
MERGE TO STABLE
|
|
|
|
| |
Added the new-born haddock.js to the build process and the documentation.
|
|
|
|
| |
only set WAYS if it isn't already set
|
|
|
|
|
| |
Fixed ingenious sed magic for package configuration files.
Do we really need any sed mangling with gcc's -P option???
|
|
|
|
| |
Some tweaks for standalone packages
|
|
|
|
|
|
| |
Interesting - I'm not sure why the .lhs -> .raw-hs rule had an
explicit -cpp option in it, but the .hs -> .raw-hs rule didn't.
Remove it.
|
|
|
|
| |
Use gcc's -P option to avoid CPP #line droppings in the .hs -> .raw-hs rule.
|
|
|
|
|
|
| |
Patch from Andres Loeh: Generate the *.raw-hs files with the inplace
GHC, otherwise one runs into a "fixed-point" problem where only
documentation known to the bootstrapping GHC could be built.
|
|
|
|
|
|
|
|
| |
Convert to use Haddock 0.6's combined contents/index functionality for
the hierarchical library docs.
HEADS UP: you need Haddock 0.6 in order to run 'make html' in
fptools/libraries now.
|
|
|
|
| |
All changes in this commit are standalone changes only but could usefully be used inplace as well: Don't store package.conf.installed; use a pipe to avoid problems from using stale package.confs. Also, use PACKAGE, PACKAGE_DEPS, LIBRARY and LIBDIR settings from Makefile when installing pkg. This requires some ugly sed hackery to overcome ghc-pkg not allowing trailing commas in a list: [a,b,c,]
|
|
|
|
| |
Use --force which ghc-pkg'ing standalone libs because ghc-pkg is run before the libs have actually been installed. It would be better to delay running ghc-pkg.
|
|
|
|
| |
Also clean the Haddock interface file.
|
|
|
|
|
|
|
| |
For STANDALONE_PACKAGE: Let the package configuration file refer to
$(libdir) as ${pkglibdir}. Note we can't use ${libdir} because
ghc-pkg already redefines it to point to GHC's libdir (bug or
feature?).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First hack at supporting standalone packages.
What this means is that a non-GHC fptools project which sets
$(PACKAGE) in a Makefile should do something reasonable. It works by
testing whether $(ProjectNameShort) == "ghc", and if it isn't, then:
- it turns off all the machinery that deals with installing the
package for use with the in-place compiler and a (future)
installation of GHC.
- instead, it enables a rule that installs the package using
the installed $(GHC_PKG). The configure script still needs
updating to detect this, so 'make install' won't work yet.
- $(GHC) is used instead of $(GHC_INPLACE) for compiling Haskell
code.
Apart from the detection of ghc-pkg in configure, this should be all
that's needed to get source distributions and 'make install' going.
|
|
|
|
|
|
| |
Rename per-package configuration files from $(PACKAGE).conf.* to
package.conf.*, making them easier to find (since each package is
in a separate directory anyway).
|
|
|
|
|
|
|
|
|
|
| |
Now that we have auto packages, it makes sense to keep all the
interfaces for hierarchical libraries in the same directory tree. So
now, instead of putting interfaces for package P in $libdir/imports/P,
we put them all in $libdir/imports.
Interfaces for old non-auto non-hierarchical packages now go in
$libdir/hslibs-imports/P for package P.
|
|
|
|
|
|
| |
Booting from HC fixes (slightly tweaked for the HEAD)
Submitted by: Urban Boquist <boquist@crt.se>
|
|
|
|
| |
Fix to previous commit
|
|
|
|
| |
Clean up properly after generating Haddock docs.
|
|
|
|
| |
Also install <package>.haddock when we install the docs.
|