Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 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

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

Your Answer


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.