Hi Ben,
-fvia-C means you are building unregisterised build. Perhaps, you might
try registerised build or even that was your intention? For this you
will need to apply my submitted patch or do this yourself...
FYI: I'm just testing GHC HEAD with LLVM HEAD, where GHC HEAD is:
commit bcab1273dcb58199001e225eca1708e6648a3bb4
Author: Simon Marlow <[email protected]>
Date: Mon Oct 10 15:56:50 2011 +0100
Include -optc options in mkExtraCObj (#5528)
LLVM HEAD is:
r141859 | void | 2011-10-13 10:24:19 +0200 (Thu, 13 Oct 2011) | 4 lines
More closely follow libgcc, which has code after the `ret' instruction to
release the stack segment and reset the stack pointer. Place the code in
its own
MBB to make the verifier happy.
and GHC is building happily, currently:
"inplace/bin/ghc-stage1" -H32m -O -package-name containers-0.4.2.0
-hide-all-packages -i -ilibraries/containers/.
-ilibraries/containers/dist-install/build
-ilibraries/containers/dist-install/build/autogen
-Ilibraries/containers/dist-install/build
-Ilibraries/containers/dist-install/build/autogen
-Ilibraries/containers/include -optP-include
-optPlibraries/containers/dist-install/build/autogen/cabal_macros.h
-package array-0.3.0.3 -package base-4.4.0.0 -package deepseq-1.2.0.1
-fregs-graph -O2 -XHaskell98 -XDeriveDataTypeable -XStandaloneDeriving
-XMagicHash -XRank2Types -XCPP -O2 -no-user-package-conf -rtsopts
-odir libraries/containers/dist-install/build -hidir
libraries/containers/dist-install/build -stubdir
libraries/containers/dist-install/build -hisuf hi -osuf o -hcsuf hc -c
libraries/containers/./Data/Graph.hs -o
libraries/containers/dist-install/build/Data/Graph.o
Thanks,
Karel
On 10/13/11 08:30 PM, Ben Gamari wrote:
While compiling the master branch on my ARM machine, I ran into the
following error. It seems that the Alloc.hs defines functions named
free, malloc, and realloc, which then clash with the built-in
functions of the same name. Any ideas what to do here? Thanks.
Cheers,
- Ben
[1] Error:
"inplace/bin/ghc-stage1" -H64m -O0 -fvia-C -keep-tmp-files -package-name
base-4.4.0.0 -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build
-ilibraries/base/dist-install/build/autogen -Ilibraries/base/dist-install/build
-Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include
-optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include
-optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package ghc-prim-0.2.0.0
-package integer-gmp-0.3.0.0 -package rts-1.0 -package-name base -XHaskell98 -XCPP -O
-fasm -no-user-package-conf -rtsopts -odir libraries/base/dist-install/build -hidir
libraries/base/dist-install/build -stubdir libraries/base/dist-install/build -hisuf hi
-osuf o -hcsuf hc -c libraries/base/./Foreign/Marshal/Alloc.hs -o
libraries/base/dist-install/build/Foreign/Marshal/Alloc.o
on the commandline:
Warning: The -fvia-C flag does nothing; it will be removed in a future GHC
release
on the commandline:
Warning: Compiler has no native codegen, so ignoring -fasm
/tmp/ghc22798_0/ghc22798_0.hc:469:1:
warning: built-in function ‘free’ declared as non-function
/tmp/ghc22798_0/ghc22798_0.hc: In function
‘base_ForeignziMarshalziAlloc_zdwa_entry’:
/tmp/ghc22798_0/ghc22798_0.hc:544:2:
warning: conflicting types for built-in function ‘malloc’
/tmp/ghc22798_0/ghc22798_0.hc: In function ‘s1LZ_ret’:
/tmp/ghc22798_0/ghc22798_0.hc:845:2:
warning: conflicting types for built-in function ‘realloc’
/tmp/ghc22798_0/ghc22798_0.hc: In function
‘base_ForeignziMarshalziAlloc_zdwccall_entry’:
/tmp/ghc22798_0/ghc22798_0.hc:992:2:
error: ‘free’ redeclared as different kind of symbol
/tmp/ghc22798_0/ghc22798_0.hc:469:1:
note: previous declaration of ‘free’ was here
[2] Region surrounding line 469 of C source. Note line 469,
"EI_(free);", which apparently defines free to be an StgWordArray.
EF_(base_ForeignziMarshalziAlloc_alloca_entry);
StgWord base_ForeignziMarshalziAlloc_alloca_info[] = {
(W_)&base_ForeignziMarshalziAlloc_alloca_entry, 0x0, 0x1000fU, 0x10005U,
(W_)&base_ForeignziMarshalziAlloc_alloca_srt
};
EI_(base_GHCziPtr_FunPtr_static_info);
EI_(free);
StgWord base_ForeignziMarshalziAlloc_finalizzerFree_closure[] = {
(W_)&base_GHCziPtr_FunPtr_static_info, (W_)&free
};
EI_(base_ForeignziMarshalziAlloc_mallocBytes4_info);
StgWord base_ForeignziMarshalziAlloc_mallocBytes4_closure[] = {
(W_)&base_ForeignziMarshalziAlloc_mallocBytes4_info, 0x0, 0x0, 0x0
};
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc