[project @ 2001-07-24 04:46:37 by ken]
authorken <unknown>
Tue, 24 Jul 2001 04:46:37 +0000 (04:46 +0000)
committerken <unknown>
Tue, 24 Jul 2001 04:46:37 +0000 (04:46 +0000)
Added -Xlinker -noprefix_recognition to Alpha-specific
machdepCCOpts.  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 mk/bootstrap.mk)

ghc/compiler/main/DriverFlags.hs

index 9f04044..4943cd4 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -#include "hschooks.h" #-}
 
 -----------------------------------------------------------------------------
--- $Id: DriverFlags.hs,v 1.61 2001/07/03 16:45:15 rrt Exp $
+-- $Id: DriverFlags.hs,v 1.62 2001/07/24 04:46:37 ken Exp $
 --
 -- Driver flags
 --
@@ -472,7 +472,7 @@ buildStaticHscOpts = do
 
 machdepCCOpts 
    | prefixMatch "alpha"   cTARGETPLATFORM  
-       = return ( ["-static"], [] )
+       = return ( ["-static", "-Xlinker -noprefix_recognition"], [] )
 
    | prefixMatch "hppa"    cTARGETPLATFORM  
         -- ___HPUX_SOURCE, not _HPUX_SOURCE, is #defined if -ansi!