[project @ 2001-07-24 04:45:59 by ken]
authorken <unknown>
Tue, 24 Jul 2001 04:45:59 +0000 (04:45 +0000)
committerken <unknown>
Tue, 24 Jul 2001 04:45:59 +0000 (04:45 +0000)
Added -static, a flag for compiling on the Alpha that is already
listed under machdepCCOpts in DriverFlags.hs.  Without it, the
following assert in GC.c fails:

    /* make sure the info pointer is into text space */
    ASSERT(q && (LOOKS_LIKE_GHC_INFO(GET_INFO(q))
                 || IS_HUGS_CONSTR_INFO(GET_INFO(q))));

Added -Xlinker -noprefix_recognition, a flag for Alpha compilation
that I just added to machdepCCOpts in DriverFlags.hs.  We need
this flag to disable the following documented behavior of ld(1) on
Digital UNIX:

   All routines that start with __init_ are treated, by default,
   as initialization routines. These are routines that are called
   without an argument when the file that contains them is loaded
   or when the program that contains them is started.

Unfortunately, this flag produces the annoying (but harmless) gcc
message

    gcc: -noprefix_recognition: linker input file unused since
    linking not done

(See also ghc/compiler/main/DriverFlags.hs)

mk/bootstrap.mk

index 9b8a79a..fa5e846 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: bootstrap.mk,v 1.12 2001/07/23 22:33:53 ken Exp $
+# $Id: bootstrap.mk,v 1.13 2001/07/24 04:45:59 ken Exp $
 #
 # Makefile rules for booting from .hc files without a driver.
 #
@@ -48,6 +48,10 @@ ifeq "$(mingw32_TARGET_OS)" "1"
 PLATFORM_CC_OPTS += -mno-cygwin
 endif
 
+ifeq "$(alpha_TARGET_ARCH)" "1"
+PLATFORM_CC_OPTS += -static -Xlinker -noprefix_recognition
+endif
+
 PLATFORM_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) 
 
 HC_BOOT_CC_OPTS = $(PLATFORM_HC_BOOT_CC_OPTS) $(PLATFORM_CC_OPTS) $(CC_OPTS)