Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Building gcc 8 for QNX 6.6: (8 Items)
   
Building gcc 8 for QNX 6.6  
Things seem to generally build well until I get to the point of building libgcc using xgcc.  It tries to build unwind-
dw2.c using position independent code and the assembler chokes on the resulting assembly file. 

/tmp/cciOo4Io.s: Assembler messages:
/tmp/cciOo4Io.s:67: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:68: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:69: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:70: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1566: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1567: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1568: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1569: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1570: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1571: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1572: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1573: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1574: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1575: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1576: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1577: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1578: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1579: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1580: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1581: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1582: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1583: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1584: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1585: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1586: Error: invalid operands (.text and .text.unlikely sections) for `-'
/tmp/cciOo4Io.s:1587: Error: invalid operands (.text and .text.unlikely sections) for `-'


Some of the lines in the resulting assembly that this errors out on are:

	.long	_GLOBAL_OFFSET_TABLE_+[.-.L7]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L18]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L12]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L7]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L5]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L4]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L4]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L4]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L4]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L19]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L8]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L7]
	.long	_GLOBAL_OFFSET_TABLE_+[.-.L5]

Ideas?

Thanks
Kevin
Re: Building gcc 8 for QNX 6.6  
I think I have this issue sorted, bin utils needed an update, now using 2.30.

However, there is one other issue I seem to be having.  The include paths for building the gcc libraries is not 
including c_compatibility.  This is preventing inclusions of header files such as math.h.

Any feed back on this is appreciated.

Thanks
Kevin
Re: Building gcc 8 for QNX 6.6  
c_model in configure.host is set to 'c' instead of the default 'c_global'.  This is preventing include paths for 
c_compatibility (which I think would include the correct math.h).  I know there is probably a really good reason to have
 it set to 'c' for QNX....
Re: Building gcc 8 for QNX 6.6  
Clearly I am doing something wrong, but I am not sure what it is.

I tried building the 660_release and I am running into the same header file inclusion issues.

It seems that xgcc when building the libraries is also including the headers from the /usr/include directory of the 
qnx660 target, and that this is messing things up.

The question I need answered is:  When building libstdc++-v3 using xgcc, should xgcc be including headers from the 
qnx660 installation or from some other source?

Thanks
Kevin
Re: Building gcc 8 for QNX 6.6  
Okay, got it all to build.

Attached is my build_hooks file modified to build for qnx6.6

It turns out my main problem was that the libstdc++-v3/include/c directory was missing some files.  They were present in
 the libstdc++-v3/include/c_global directory.  

I used the gcc 5.2 sources to see that the missing files didn't appear to have significant differences between 5.2's c 
and c_global directory, so I merely copied them from 8.2's c_global to 8.2's c directory and it magically built.

Hope this helps someone who ventures down this road.

Attachment: Text build-hooks 6.95 KB
Re: Building gcc 8 for QNX 6.6  
I should add, that I haven't tested this yet, I am currently validating that it installed and I can run the compiler 
with qcc.  I think this may still be an issue.  Once I get everything working, I'll write up any details that are 
necessary to make it work.

At this point I suspect I need to create some gcc spec files (duplicate the 4.7.3 versions perhaps).  I also don't see 
where the latest gcc libraries (libstdc++ for example) were installed.

Just diving into what got built.
Re: Building gcc 8 for QNX 6.6  
Hi Kevin Stallard! Have you succeed with creating config files for qcc? Can you run the compiler with new qcc?
Re: Building gcc 8 for QNX 6.6  
*Can you run the new compiler with qcc?