Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The gcc compiler use target-triplets for cross-compilation. I see some of these target triples like "x86_64-pc-linux-gnu" (the most common). I understand what means but I don't know how specify another unix-like system instead "linux-gnu". Is there any document for it? and the "pc" seems be optional (should I care about this?), when I run a "config.guess" script, it returns me "x86_64-unknown-linux-gnu".

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

In order to cross compile, you must have (or build) a cross-compiler; gcc cannot, by default, just build for any target that it could be configured for. There is a list of possibilities in the gcc source package, I believe.

Building a cross compiler toolchain is not a simple undertaking, so if you want to do that, you have to decide what it's for and ask more specific questions.

There's also a list of hosts/targets with notes here. An asterisk indicates that any value can be used in that position (presumably this makes no difference to the compiler, and is simply a user defined label); the pc you are talking about may be such.

share|improve this answer
    
Thanks, This is exactly what I looking for –  Danilo Jun 17 '13 at 0:47
add comment

config.guess is the document, actually. But simply building a cross-gcc won't get you far if you don't also have the libraries for the target system.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.