[Tinyos-help] BUG: tinyos-2 libtoscomm.so needs -fPIC flag (w/patch)

Chad Metcalf metcalfc at gmail.com
Tue Jan 9 18:35:32 PST 2007


According to the nice people at libtool (ltmain.sh).

     827     # On Cygwin there's no "real" PIC flag so we must build
both object types
     828     case $host_os in
     829     cygwin* | mingw* | pw32* | os2*)
     830       pic_mode=default
     831       ;;
     832     esac
     833     if test "$pic_mode" = no && test "$deplibs_check_method"
!= pass_all; then
     834       # non-PIC code in shared libraries is not supported
     835       pic_mode=default
     836     fi
     837

So maybe on Cygwin it doesn't matter.

Chad


On 1/9/07, Mr. Jonathan A. Gomez <jon.gomez.04 at cnu.edu> wrote:
>
> 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.
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


-- 
Chad @ Home


More information about the Tinyos-help mailing list