Issue Details (XML | Word | Printable)

Key: PCC-15
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Matthew Cashdollar
Votes: 0
Watchers: 1
Operations

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

Can't compile pcc on OpenBSD 4.4 sparc64

Created: 04/Jan/09 06:52 PM   Updated: 17/Jan/09 08:39 AM
Component/s: sparc64 target
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. Text File inline-dashe.c (41 kB)

Environment:
OpenBSD 4.4 GENERIC#1715 sparc64
cpu0 at mainbus0: SUNW,UltraSPARC-IIi (rev 9.1) @ 400 MHz
cpu0: physical 16K instruction (32 b/l), 16K data (32 b/l), 2048K external (64 b/l)


 Description  « Hide
I run ./configure --prefix=/home/mpc
then make (also tried gmake)

Here is the error I receive:
gcc -DPCC_DEBUG -DGCC_COMPAT -Dos_openbsd -I. -I. -I../.. -I../../mip -I../../arch/sparc64 -Dmach_sparc64 -I../../os/openbsd -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wsign-compare -Werror -c -o inline.o inline.c
inline.c: In function `printip':
inline.c:299: warning: unsigned int format, different type arg (arg 4)
inline.c:306: warning: unsigned int format, different type arg (arg 4)
inline.c: In function `inlinetree':
inline.c:362: error: syntax error before numeric constant
inline.c:388: error: invalid lvalue in assignment
inline.c:389: error: invalid lvalue in assignment
inline.c:390: error: invalid lvalue in assignment

Looking at inline.c, I do not see anything wrong, so maybe I am doing something wrong.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 04/Jan/09 07:22 PM
Hi,
can you please attach a preprocessed output of the above file? I suspect there may be tainted namespace problem.


Matthew Cashdollar added a comment - 06/Jan/09 05:03 PM
How do I get the preprocessed output?

Anders Magnusson added a comment - 06/Jan/09 05:13 PM
Add -E to the command line and remove -o inline.o, then it will spit out the output on stdout.

Anders Magnusson added a comment - 07/Jan/09 03:22 PM
Fixed, it collided with sparc register names.

Matthew Cashdollar added a comment - 12/Jan/09 04:58 PM
I am able to compile now, but there are a few warnings that cause the build to fail if -Werror is enabled. If I remove -Werror, it works.

gcc -DGCC_COMPAT -DPCC_DEBUG -Dos_openbsd -I. -I. -I../../ -I../../mip -I../../arch/sparc64 -Dmach_sparc64 -I../../os/openbsd -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wsign-compare -c -o inline.o inline.c
inline.c: In function `printip':
inline.c:299: warning: unsigned int format, different type arg (arg 4)
inline.c:306: warning: unsigned int format, different type arg (arg 4)

gcc -DGCC_COMPAT -DPCC_DEBUG -Dos_openbsd -I. -I. -I../../ -I../../mip -I../../arch/sparc64 -Dmach_sparc64 -I../../os/openbsd -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wsign-compare -c -o optim2.o ../../mip/optim2.c
../../mip/optim2.c: In function `printip':
../../mip/optim2.c:1192: warning: unsigned int format, different type arg (arg 3)
../../mip/optim2.c:1202: warning: unsigned int format, different type arg (arg 3)