RE: -pthread support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maggie wrote:

> When I use the generated cross-compiler cc1 instead of gcc, it
> doesn't support -pthread command.
>
> cc1: error: unrecognized command line option "-pthread"

-pthread has different meanings for different targets and affects the link step as well as the compile. The option is handled by gcc, the compiler driver, not cc1 which is the C-compiler backend and does not see the link step. gcc converts -pthread into options that cc1 understands - usually a define -D_REENTRANT - but this will vary depending on the OS or specifically the C library that you are targeting. Normally you'd run the compiler driver built for your cross compiler, probably called or32-gcc, rather than cc1 directly. 

Ian's questions from the GCC list still stand: do you have a specific reason for invoking cc1 directly, rather than the or32-gcc executable? If you are running or32-gcc then please let us know the exact command line you're trying to use and the exact error you see so we can try and help. If you do have a valid reason for running cc1 rather than or32-gcc, you could try running your compile once through 'or32-gcc -v -pthread' to see what the compiler has added for -pthread, or you can try and read this out of the compiler specs file. But if you've made significant c

Rup.



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux