On Mon, Sep 03, 2012 at 10:52:57AM -0400, Greg Troxel wrote: > > I looked at the -S output. Basically, I built each way, and then did: > > rm auth.lo auth.o > gmake -n | sed -e 's/ -c / -S /' | sh > > which put the source in auth.o (and then the link failed). > > Compilation with -O1/-O2 and with/without the gcc hardening are at: > > http://www.lexort.com/pkgsrc/libotr/ > > The files are somewhat similar in size, but otrl_auth_handle_revealsig > is only about 1/4 as long in the O2/with case, and it seems it just left > out a lot of the function. > So this is 99.9% clearly a gcc bug. > > Using built-in specs. > Target: i386--netbsdelf > Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc4/configure > --enable-long-long --disable-multilib --enable-threads --disable-symvers > --build=x86_64-unknown-netbsd4.99.72 --host=i386--netbsdelf > --target=i386--netbsdelf --enable-__cxa_atexit > Thread model: posix > gcc version 4.1.3 20080704 prerelease (NetBSD nb3 20111107)
OK, then I guess the thing to do is just to turn off hardening for that build environment? [I believe the hardening is only actually enabled when -O2 is on, regardless of whether the compiler options are specified or not, so turning it to -O1 or -O0 will also turn off hardening, so you may as well just turn off the hardening and leave it at -O2.] Thanks, - Ian _______________________________________________ OTR-dev mailing list OTR-dev@lists.cypherpunks.ca http://lists.cypherpunks.ca/mailman/listinfo/otr-dev