bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

solution to errors installing gcc-3.2.2 on host with >gcc

 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
cyphunk



Joined: 09 Mar 2009
Posts: 6

PostPosted: Mon Mar 09, 2009 11:44 pm    Post subject: solution to errors installing gcc-3.2.2 on host with >gcc Reply with quote

Ran into two erros when installing the gcc version recommended on the bladox site (3.3.2) with my linux host which has gcc 4.1.2.

Error 1:
Quote:
./read-rtl.c:653: error: invalid lvalue in increment

Solution:
This is a problem relating to casting and required editing two lines as suggested here:
diff -u -r1.1.1.1 obstack.h
Code:
--- obstack.h   23 Jul 2003 02:42:35 -0000      1.1.1.1
+++ obstack.h   22 Jan 2006 12:41:15 -0000
@@ -423,7 +423,8 @@
 ({ struct obstack *__o = (OBSTACK);                                    \
    if (__o->next_free + sizeof (void *) > __o->chunk_limit)            \
      _obstack_newchunk (__o, sizeof (void *));                         \
-   *((void **)__o->next_free)++ = ((void *)datum);                     \
+   *((void **)__o->next_free) = ((void *)datum);                       \
+   __o->next_free += sizeof(void *);                                   \
    (void) 0; })


Error 2:
Quote:
config/avr/libgcc.S: Assembler messages:
config/avr/libgcc.S:72: Error: suffix or operands invalid for `clr'
config/avr/libgcc.S:72: Error: no such instruction: `clear result'
config/avr/libgcc.S:74: Error: no such instruction: `sbrc r24,0'
config/avr/libgcc.S:75: Error: too many memory references for `add'


Solution:
The xgcc compiler had trouble finding the avr-binutils. Running strace on the failed compile shows it looks for it in <builddir>/gcc/avr/3.3.2/. I'm sure there is a smarter way to solve this but instead of reading man pages I linked /usr/local/bin/avr-as to <builddir>/gcc/avr/3.3.2/as along with the other avr functions in the /usr/local/bin directory.

after this GCC compiled just fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group