Hi,
has anyone successfully built the current GHC sources using GCC 3.3.1?
I'm asking because I'm having lot's of problems doing it. The version
I use here is the "hardened-gcc" package from Gentoo Linux [1]
gcc (GCC) 3.3.1 20030927 (Gentoo Linux 3.3.1-r5, propolice)
which adds transparent support for PaX/etdyn ASLR and Propolice/SSP
stack protection to every binary.
When compiling with -O, chokes on the stack-securing start-up code:
| ghc -cpp -O -funbox-strict-fields -package util -package text -fffi \
| -c Autoconf.lhs
| Warning: retaining unknown function `__i686.get_pc_thunk.bx' in \
| output from C compiler
|
| Prologue junk?: .globl __stginit_Autoconf
| .type __stginit_Autoconf, @function
| __stginit_Autoconf:
| movl %ebx, 8(%esp)
| call __i686.get_pc_thunk.bx
| addl $_GLOBAL_OFFSET_TABLE_, %ebx
Without -O, everything works fine (and the code seems to work as
well). Now, I "fixed" the problem by disabling the special stack
protection features by adding
-optc-yet_exec -optc-yno_propolice
to the command line. With these options, GHC compiles everything as
usual, no problems.
So I tried to compile the latest GHC itself:
| GCC="gcc -yet_exec -yno_propolice ${CFLAGS}"
| GHC="ghc-6.0 -optc-yet_exec -optc-yno_propolice"
| autoconf &&
| autoheader &&
| ./configure --prefix=/usr/local/ghc-current \
| --with-gcc="${GCC}" \
| --with-ghc="${GHC}" \
| --enable-hopengl \
| --enable-threaded-rts \
| --enable-src-tree-happy \
| --enable-src-tree-haddock \
| --enable-src-tree-alex
The build completes the first stage successfully, but apparently does
NOT produce a valid executable: The generated ghc-inplace binary
doesn't do anything. It doesn't fail nor produce any error message,
but it doesn't produce any output either. I can see no sign it was
alive neither on the console nor in the system's log file.
Since stack protection code _is_ disabled, I figured this could be a
problem with gcc itself.
Any ideas, anyone?
Peter
[1] http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc