| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
this is so that the stage1 compiler has proper support for Unicode.
Should fix these errors:
lexical error in string/character literal at character '\8759'
when building the stage2 compiler.
|
|
|
|
| |
Avoid building the GHCi version of this lib
|
|
|
|
|
|
| |
Never use an installed Cabal package when building GHC (except when
bootstrapping in stages 2 & 3). This insulates us from changes the
user may have made to their Cabal installation.
|
|
|
|
|
|
| |
For Windows (moved from ghc-pkg/Makefile):
HC_BOOT_LIBS += -lshell32
|
|
|
|
| |
Add explicit dependency for Distribution.Compat.FilePath
|
|
|
|
| |
Add Distribution.Compat.FilePath to the relevant places.
|
|
|
|
| |
Now required due to dependency from Distribution.ParseUtils
|
|
|
|
|
|
| |
split Distribution.Extension between Language.Haskell.Extension (just
the type, which will also be useful when haskell-src-exts is merged)
and Distribution.Compiler (mappings to compiler options).
|
|
|
|
|
|
|
|
| |
Move the boilerplate Makefile code for using libghccompat.a into a
shared .mk file, lib/compat/compat.mk. libghccompat.a is really a
poor-mans package, but to make it a real package would mean dealing
with variationg in the package support of different GHC versions, so
this is easier for now.
|
|
|
|
| |
Use -optdep--exclude-module to fix building HEAD with itself.
|
|
|
|
|
| |
refactoring only: split Compiler type from Distribution.Setup,
to reduce dependencies.
|
|
|
|
|
|
| |
Add -I options to SRC_CC_OPTS for bootstrapping
From: Thomas Schwinge
|
|
|
|
| |
Don't split in here
|
|
|
|
| |
back out Directory.hs:1.14 and directory.c:1.7; neither meant for HEAD
|
|
|
|
| |
Update the CgCmmBranch (ghc directory) up to the HEAD ghc-6-4-branch-point
|
|
|
|
| |
make 'mkdependC' happy
|
|
|
|
| |
omit __hscore_getFolderPath if __GLASGOW_HASKELL__ < 604
|
|
|
|
| |
__hscore_getFolderPath is ccall, not stdcall.
|
|
|
|
|
|
|
| |
__hscore_getFolderPath(): Don't limit ourselves to shell32.dll, look up
shfolder.dll too.
Merge to STABLE.
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Windows only]
for System.Directory / Compat.Directory functionality that probes the OS
for local details re: misc user directories, perform late binding of
SHGetFolderPath() from shell32.dll, as it may not be present.
(cf. ghc-6.4's failure to operate on Win9x / NT boxes.) If the API isn't
there, fail with UnsupportedOperation.
Packages.readPackageConfigs: gracefully handle excns from getAppUserDataDirectory.
Merge to STABLE.
|
|
|
|
| |
NO_INSTALL_LIBRARY=YES
|
|
|
|
| |
Need to add -I. when compiling with GHC 6.3+
|
|
|
|
| |
include ghcplatform.h
|
|
|
|
| |
Futher gruesome makefile hackery to deal with building lib/compat
|
|
|
|
| |
Compile utilities and lib/compat with GhcHcOpts, in case it is profiled
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rationalise the BUILD,HOST,TARGET defines.
Recall that:
- build is the platform we're building on
- host is the platform we're running on
- target is the platform we're generating code for
The change is that now we take these definitions as applying from the
point of view of the particular source code being built, rather than
the point of view of the whole build tree.
For example, in RTS and library code, we were previously testing the
TARGET platform. But under the new rule, the platform on which this
code is going to run is the HOST platform. TARGET only makes sense in
the compiler sources.
In practical terms, this means that the values of BUILD, HOST & TARGET
may vary depending on which part of the build tree we are in.
Actual changes:
- new file: includes/ghcplatform.h contains platform defines for
the RTS and library code.
- new file: includes/ghcautoconf.h contains the autoconf settings
only (HAVE_BLAH). This is so that we can get hold of these
settings independently of the platform defines when necessary
(eg. in GHC).
- ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
- MachRegs.h, which is included into both the compiler and the RTS,
now has to cope with the fact that it might need to test either
_TARGET_ or _HOST_ depending on the context.
- the compiler's Makefile now generates
stage{1,2,3}/ghc_boot_platform.h
which contains platform defines for the compiler. These differ
depending on the stage, of course: in stage2, the HOST is the
TARGET of stage1. This was wrong before.
- The compiler doesn't get platform info from Config.hs any more.
Previously it did (sometimes), but unless we want to generate
a new Config.hs for each stage we can't do this.
- GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
in CPP'd Haskell source.
- ghcplatform.h defines *_TARGET_* for backwards compatibility
(ghcplatform.h is included by ghcconfig.h, which is included by
config.h, so code which still #includes config.h will get the TARGET
settings as before).
- The Users's Guide is updated to mention *_HOST_* rather than
*_TARGET_*.
- coding-style.html in the commentary now contains a section on
platform defines. There are further doc updates to come.
Thanks to Wolfgang Thaller for pointing me in the right direction.
|
|
|
|
|
|
|
| |
Common up the ghc_ge_XXX variables into config.mk, and add the
ability to build ghc/lib and ghc/utils using the stage1 compiler, by
saying 'make UseStage1=YES'. This is going to be useful for
bootstrapping.
|
|
|
|
| |
Remove System.FilePath, use System.Directory.Internals for now.
|
|
|
|
| |
import Foreign.Ptr and Foreign.C under Windows
|
|
|
|
| |
repair import breakage
|
|
|
|
| |
more precise imports (including try from System.IO.Error)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Track removal of Distribution.Compat.Error.
|
|
|
|
|
|
|
|
| |
createDirectoryIfMissing is added to Compat.Directory and is used in ghc-pkg.
The mingw32_HOST_OS is replaced with mingw32_TARGET_OS. I don't know why but
prior the last commit the tool was working with mingw32_HOST_OS fine but not
it isn't. Maybe I miss something. Simon, could you check whether the patch is
fine?
|
|
|
|
| |
Add Distribution.Compat to libghccompat
|
|
|
|
|
|
|
|
|
|
| |
Make ghc/lib/compat/Compat/Directory.hs use the C function
__compat_long_path_size, rather than
__hscore_long_path_size, as the libraries/ version does
And make ghc/lib/compat/cbits/directory.c define it.
In this way we avoid spurious duplicate-symbol errors when we
compile GHC with ghc6.2.1 etc.
|
|
|
|
|
| |
Data.Version isn't necessary any more, the Version type is exported by
Distribution.Version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Needed to include a header file in Compat/Directory on windows
|
|
|
|
| |
Fix build with GHC 6.2.x
|
|
|
|
| |
Need to add System to ALL_DIRS
|
|
|
|
|
| |
* Add stub for System.FilePath
* Add findExecutable & copyFile to Compat.Directory
|
|
|
|
| |
Windows fix (include config.h)
|
|
|
|
| |
add bits required for Compat.Directory on Windows
|
|
|
|
| |
add missing file
|
|
|
|
| |
Add a more prominent description of what this library is all about.
|