Roland Mainz
2012-08-10 20:29:32 UTC
I did a quick&&dirty attempt to build pcc-20120810 with Sun Studio
12.1 on Solaris 11/AMD64 (attached as "build_pcc.sh.txt" and
"buildlog.log.txt" is the hacked build script and build log from that
1. A small patch is needed since there is no /usr/lib/ld.so, so far
Solaris 11 only has /usr/lib/ld.so.1 ... the patch is embedded in the
"build_pcc.sh.txt" script
2. The pcc/pcc-libs makefiles seem to require GNU make (e.g. I get
extra build failures if I don't use gmake) ... is that intended ?
-- snip --
/home/test001/pcc/bin/suncc99 -O -I. -DTARGET_LITTLE_ENDIAN=1
-Dos_sunos -isystem ../libpcc/include -c _alloca.c
cc: Warning: option -y passed to ld
"_alloca.c", line 40: asm statement illegal outside function
cc: acomp failed for _alloca.c
gmake[1]: *** [_alloca.o] Error 2
gmake[1]: Leaving directory `/home/test001/pcc/pcc-libs-20120810/libpcc'
gmake: *** [all] Error 2
-- snip --
Based on the header comments... is that file really used for Unix-like systems ?
-- snip --
"../../arch/i386/macdefs.h", line 169: warning: macro redefined: EAX
"../../arch/i386/macdefs.h", line 170: warning: macro redefined: EDX
"../../arch/i386/macdefs.h", line 171: warning: macro redefined: ECX
"../../arch/i386/macdefs.h", line 172: warning: macro redefined: EBX
"../../arch/i386/macdefs.h", line 173: warning: macro redefined: ESI
"../../arch/i386/macdefs.h", line 174: warning: macro redefined: EDI
"../../arch/i386/macdefs.h", line 175: warning: macro redefined: EBP
"../../arch/i386/macdefs.h", line 176: warning: macro redefined: ESP
-- snip --
This is an issue with the Solaris 11 headers, i.e.
/usr/include/sys/regset.h which defines these symbols for it's own
usage.
Not an critical error... best guess is to trample these with |#undef
EAX| etc. (unlikely that Oracle will fix this... I've lost hope on
that... ;-( )
5. There are _lots_ of warnings related to "warning: initializer does
not fit or is out of range" in buildlog.log ... please check whether
these are real errors. Based on my experience these are usually
sources of nasty and hard-to-find bugs
I forgot one issue:12.1 on Solaris 11/AMD64 (attached as "build_pcc.sh.txt" and
"buildlog.log.txt" is the hacked build script and build log from that
1. A small patch is needed since there is no /usr/lib/ld.so, so far
Solaris 11 only has /usr/lib/ld.so.1 ... the patch is embedded in the
"build_pcc.sh.txt" script
2. The pcc/pcc-libs makefiles seem to require GNU make (e.g. I get
extra build failures if I don't use gmake) ... is that intended ?
-- snip --
/home/test001/pcc/bin/suncc99 -O -I. -DTARGET_LITTLE_ENDIAN=1
-Dos_sunos -isystem ../libpcc/include -c _alloca.c
cc: Warning: option -y passed to ld
"_alloca.c", line 40: asm statement illegal outside function
cc: acomp failed for _alloca.c
gmake[1]: *** [_alloca.o] Error 2
gmake[1]: Leaving directory `/home/test001/pcc/pcc-libs-20120810/libpcc'
gmake: *** [all] Error 2
-- snip --
Based on the header comments... is that file really used for Unix-like systems ?
-- snip --
"../../arch/i386/macdefs.h", line 169: warning: macro redefined: EAX
"../../arch/i386/macdefs.h", line 170: warning: macro redefined: EDX
"../../arch/i386/macdefs.h", line 171: warning: macro redefined: ECX
"../../arch/i386/macdefs.h", line 172: warning: macro redefined: EBX
"../../arch/i386/macdefs.h", line 173: warning: macro redefined: ESI
"../../arch/i386/macdefs.h", line 174: warning: macro redefined: EDI
"../../arch/i386/macdefs.h", line 175: warning: macro redefined: EBP
"../../arch/i386/macdefs.h", line 176: warning: macro redefined: ESP
-- snip --
This is an issue with the Solaris 11 headers, i.e.
/usr/include/sys/regset.h which defines these symbols for it's own
usage.
Not an critical error... best guess is to trample these with |#undef
EAX| etc. (unlikely that Oracle will fix this... I've lost hope on
that... ;-( )
5. There are _lots_ of warnings related to "warning: initializer does
not fit or is out of range" in buildlog.log ... please check whether
these are real errors. Based on my experience these are usually
sources of nasty and hard-to-find bugs
I worked-around the issue with "_alloca.c" by replacing it with an
empty file... the pcc-libs build then succeeds...
... but pcc is still unable to compile the "hello world" application:
-- snip --
+ cat
+ 1> x.c 0<< \EOF
#include <stdlib.h>
#include <stdio.h>
int main(int ac, char *av[])
{
puts("hello world chicken");
return EXIT_SUCCESS;
}
EOF
+ pcc x.c -o ./x
ld: fatal: entry point symbol '__start' is undefined
ld terminated with status 1
-- snip --
... any idea what causes this issue ?
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) ***@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
__ . . __
(o.\ \/ /.o) ***@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)