Issue Details (XML | Word | Printable)

Key: PCC-420
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Susi Lehtola
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

PCC not working on linux x86_64

Created: 18/Apr/13 06:38 PM   Updated: 20/Apr/14 10:20 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
I've already reported this on the mailing list, but I'm opening an official tracker here.

PCC does not produce working binaries on linux. Having compiled pcc with gcc, and trying to recompile pcc using itself results in

$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... pcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C
compiled programs. If you meant to cross compile, use `--host'.
See `config.log' for more details.

The relevant log entry is
configure:2888: checking whether the C compiler works
configure:2898: ./a.out
configure:2901: $? = 96
configure:2910: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

The same return value 96 is also seen for a simple hello world program, returning 0.

Using bisection, I have backtracked the issue. The procedure is:
1. download pcc and pcc-libs tarballs of the chosen date
2. compile pcc and pcc-libs with gcc
3. recompile pcc and pcc-libs with pcc (compiled with gcc)
4. recompile pcc and pcc-libs with pcc (compiled with pcc)

Results:

20120210 works
20120710 works

20120711 major internal compiler error, cc.c line 1422
20120713 major internal compiler error
20120717 major internal compiler error
20120725 major internal compiler error
20120801 major internal compiler error
20120804 major internal compiler error

20120806 ar: softfloat.o: No such file or directory

20120807 configure: error: cannot run C compiled programs.
20120808 fail
20120810 fail

20120910 fail,
pcc -I. -DTARGET_LITTLE_ENDIAN=1 -Dos_linux -isystem ../libpcc/include
-Iamd64 -Ilinux -I. -g -c cmpdi2.c
quad.h, line 134: redeclaration of __ashldi3
quad.h, line 135: redeclaration of __ashrdi3
quad.h, line 147: redeclaration of __lshrdi3
/usr/libexec/ccom terminated with status 1

20120110 fail
20121216 fail

So it would seem that the problem was introduced either in the
rework between 20120710 and 20120711, or in the fix of the resulting
compiler error.

When the compiler starts to work again in 20120807, configure fails
because the binaries produced by pcc (compiled with gcc) give out
the wrong error code.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson made changes - 19/Apr/14 01:50 PM
Field Original Value New Value
Assignee Anders Magnusson [ ragge ]
Anders Magnusson made changes - 19/Apr/14 01:54 PM
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]
Anders Magnusson made changes - 20/Apr/14 05:29 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Anders Magnusson made changes - 20/Apr/14 10:20 PM
Status Reopened [ 4 ] Closed [ 6 ]
Resolution Won't Fix [ 2 ]