
Just thought I'd share a little hack... linux has a command 'setarch' which changes the current architecture so you can do things like build i386 rpms on a x86_64 system... by installing both a i386 and x86_64 ghc (both from the fedora repo work great) and replacing the ghc driver with something like the below makes ghc "just work" too. (replace paths as appropriate) I wonder if we should make the driver script a bit smarter in general to allow multiple versions of ghc normally so you can just pass a version and arch command line argument to ghc and the driver will intpret it and call the appropriate back end. #!/bin/sh case `uname -m` in x86_64) GHCBIN="/usr/lib64/ghc-6.4.1.20050626/ghc-6.4.1.20050626" TOPDIROPT="-B/usr/lib64/ghc-6.4.1.20050626" EXTRA_OPTS="" ;; i*86) GHCBIN="/usr/lib/ghc-6.4/ghc-6.4" TOPDIROPT="-B/usr/lib/ghc-6.4" EXTRA_OPTS=" -optc-m32 -optl-m32 -opta-m32 " ;; *) echo "Unknown architecture" ; exit 2;; esac echo $GHCBIN $TOPDIROPT $EXTRA_OPTS ${1+"$@"} exec $GHCBIN $TOPDIROPT $EXTRA_OPTS ${1+"$@"} -- John Meacham - ⑆repetae.net⑆john⑈

On Sun, 2005-08-07 at 02:15 -0700, John Meacham wrote:
Just thought I'd share a little hack...
linux has a command 'setarch' which changes the current architecture so you can do things like build i386 rpms on a x86_64 system...
skaller@rosella:~$ man setarch No manual entry for setarch skaller@rosella:~$ setarch bash: setarch: command not found skaller@rosella:~$ -- John Skaller <skaller at users dot sourceforge dot net>

skaller wrote:
On Sun, 2005-08-07 at 02:15 -0700, John Meacham wrote:
Just thought I'd share a little hack...
linux has a command 'setarch' which changes the current architecture so you can do things like build i386 rpms on a x86_64 system...
skaller@rosella:~$ man setarch No manual entry for setarch skaller@rosella:~$ setarch bash: setarch: command not found skaller@rosella:~$
Maybe setarch is some RedHat-ism for linux32? gebner@achatina:~$ apropos linux32 linux32 (1) - Set 32 bit uname emulation processes. gebner@achatina:~$ uname -m x86_64 gebner@achatina:~$ linux32 uname -m i686 Gabriel.
participants (3)
-
Gabriel Ebner
-
John Meacham
-
skaller