global register variable follows a function definition

Donald Bruce Stewart dons at cse.unsw.edu.au
Wed Sep 1 21:59:26 EDT 2004


Another problem building HEAD on OpenBSD:

        ../../ghc/compiler/ghc-inplace -optc-O -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wbad-function-cast -optc-I../includes -optc-I. -optc-Iparallel -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -H16m -O  -O2 -static -#include Prelude.h -#include Rts.h -#include RtsFlags.h -#include RtsUtils.h -#include StgRun.h -#include Schedule.h -#include Printer.h -#include Sanity.h -#include Storage.h -#include SchedAPI.h -#include Timer.h -#include Itimer.h -#include ProfHeap.h -#include LdvProfile.h -#include Profiling.h -#include Apply.h -fvia-C -dcmm-lint     -c StgCRun.c -o StgCRun.o
        In file included from ../includes/Stg.h:327,
                         from StgCRun.c:68:
        ../includes/Regs.h:319: global register variable follows a function definition
        ../includes/Regs.h:328: global register variable follows a function definition
        gmake: *** [StgCRun.o] Error 1

Fixed by shifting up the occurence of Regs.h in Stg.h. Seem reasonable?
And, why isn't this occuring on the linux build machines?

-- Don

------------------------------------------------------------------------
--- Stg.h.orig	Thu Sep  2 11:56:01 2004
+++ Stg.h	Thu Sep  2 11:56:04 2004
@@ -323,8 +323,8 @@
    -------------------------------------------------------------------------- */
 
 #include "StgDLL.h"
-#include "MachRegs.h"
 #include "Regs.h"
+#include "MachRegs.h"
 #include "StgProf.h"  /* ToDo: separate out RTS-only stuff from here */
 
 #if IN_STG_CODE


More information about the Cvs-ghc mailing list