Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
129 user(s) are online (75 user(s) are browsing Forums)

Members: 0
Guests: 129

more...

Headlines

 
  Register To Post  

clib2 build for 68k fails
Amigans Defender
Amigans Defender


See User information
Don't really know where to post about this, so I'll try here

Building clib2 using gcc 3.4.6 gives these errors:

Compiling unistd_getopt.[large_data_020:c
/
tmp/ccrQcqYy.sAssembler messages
/
tmp/ccrQcqYy.s:36Errorparse error -- statement `cmpl (sp.0),d0' ignored 
/tmp/ccrQcqYy.s:58: Error: parse error -- statement 
`movel (sp.0),a0' ignored
/tmp/ccrQcqYy.s:86: Error: parse error -- statement `addql #1,(sp.0)' 
ignored 
/tmp/ccrQcqYy.s:89Errorparse error -- statement `movel (sp.0),a0' ignored 
/tmp/ccrQcqYy.s:94: Error: parse error -- statement 
`movel d0,(sp.0)' ignored 
/tmp/ccrQcqYy.s:104: Error: parse error -- statement `addl (sp.0),a0' 
ignored 
/tmp/ccrQcqYy.s:129Errorparse error -- statement `movel d0,(sp.0)' ignored 
/tmp/ccrQcqYy.s:139: Error: parse error -- statement 
`movel d0,(sp.0)' ignored 
/tmp/ccrQcqYy.s:143: Error: parse error -- statement `addql #1,(sp.0)' 
ignored 
/tmp/ccrQcqYy.s:146Errorparse error -- statement `movel (sp.0),a0' ignored 
/tmp/ccrQcqYy.s:150: Error: parse error -- statement 
`movel d0,(sp.0)' ignored 
make[2]: *** [large_data_020/libc_objs/unistd_getopt.o] Error 1


It builds without that file (and also with newer gcc, but that has an unimaginable number of more serious issues). Help?

Go to top
Re: clib2 build for 68k fails
Home away from home
Home away from home


See User information
@Chris

are you building natively or cross compiling? could the wrong 'as' be being called?


Go to top
Re: clib2 build for 68k fails
Amigans Defender
Amigans Defender


See User information
@broadblues

Cross-compiling, so it's a possibility, but I'd expect all the other files to fail too if that was the case?

Go to top
Re: clib2 build for 68k fails
Amigans Defender
Amigans Defender


See User information
OK, I found the problem. Looks like gcc was getting confused with a variable called "sp", which I can only assume (from a brief glance at a 68000 programming book I have within reach) that it thought it was referencing a stack pointer. Changed it to spp, et voila - working! Well, "building" - "working" might be too strong a word since I haven't tested it yet.

Go to top
Re: clib2 build for 68k fails
Just can't stay away
Just can't stay away


See User information
@Chris

"sp" is the same as a7 which is the register that holds the stack pointer.

Go to top
Re: clib2 build for 68k fails
Amigans Defender
Amigans Defender


See User information
@salass00

Interesting, but I thought you had to explicitly declare variables as registers in gcc? REG(A7) or __reg(a7) or something?

Go to top
Re: clib2 build for 68k fails
Home away from home
Home away from home


See User information
@Chris

Seems very odd that the name of a C variable interfered with the asm output, seems like a GCC bug to me.


Go to top
Re: clib2 build for 68k fails
Just can't stay away
Just can't stay away


See User information
@broadblues

Quote:

Seems very odd that the name of a C variable interfered with the asm output, seems like a GCC bug to me.


Not sure if I would classify it as a bug but I've run into this problem before. IIRC it only happens for static local variables. The reason is that gcc doesn't add an underscore in front of the label name for those.

Go to top
Re: clib2 build for 68k fails
Amigans Defender
Amigans Defender


See User information
Well, it builds with newer GCC so it probably is/was a GCC bug. Newer GCC doesn't build any sort of usable 68k code for AmigaOS though, not helped by the fact there are a gazillion patches for the older versions, none of which have been pushed back upstream. Oh well, not my problem (or at least, not a problem I have any intention of getting involved with).

I've raised my issue and the solution on the official clib2 bugtracker.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project