summaryrefslogtreecommitdiff
path: root/ghc/lib/compat
Commit message (Collapse)AuthorAgeFilesLines
* Reorganisation of the source treeSimon Marlow2006-04-0721-816/+0
| | | | | | | | | | | | | | | 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.
* fix for GHC >= 6.5 againSimon Marlow2006-03-291-1/+1
|
* in stage1, we should get isPrint and isUpper from Compat.Unicode, not Data.CharSimon Marlow2006-03-291-1/+10
|
* fix the build with GHC 6.4 (not 6.4.1)Simon Marlow2006-03-102-1/+6
|
* Add support for Data.Char.generalCategory to libcompatSimon Marlow2006-03-013-0/+63
| | | | | | | | | 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.
* [project @ 2005-12-16 11:41:51 by simonmar]simonmar2005-12-161-0/+3
| | | | Avoid building the GHCi version of this lib
* [project @ 2005-09-13 12:50:59 by simonmar]simonmar2005-09-132-23/+11
| | | | | | 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.
* [project @ 2005-08-01 15:24:26 by simonmar]simonmar2005-08-011-0/+1
| | | | | | For Windows (moved from ghc-pkg/Makefile): HC_BOOT_LIBS += -lshell32
* [project @ 2005-08-01 15:20:01 by simonmar]simonmar2005-08-011-1/+3
| | | | Add explicit dependency for Distribution.Compat.FilePath
* [project @ 2005-07-28 11:46:28 by simonmar]simonmar2005-07-282-0/+3
| | | | Add Distribution.Compat.FilePath to the relevant places.
* [project @ 2005-07-27 23:00:52 by simonmar]simonmar2005-07-271-0/+3
| | | | Now required due to dependency from Distribution.ParseUtils
* [project @ 2005-06-21 15:11:38 by ross]ross2005-06-213-8/+9
| | | | | | 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).
* [project @ 2005-06-16 09:45:28 by simonmar]simonmar2005-06-161-0/+36
| | | | | | | | 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.
* [project @ 2005-06-16 09:40:27 by simonmar]simonmar2005-06-161-0/+12
| | | | Use -optdep--exclude-module to fix building HEAD with itself.
* [project @ 2005-06-16 01:17:09 by ross]ross2005-06-163-5/+5
| | | | | refactoring only: split Compiler type from Distribution.Setup, to reduce dependencies.
* [project @ 2005-05-10 10:35:57 by simonmar]simonmar2005-05-101-1/+2
| | | | | | Add -I options to SRC_CC_OPTS for bootstrapping From: Thomas Schwinge
* [project @ 2005-04-22 22:00:00 by simonmar]simonmar2005-04-221-0/+1
| | | | Don't split in here
* [project @ 2005-04-15 21:51:28 by sof]sof2005-04-152-51/+97
| | | | back out Directory.hs:1.14 and directory.c:1.7; neither meant for HEAD
* [project @ 2005-04-15 14:33:49 by simonpj]simonpj2005-04-152-97/+51
| | | | Update the CgCmmBranch (ghc directory) up to the HEAD ghc-6-4-branch-point
* [project @ 2005-04-12 16:46:41 by sof]sof2005-04-121-3/+6
| | | | make 'mkdependC' happy
* [project @ 2005-03-24 09:27:20 by simonmar]simonmar2005-03-241-2/+4
| | | | omit __hscore_getFolderPath if __GLASGOW_HASKELL__ < 604
* [project @ 2005-03-24 09:19:52 by simonmar]simonmar2005-03-241-1/+1
| | | | __hscore_getFolderPath is ccall, not stdcall.
* [project @ 2005-03-21 18:04:48 by sof]sof2005-03-211-11/+13
| | | | | | | __hscore_getFolderPath(): Don't limit ourselves to shell32.dll, look up shfolder.dll too. Merge to STABLE.
* [project @ 2005-03-19 02:03:26 by sof]sof2005-03-194-55/+114
| | | | | | | | | | | | [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.
* [project @ 2005-02-10 13:38:50 by simonmar]simonmar2005-02-101-0/+3
| | | | NO_INSTALL_LIBRARY=YES
* [project @ 2005-02-04 11:58:23 by simonmar]simonmar2005-02-041-0/+3
| | | | Need to add -I. when compiling with GHC 6.3+
* [project @ 2005-02-02 11:49:43 by simonmar]simonmar2005-02-021-0/+1
| | | | include ghcplatform.h
* [project @ 2005-02-02 10:50:28 by simonpj]simonpj2005-02-021-2/+9
| | | | Futher gruesome makefile hackery to deal with building lib/compat
* [project @ 2005-01-31 14:53:13 by simonpj]simonpj2005-01-311-0/+4
| | | | Compile utilities and lib/compat with GhcHcOpts, in case it is profiled
* [project @ 2005-01-28 12:55:17 by simonmar]simonmar2005-01-284-29/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [project @ 2005-01-26 16:03:40 by simonmar]simonmar2005-01-261-3/+2
| | | | | | | 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.
* [project @ 2005-01-26 15:04:08 by simonmar]simonmar2005-01-264-7/+6
| | | | Remove System.FilePath, use System.Directory.Internals for now.
* [project @ 2005-01-22 08:20:31 by krasimir]krasimir2005-01-221-0/+4
| | | | import Foreign.Ptr and Foreign.C under Windows
* [project @ 2005-01-21 00:14:41 by ross]ross2005-01-211-5/+7
| | | | repair import breakage
* [project @ 2005-01-20 18:35:47 by ross]ross2005-01-201-3/+3
| | | | more precise imports (including try from System.IO.Error)
* [project @ 2005-01-14 08:01:26 by wolfgang]wolfgang2005-01-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* [project @ 2005-01-12 13:44:20 by simonmar]simonmar2005-01-122-5/+0
| | | | Track removal of Distribution.Compat.Error.
* [project @ 2005-01-10 23:48:07 by krasimir]krasimir2005-01-101-2/+14
| | | | | | | | 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?
* [project @ 2005-01-06 15:10:21 by simonmar]simonmar2005-01-062-0/+5
| | | | Add Distribution.Compat to libghccompat
* [project @ 2004-12-15 12:51:15 by simonpj]simonpj2004-12-152-3/+4
| | | | | | | | | | 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.
* [project @ 2004-11-30 15:51:35 by simonmar]simonmar2004-11-302-5/+0
| | | | | Data.Version isn't necessary any more, the Version type is exported by Distribution.Version.
* [project @ 2004-11-26 16:19:45 by simonmar]simonmar2004-11-261-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [project @ 2004-11-17 18:31:08 by josefs]josefs2004-11-171-0/+4
| | | | Needed to include a header file in Compat/Directory on windows
* [project @ 2004-11-16 10:00:10 by simonmar]simonmar2004-11-161-2/+0
| | | | Fix build with GHC 6.2.x
* [project @ 2004-11-15 12:15:13 by simonmar]simonmar2004-11-151-0/+1
| | | | Need to add System to ALL_DIRS
* [project @ 2004-11-14 09:50:33 by krasimir]krasimir2004-11-143-2/+62
| | | | | * Add stub for System.FilePath * Add findExecutable & copyFile to Compat.Directory
* [project @ 2004-11-12 14:09:39 by simonpj]simonpj2004-11-121-0/+4
| | | | Windows fix (include config.h)
* [project @ 2004-11-12 13:27:54 by simonpj]simonpj2004-11-122-1/+63
| | | | add bits required for Compat.Directory on Windows
* [project @ 2004-11-11 17:21:02 by simonmar]simonmar2004-11-111-0/+49
| | | | add missing file
* [project @ 2004-11-11 16:03:51 by simonmar]simonmar2004-11-112-12/+32
| | | | Add a more prominent description of what this library is all about.