[ksh93-integration-discuss] Trouble with gcc inshadowcompilation...
Roland Mainz
roland.mainz at nrubsig.org
Thu Oct 5 18:52:32 PDT 2006
Glenn Fowler wrote:
>
> the compiles that work have this initial command segment
> cw -_cc -xO3 -xarch=amd64
> and the one that fails has
> cw -_cc "" -xarch=amd64
>
> and gcc chokes on the input file named ""
> it doesn't help that the "" doesn't show up in the gcc command trace
>
> looks like a problem with a "don't optimize streval.c" assertion,
> however that is done in the shadow build system
Ouch ouch... now I remeber why "streval" looks that familar...
... lib/libshell/amd64/Makefile still has the Sun Studio 10 workaround
enabled
-- snip --
# Workaround for a Sun Studio 10 compiler bug which causes ksh93 to
# crash like this:
# -- snip --
# % dbx ksh core
# [snip]
# program terminated by signal SEGV (no mapping at the fault address)
# 0xfffffd7fff357eae: expr+0x004e: cmpl
0x000000000003ef1f(%rbx),%r8d
# (dbx) where
# =>[1] expr(0xfffffd7fffdff728, 0x1f, 0x28, 0xfffffd7fff37048e,
0xfffffd7fff357ed2, 0x7), at 0xfffffd7fff357eae
# [2] arith_compile(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at
0xfffffd7fff359136
# [3] sh_arithcomp(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at
0xfffffd7fff3271cf
# [4] getanode(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34d236
# [5] item(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34f1d5
# [6] term(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34da7f
# [7] list(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34d9b4
# [8] sh_cmd(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34d888
# [9] item(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34f12d
# [10] term(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34da7f
# [11] list(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34d9b4
# [12] sh_cmd(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34d888
# [13] sh_parse(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff34d530
# [14] exfile(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff3235ff
# [15] sh_main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff322f22
# [16] main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x4009d5
# [snip]
# % cc -V
# cc: Sun C 5.7 Patch 117837-04 2005/05/11
# usage: cc [ options] files. Use 'cc -flags' for details
# -- snip --
# The workaround is to disable the optimisation (the bug manifests
# itself at -xO3, -xO2 and -xO1... ;-( ), either for all libshell.so
# objects...
# -- snip --
# amd64_COPTFLAG=""
# -- snip --
# ... or only for streval.c:
# -- snip --
# pics/sh/streval.o := amd64_COPTFLAG=""
# -- snip --
pics/sh/streval.o := amd64_COPTFLAG=""
-- snip --
... which confuses the gcc shadow build...
... I filed http://bugs.grommit.com/show_bug.cgi?id=21 to get the issue
fixed.
Thanks for the help! :-)
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
More information about the ksh93-integration-discuss
mailing list