Fixes for the porting process for 6.6
authorIan Lynagh <igloo@earth.li>
Tue, 3 Oct 2006 12:42:32 +0000 (12:42 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 3 Oct 2006 12:42:32 +0000 (12:42 +0000)
distrib/hc-build
docs/building/building.xml
mk/bootstrap.mk

index 0771980..a645fa3 100644 (file)
@@ -29,10 +29,12 @@ fi
 case "$configopts" in
 *--enable-hc-boot-unregisterised*)
 cat >>mk/build.mk <<END
+GhcUnregisterised=YES
 GhcWithInterpreter=NO
 GhcWithNativeCodeGen=NO
 SplitObjs=NO
 GhcLibWays=
+GhcWithSMP=NO
 END
 ;;
 
index d0db332..69667b1 100644 (file)
@@ -2563,7 +2563,7 @@ $ ./configure --enable-hc-boot --enable-hc-boot-unregisterised</screen>
            </listitem>
   
            <listitem>
-<screen>$ cd <replaceable>T</replaceable>/ghc/includes
+<screen>$ cd <replaceable>T</replaceable>/includes
 $ make</screen>
            </listitem>
          </itemizedlist>
@@ -2598,7 +2598,8 @@ GhcWithInterpreter = NO
 GhcStage1HcOpts = -O
 GhcStage2HcOpts = -O -fvia-C -keep-hc-files
 SRC_HC_OPTS += -H32m
-GhcBootLibs = YES</programlisting>
+GhcBootLibs = YES
+GhcWithSMP = NO</programlisting>
            </listitem>
 
            <listitem>
@@ -2625,9 +2626,9 @@ GhcBootLibs = YES</programlisting>
 
            <listitem>
              <para>Copy
-             <filename><replaceable>T</replaceable>/ghc/includes/ghcautoconf.h</filename>, <filename><replaceable>T</replaceable>/ghc/includes/DerivedConstants.h</filename>, and <filename><replaceable>T</replaceable>/ghc/includes/GHCConstants.h</filename>
+             <filename><replaceable>T</replaceable>/includes/ghcautoconf.h</filename>, <filename><replaceable>T</replaceable>/includes/DerivedConstants.h</filename>, and <filename><replaceable>T</replaceable>/includes/GHCConstants.h</filename>
              to
-             <filename><replaceable>H</replaceable>/ghc/includes</filename>.
+             <filename><replaceable>H</replaceable>/includes</filename>.
              Note that we are building on the host machine, using the
              target machine's configuration files.  This
              is so that the intermediate C files generated here will
@@ -2637,28 +2638,20 @@ GhcBootLibs = YES</programlisting>
              <listitem>
                <para>Touch the generated configuration files, just to make
                sure they don't get replaced during the build:</para>
-<screen>$ cd <filename><replaceable>H</replaceable></filename>/ghc/includes
+<screen>$ cd <filename><replaceable>H</replaceable></filename>/includes
 $ touch ghcautoconf.h DerivedConstants.h GHCConstants.h mkDerivedConstants.c
 $ touch mkDerivedConstantsHdr mkDerivedConstants.o mkGHCConstants mkGHCConstants.o</screen>
 
-               <para>Note: it has been reported that these files still get
-                 overwritten during the next stage.  We have installed a fix
-                 for this in GHC 6.4.2, but if you are building a version
-                 before that you need to watch out for these files getting
-                 overwritte by the <literal>Makefile</literal> in
-                 <literal>ghc/includes</literal>.  If your system supports
-                 it, you might be able to prevent it by making them
-                 immutable:</para>
-<screen>$ chflags uchg  ghc/includes/{ghcautoconf.h,DerivedConstants.h,GHCConstants.h}</screen>
-             </listitem>
-
            <listitem>
                <para>Now build the compiler:</para>
-<screen>$ cd <replaceable>H</replaceable>/glafp-utils &amp;&amp; make boot &amp;&amp; make
-$ cd <replaceable>H</replaceable>/ghc &amp;&amp; make boot &amp;&amp; make</screen>
-             <para>Don't worry if the build falls over in the RTS, we
-              don't need the RTS yet.</para>
+<screen>$ cd <replaceable>H</replaceable>/includes &amp;&amp; make boot &amp;&amp; make
+$ cd <replaceable>H</replaceable>/compat &amp;&amp; make boot &amp;&amp; make
+$ cd <replaceable>H</replaceable>/utils &amp;&amp; make boot &amp;&amp; make
+$ cd <replaceable>H</replaceable>/compiler &amp;&amp; make boot &amp;&amp; make</screen>
+$ cd <replaceable>H</replaceable>/rts &amp;&amp; make boot &amp;&amp; make</screen>
            </listitem>
+           <para>Don't worry if the build falls over in the RTS, we
+            don't need the RTS yet.</para>
 
            <listitem>
 <screen>$ cd <replaceable>H</replaceable>/libraries
@@ -2666,7 +2659,7 @@ $ make boot &amp;&amp; make</screen>
            </listitem>
 
            <listitem>
-<screen>$ cd <replaceable>H</replaceable>/ghc/compiler
+<screen>$ cd <replaceable>H</replaceable>/compiler
 $ make boot stage=2 &amp;&amp; make stage=2</screen>
            </listitem>
 
index d071331..4626795 100644 (file)
@@ -92,6 +92,9 @@ HC_BOOT_LD_OPTS =                             \
    -L$(FPTOOLS_TOP_ABS)/libraries/base/cbits   \
    -L$(FPTOOLS_TOP_ABS)/libraries/haskell98    \
    -L$(FPTOOLS_TOP_ABS)/libraries/parsec        \
+   -L$(FPTOOLS_TOP_ABS)/libraries/regex-base    \
+   -L$(FPTOOLS_TOP_ABS)/libraries/regex-posix   \
+   -L$(FPTOOLS_TOP_ABS)/libraries/regex-compat  \
    -L$(FPTOOLS_TOP_ABS)/libraries/Cabal
 
 ifeq "$(GhcWithInterpreter)" "YES"
@@ -103,36 +106,36 @@ HC_BOOT_LD_OPTS += \
 endif
 
 HC_BOOT_LD_OPTS += \
-   -u "$(UNDERSCORE)GHCziBase_Izh_static_info" \
-   -u "$(UNDERSCORE)GHCziBase_Czh_static_info" \
-   -u "$(UNDERSCORE)GHCziFloat_Fzh_static_info" \
-   -u "$(UNDERSCORE)GHCziFloat_Dzh_static_info" \
-   -u "$(UNDERSCORE)GHCziPtr_Ptr_static_info" \
-   -u "$(UNDERSCORE)GHCziWord_Wzh_static_info" \
-   -u "$(UNDERSCORE)GHCziInt_I8zh_static_info" \
-   -u "$(UNDERSCORE)GHCziInt_I16zh_static_info" \
-   -u "$(UNDERSCORE)GHCziInt_I32zh_static_info" \
-   -u "$(UNDERSCORE)GHCziInt_I64zh_static_info" \
-   -u "$(UNDERSCORE)GHCziWord_W8zh_static_info" \
-   -u "$(UNDERSCORE)GHCziWord_W16zh_static_info" \
-   -u "$(UNDERSCORE)GHCziWord_W32zh_static_info" \
-   -u "$(UNDERSCORE)GHCziWord_W64zh_static_info" \
-   -u "$(UNDERSCORE)GHCziStable_StablePtr_static_info" \
-   -u "$(UNDERSCORE)GHCziBase_Izh_con_info" \
-   -u "$(UNDERSCORE)GHCziBase_Czh_con_info" \
-   -u "$(UNDERSCORE)GHCziFloat_Fzh_con_info" \
-   -u "$(UNDERSCORE)GHCziFloat_Dzh_con_info" \
-   -u "$(UNDERSCORE)GHCziPtr_Ptr_con_info" \
-   -u "$(UNDERSCORE)GHCziStable_StablePtr_con_info" \
-   -u "$(UNDERSCORE)GHCziBase_False_closure" \
-   -u "$(UNDERSCORE)GHCziBase_True_closure" \
-   -u "$(UNDERSCORE)GHCziPack_unpackCString_closure" \
-   -u "$(UNDERSCORE)GHCziIOBase_stackOverflow_closure" \
-   -u "$(UNDERSCORE)GHCziIOBase_heapOverflow_closure" \
-   -u "$(UNDERSCORE)GHCziIOBase_NonTermination_closure" \
-   -u "$(UNDERSCORE)GHCziIOBase_BlockedOnDeadMVar_closure" \
-   -u "$(UNDERSCORE)GHCziIOBase_Deadlock_closure" \
-   -u "$(UNDERSCORE)GHCziWeak_runFinalizzerBatch_closure" \
+   -u "$(UNDERSCORE)base_GHCziBase_Izh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziBase_Czh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziFloat_Fzh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziFloat_Dzh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziPtr_Ptr_static_info" \
+   -u "$(UNDERSCORE)base_GHCziWord_Wzh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziInt_I8zh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziInt_I16zh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziInt_I32zh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziInt_I64zh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziWord_W8zh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziWord_W16zh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziWord_W32zh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziWord_W64zh_static_info" \
+   -u "$(UNDERSCORE)base_GHCziStable_StablePtr_static_info" \
+   -u "$(UNDERSCORE)base_GHCziBase_Izh_con_info" \
+   -u "$(UNDERSCORE)base_GHCziBase_Czh_con_info" \
+   -u "$(UNDERSCORE)base_GHCziFloat_Fzh_con_info" \
+   -u "$(UNDERSCORE)base_GHCziFloat_Dzh_con_info" \
+   -u "$(UNDERSCORE)base_GHCziPtr_Ptr_con_info" \
+   -u "$(UNDERSCORE)base_GHCziStable_StablePtr_con_info" \
+   -u "$(UNDERSCORE)base_GHCziBase_False_closure" \
+   -u "$(UNDERSCORE)base_GHCziBase_True_closure" \
+   -u "$(UNDERSCORE)base_GHCziPack_unpackCString_closure" \
+   -u "$(UNDERSCORE)base_GHCziIOBase_stackOverflow_closure" \
+   -u "$(UNDERSCORE)base_GHCziIOBase_heapOverflow_closure" \
+   -u "$(UNDERSCORE)base_GHCziIOBase_NonTermination_closure" \
+   -u "$(UNDERSCORE)base_GHCziIOBase_BlockedOnDeadMVar_closure" \
+   -u "$(UNDERSCORE)base_GHCziIOBase_Deadlock_closure" \
+   -u "$(UNDERSCORE)base_GHCziWeak_runFinalizzerBatch_closure" \
    -u "$(UNDERSCORE)__stginit_Prelude"
 
 
@@ -142,7 +145,7 @@ ifeq "$(GhcWithInterpreter)" "YES"
 HC_BOOT_LIBS += -lHSreadline -lHStemplate-haskell -lHSunix -lHSunix_cbits
 endif
 
-HC_BOOT_LIBS +=  -lHSCabal -lHShaskell98 -lHSbase -lHSbase_cbits -lHSparsec -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
+HC_BOOT_LIBS +=  -lHSregex-compat -lHSregex-posix -lHSregex-base -lHSCabal -lHShaskell98 -lHSbase -lHSbase_cbits -lHSparsec -lHSrts -lgmp -lm -lrt $(EXTRA_HC_BOOT_LIBS)
 
 ifeq "$(GhcLibsWithReadline)" "YES"
 HC_BOOT_LIBS += $(patsubst %, -l%, $(LibsReadline))