Happy generates uncompilable files
Sigbjorn Finne
sof at galconn.com
Fri Nov 9 12:07:09 EST 2001
Hi,
couple of things:
* you don't have to side-effect mk/config.mk{.in} to make
any changes to the definitions in there. Just create your own
mk/build.mk and add definitions of variables you need for
your build tree to work/behave as expected. The build.mk
defns override those in mk/config.mk
(see 5.3 of the GHC Building Guide for more).
* the break you're seeing is due to the GHC native code generator
not being able to handle Int16-sized values internally. My suggested
fix for the problem you're running into would be not to change
the options given to Happy, but to GHC - i.e., have it generate code
via C (==> add -fvia-C to rename/ParseIface_HC_OPTS and
parser/Parser_HC_OPTS in ghc/compiler/Makefile).
I've committed the latter fix.
hth
--sigbjorn
----- Original Message -----
From: "Josef Svenningsson" <josefs at cs.chalmers.se>
To: <glasgow-haskell-bugs at haskell.org>
Sent: Thursday, November 08, 2001 08:15
Subject: Happy generates uncompilable files
> Hi!
>
> Here's a small patch to fptool/mk/config.mk.in which I need for the
> compiler to compile smoothely on my sparc:
>
> *** config.mk.in Thu Nov 8 17:12:46 2001
> --- ../../fptools/mk/config.mk.in Wed Nov 7 16:23:03 2001
> ***************
> *** 833,843 ****
> #
> # Options to pass to Happy when we're going to compile the output with
> GHC
> #
> - ifeq "$(i386_TARGET_ARCH)" "1"
> GHC_HAPPY_OPTS = $(shell if ( test `echo $(HAPPY_VERSION)
> | sed -e "s/\(.*\)\..*/\1/g"` "-gt" "1" || test `echo $(HAPPY_VERSION) |
> sed -e "s/.*\.\(.*\)/\1/g"` "-ge" "9" ); then echo -agc; else echo -g; fi)
> - else
> - GHC_HAPPY_OPTS = -gc
> - endif
>
> #
> # Stuff from fptools/literate
> --- 833,839 ----
>
>
> Why? Because with the -a flag happy generates files which uses the
> Int16Rep function. This is only implemented for x86. :-(
>
> Could you please add this patch? It would make my life a lot easier.
>
> Cheers,
>
> /Josef
>
>
> _______________________________________________
> Glasgow-haskell-bugs mailing list
> Glasgow-haskell-bugs at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list