Date: Sat, 21 Feb 2004 22:43:38 -0500 From: Hendrik Scholz <hscholz@raisdorf.net> To: freebsd-amd64@freebsd.org Subject: Re: CFLAGS+= -fPIC per default? Message-ID: <4CC57F17-64E9-11D8-ACAA-000A95BAD088@raisdorf.net> In-Reply-To: <c195u3$2q5s$1@kemoauc.mips.inka.de> References: <BD6DAE5F-64A6-11D8-ACAA-000A95BAD088@raisdorf.net> <c195u3$2q5s$1@kemoauc.mips.inka.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 21, 2004, at 9:59 PM, Christian Weisgerber wrote: > Why are these shared objects not built with -fPIC in the first place? Ask the authors of the third party applications :) Most architectures don't need -fPIC and/or it slows them down (thanks for the comment Peter!). The ports I've dealt with either use a hand written Makefile without honoring CFLAGS set in the environment or without having -fPIC set since i386 (I guess that is what most of the guys test and run their stuff on) doesn't need it. Ports utilizing GNU configure may check if -fPIC is supported but usually don't set it since it's not needed on the developers system. Btw: Just found this in man gcc on Mac OS 10.3: -fPIC If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table. This option makes a difference on the m68k, m88k, and the SPARC. Position-independent code requires special support, and therefore works only on certain machines. -fPIC is the default on Darwin and Mac OS X. This might be the reason why I didn't see all the -fPIC patches in darwinports. Hendrik -- Hendrik Scholz - hscholz@raisdorf.net - http://www.raisdorf.net/ cell phone: 404-606-5324 (US) 0160-1570-272 (DE)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CC57F17-64E9-11D8-ACAA-000A95BAD088>