Gert Doering wrote:
I just tried it on AIX 5.3, with gcc-3.4.6, and the result is sort of "mixed":
There is one line that needs to be changed in gcc/p/test/test_run, because otherwise I'll get an error from the shell (in make check):
old:
echo "$PC `$PC $PFLAGS -dumpversion`, flags: $PFLAGS_NO_PATHS `if [ echo "$PC `$PC $PFLAGS -dumpversion`, flags: $PFLAGS_NO_PATHS `if [ x"$GP" != x ]; then echo "(using GP)"; fi`"
new:
echo "$PC `$PC $PFLAGS -dumpversion`, flags: $PFLAGS_NO_PATHS `if [ echo "$PC `$PC $PFLAGS -dumpversion`, flags: $PFLAGS_NO_PATHS `if [ x"$GP" != x ]; then echo "(using GP)"; fi`"
What's that? The original line is:
echo "$PC `$PC $PFLAGS -dumpversion`, flags: $PFLAGS_NO_PATHS `if [ x"$GP" != x ]; then echo "(using GP)"; fi`"
Perhaps you unintentionally duplicated a part of it (from the beginning to the first "[")?
So I assume it should be changed to:
echo "$PC `$PC $PFLAGS -dumpversion`, flags: $PFLAGS_NO_PATHS `if [ x"$GP" != x ]; then echo "(using GP)"; fi`"
(the change is that "(using GP)" needs extra quotes, otherwise the shell will complain - this is with AIX' ksh, but as far as I know, recent bash versions will be similarily picky)
Not AFAICS:
# bash --version GNU bash, version 3.1.0(1)-release (i686-pc-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. # echo "`echo "foo"`" foo
I think it's not so much about being picky, but supporting a slightly extended syntax ("" within `` pairs, while ksh apparently considers the first unquoted " to be the closing one without regard to nesting). But anyway, the extra 's don't hurt bash (and I hope no other shell either).
After that, the test suite starts, but *all* test programs fail:
"gmake pascal.check-long" explains what is going wrong:
Test Run By gd on 2006-05-19 13:43:03 Native configuration is powerpc-ibm-aix5.3.0.0 (hilb31) /s1/gpc-build-20060325-3.4.6/gcc/xgpc -B/s1/gpc-build-20060325-3.4.6/gcc/ 20060325, based on gcc-3.4.6, flags: -g -O3 -W -Wall -Wno-unused GPC-TEST-BEGIN ========================== TEST abso1.pas: cc1: warning: command line option "-funit-path=/gnulocal/lib/gcc/powerpc-ibm-aix5.3.0.0/3.4.6/units" is valid for Pascal but not for C cc1: warning: command line option "-fno-unit-path" is valid for Pascal but not for C cc1: warning: command line option "-funit-path=/s1/gcc-3.4.6/gcc/p/units" is valid for Pascal but not for C cc1: warning: command line option "-fautobuild" is valid for Pascal but not for C cc1: warning: command line option "-funit-path=/s1/gcc-3.4.6/gcc/p/test" is valid for Pascal but not for C cc1: warning: command line option "-funit-path=/s1/gcc-3.4.6/gcc/p/test/../rts" is valid for Pascal but not for C cc1: warning: command line option "-funit-path=/s1/gcc-3.4.6/gcc/p/test/../units" is valid for Pascal but not for C cc1: warning: command line option "-fexecutable-path=." is valid for Pascal but not for C OK
I'm not sure how to proceed here. Why is it calling cc1? Why is it passing options that the backend doesn't like? Is this something that gcc-3.4.6 has changed?
For debugging, you could insert an echo statement in test_run, to find out how exactly it invokes GPC, then try this command-line manually, and if it still fails, play with the options to find out what's causing this.
The relevant line for most test programs (including abso1) is:
if { $PC_WITH_FLAGS -Werror "$1"; } 2>&1; then
Note there are some similar looking lines, this is line 254. So you could put before it:
echo $PC_WITH_FLAGS -Werror "$1"
Compiling a simple "hello,world" program works, with no warnings:
gd@hilb31:/tmp> gpc -Wall -o hello hello.pas gd@hilb31:/tmp> ./hello Hello, World
BTW, you made sure this is the newly installed GPC here, not an older version, did you?
Frank