[Tinyos-help] BUG: tinyos-2 libtoscomm.so needs -fPIC flag
(w/patch)
Mr. Jonathan A. Gomez
jon.gomez.04 at cnu.edu
Tue Jan 9 17:38:22 PST 2007
I looked at the documentation of gcc at
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc
and found the options described in section 3.18.
>From what I can tell, the difference between the two options -fpic and
-fPIC has to do with whether it checks for system-dependent restrictions
on the size of the global offset table that would be generated, avoiding
creating PIC code in that case.
If says for the -fpic flag: "If the GOT size for the linked executable
exceeds a machine-specific maximum size, you get an error message from
the linker indicating that -fpic does not work; in that case, recompile
with -fPIC instead. (These maximums are 8k on the SPARC and 32k on the
m68k and RS/6000. The 386 has no such limit.)".
I don't know much about cygwin, but it sounds like the usage of these
two different flags is a bit more of an issue than just cygwin vs.
linux. It sounds like it is somewhat architecture-specific too.
"This option makes a difference on the m68k, PowerPC, and SPARC".
The full text for the options, of course, is available at the link
above by going to the appropriate section.
I tried to look up -fpic/PIC on cygwin, but I wasn't having much
success. I'd love to know where to get references.
Sincerely,
Jon.
More information about the Tinyos-help
mailing list