Commit cfedbe46 authored by claus.reinke@talk21.com's avatar claus.reinke@talk21.com
Browse files

FIX ghci024 for unregisterised, powerpc_apple_darwin, and ghc-6.8

 
 - for unregisterised platforms, default is '-fno-asm-mangling'
 - powerpc_apple_darwin fails on ':set -package ghc' (#1845)
 - for ghc 6.8, -fno-run-cps and -fno-convert-to-zipper-and-back
   do not exist 
parent 7018f108
......@@ -33,7 +33,7 @@ test('ghci022', normal, ghci_script, ['ghci022.script'])
test('ghci023', normal, ghci_script, ['ghci023.script'])
execfile(in_testdir('ghci024.py')) # load function prepare024
test('ghci024', prepare024, ghci_script, ['ghci024.script'])
test('ghci024', compose(prepare024,expect_broken_if_platform(1845,"powerpc_apple_darwin")), ghci_script, ['ghci024.script'])
test('ghci025', normal, ghci_script, ['ghci025.script'])
test('ghci026', namebase_if_compiler_lt('ghc','6.9', 'ghci026-6.8'), ghci_script, ['ghci026.script'])
......
import os
import re
conf_ghc = '/cygdrive/c/fptools/ghc/compiler/stage2/ghc-inplace'
# prepare version-/platform-specific ghci024.stdout
# - listen to ghci -package ghc, to figure out package ghc contents for :show packages
# - drop new flags for old ghc
# - change flag defaults according to platform (unregistered -> -fno-asm-mangling)
#
def prepare024( opts ):
h = os.popen('echo :q | '+config.compiler+' --interactive -package ghc ')
packages = h.read()
......@@ -14,6 +17,19 @@ def prepare024( opts ):
packagelist.reverse()
packagelist += ['rts']
if config.unregisterised :
mangling = 'no-'
else:
mangling = ''
if version_lt(config.compiler_version, '6.9') :
new_flags = ''
else:
new_flags = """\
-fno-run-cps
-fno-convert-to-zipper-and-back
"""
outtext = """\
options currently set: none.
GHCi-specific dynamic flag settings:
......@@ -58,13 +74,11 @@ other dynamic, non-language, flag settings:
-fno-unbox-strict-fields
-fno-dicts-cheap
-fno-excess-precision
-fasm-mangling
-f%(mangling)sasm-mangling
-fno-force-recomp
-fno-hpc-no-auto
-fno-rewrite-rules
-fno-run-cps
-fno-convert-to-zipper-and-back
-fno-vectorise
%(new_flags)s -fno-vectorise
-fno-regs-graph
-fno-regs-iterative
-fgen-manifest
......@@ -116,7 +130,7 @@ packages currently loaded:
active package flags:
-package ghc
packages currently loaded:
"""
"""%{'mangling': mangling, 'new_flags': new_flags}
outfile = open(in_testdir('ghci024.stdout'), 'w')
outfile.write(outtext)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment