Need a code review

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Aug 12 01:20:07 UTC 2008


On Mon, 11 Aug 2008 21:28:16 +0300, Oleksandr Tymoshenko <gonzo at freebsd.org> wrote:
> Dag-Erling Smørgrav wrote:
>> Oleksandr Tymoshenko <gonzo at freebsd.org> writes:
>>> Here is new fix: http://people.freebsd.org/~gonzo/mips2/libpam2.diff
>>> The idea is to set define explicitly for dynamic case rather then rely
>>> on __PIC__.
>>
>> This is completely backwards.  Dynamic is the default option, and in
>> fact the only supported option on many (non-FreeBSD) systems.  If it
>> were up to me, I would remove support for statically linked modules
>> entirely.
>
> OK, so the static case is the one to be marked explicitly. Here is the
> next patch: http://people.freebsd.org/~gonzo/mips2/libpam3.diff Drop
> NO_STATIC_MODULES since it's a default and add PAM_STATIC_MODULES to
> request static modules build.

IMHO, since the #ifdef'ed part in openpam.h mentions "gcc static
linking", it would probably be nice to keep the __GNUC__ part in

-#if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES)
+#if defined(PAM_STATIC_MODULES)
 /* gcc, static linking */

and write it as

-#if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES)
+#if defined(__GNUC__) && defined(PAM_STATIC_MODULES)
 /* gcc, static linking */



More information about the freebsd-arch mailing list