On 3/9/2013 09:41, JonY wrote: > On 3/9/2013 06:20, Erik de Castro Lopo wrote: >> bat guano wrote: >> >>> >>> Hi >>> I have a problem now cross-compiling FLAC from latest git. >>> With Ubuntu 12.04 and g++-mingw-w64-i686 (4.6.3-1ubuntu5+5ubuntu1). >>> >>> I think that the problem might have been introduced on 5 Mar 2013 >>> with commit 05609d5 (configure.ac : Add hardening compile options.) >> >> That was fixed with >> >> commit d5b03bcc36474ff1c9f2da2dcb5212e810208a6f >> Author: Erik de Castro Lopo <er...@mega-nerd.com> >> Date: Sat Mar 9 08:55:37 2013 +1100 >> >> configure.ac : Don't enable stack protector for mingw* host_os. >> > > Hi, > > Please do a link time test instead, I am not getting this error and > would like to keep stack protector on. > > The test case below will trigger ___stack_chk_guard to emit. > > int main(){ > int i = 0; > char a[1000]; > while(1){ > a[i] = 0; > i++; > } > } > > "i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=2 -fstack-protector --param > ssp-buffer-size=4 -v" shows that libssp is already added. > >
Alternatively, to include __stack_chk_fail, use: extern void __stack_chk_guard(); extern void __stack_chk_fail(); int main(){ void (*ssp[]) = { __stack_chk_guard, __stack_chk_fail }; return 0; }
signature.asc
Description: OpenPGP digital signature
_______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev