NeXT Computers Forum Index NeXT Computers
www.NeXTComputers.org
 
Log in to check your private messagesLog in to check your private messages

Log inLog in  RegisterRegister


Profile  Search  Memberlist  FAQ  Usergroups
GCC 3.2.3 / 3.4.6 - almost there!
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    NeXT Computers Forum Index -> Porting New Software
View previous topic :: View next topic  
Author Message
rjbrown99



Joined: 14 Apr 2007
Posts: 12
Location: Santa Monica, CA

PostPosted: Sat Nov 21, 2015 12:52 am    Post subject: cctools Reply with quote

Trying to recompile cctools 435.4 using your patch with GCC 2.95.3. I ran into an issue whereby I had to plunk this into the headers:

#define __private_extern__ extern

Not sure how you defined that or where, but after I defined it the compile made a lot more progress.

I am now on the step where it builds libstuff, but when it runs into the libstuff/dynamic_obj subdir it runs into a neverending loop of parsing/token reading/shifting tokens. Example:

Code:
Starting parse^M
Entering state 0^M
Reading a token: Next token is 260 (SCSPEC)^M
Reducing via rule 3 (line 247),  -> @1^M
state stack now 0^M
Entering state 2^M
Next token is 260 (SCSPEC)^M
Shifting token 260 (SCSPEC), Entering state 6^M
Reducing via rule 133 (line 888), SCSPEC  -> declmods^M
state stack now 0 2^M
Entering state 30^M
Reading a token: Next token is 261 (TYPESPEC)^M
Shifting token 261 (TYPESPEC), Entering state 7^M
Reducing via rule 140 (line 923), TYPESPEC  -> typespec^M
state stack now 0 2 30^M
Entering state 78^M
Reducing via rule 129 (line 869),  -> reserved_declspecs^M
state stack now 0 2 30 78^M
Entering state 197^M


Any suggestions? I left it for hours and hours and it just kept rolling with this process.
Back to top
View user's profile Send private message
gregwtmtno



Joined: 28 Aug 2011
Posts: 19

PostPosted: Sat Nov 21, 2015 5:53 am    Post subject: Reply with quote

Maybe this conversation will help you identify the problem?

https://gcc.gnu.org/ml/gcc-patches/2004-01/msg02724.html
Back to top
View user's profile Send private message
t-rexky



Joined: 09 Jan 2011
Posts: 272
Location: Snowy Canada

PostPosted: Sat Nov 21, 2015 5:56 pm    Post subject: Reply with quote

Please note that I compiled the cctools package with a modified (hacked) OS 4.2 gcc compiler. Just like with the subsequent Apple versions of the gcc compilers it has numerous customizations and modifications. Compiling with 'stock' gcc is almost guaranteed to cause issues, such as with the private extern which is a NeXT / Apple special used during linking. It's like a local-global symbol: global to all the linked modules but local to the final linked object so it does not clash with the real globals in the libraries...

I don't remember if I posted the hacked gcc binary packages and source, but I can make it available if required. Just don't use it for objc because it will fail miserably, but plain C works well. I had to do a circus to make it all work since there is a circular reference: the OS 4.2 gcc requires the new cctools to compile and you require the OS 4.2 gcc to compile the cctools. I solved that by compiling the minimal required cctools binaries for NS on OS, moving them over to my NS box and then building the hacked OS 4.2 compiler on NS. I finally rebuilt the cctools on NS with that hacked compiler.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NeXT Computers Forum Index -> Porting New Software All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
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 © 2017 phpBB Group