Compiling error in PAM

Damian Gerow dgerow at afflictions.org
Fri Dec 19 11:36:46 PST 2003


Thus spake Ulrich Spoerlein (q at uni.de) [19/12/03 14:27]:
: > i try to compile 5.2 (cvsed) on a 5.1 machine. When i do so i get this error:
: > 
: > /usr/src/lib/libpam/modules/pam_echo/pam_echo.c: In function `_pam_echo':
: > /usr/src/lib/libpam/modules/pam_echo/pam_echo.c:92: warning: dereferencing type-punned pointer will break strict-aliasing rules
: > *** Error code 1
: 
: You are not giving the command leading to this error, but I suspect it's
: because of CFLAGS=-02.
: 
: Please note that optimizations other than -O are NOT supported.

There was a lot of discussion about this not too long ago, and the
final conclusions was that while it is not supported, the PAM code is
actually breaking the strict aliasing rules.  For some reason, GCC only
picks this up when -O2 or higher is enabled.

I /think/ DES committed some code to fix the breakage, so it will now
compile with -O2, but the official stance is still: don't use -O2, it's
unsupported.


More information about the freebsd-current mailing list