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.) >Resending, likely caught by filters. 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; } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 834 bytes Desc: OpenPGP digital signature Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130310/8430c1a5/attachment-0001.pgp
Please do a link time test instead... The test case below... Hi I am not a programmer/developer. Much more info needed.
JonY wrote:> Please do a link time test instead, I am not getting this error and > would like to keep stack protector on.I'll write an m4 macro. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On 3/10/2013 02:31, bat guano wrote:> > > > Please do a link time test instead... > > The test case below... > > Hi > I am not a programmer/developer. > Much more info needed. > >Yes, the message was for the developers. Right now it is disabled for mingw* although SSP works perfectly fine on some mingw install (depending on gcc configuration), hence the need to do a link test. Your mingw gcc install likely has SSP disabled. Contact your installation provider or package maintainer if you did not build it yourself. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 834 bytes Desc: OpenPGP digital signature Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130310/d43890e8/attachment.pgp
Erik de Castro Lopo wrote:> JonY wrote: > > > Please do a link time test instead, I am not getting this error and > > would like to keep stack protector on. > > I'll write an m4 macro.I have attampted to write a macro that reliably detects the availability of stack smash protection. I currently have two configurations where my detection says that SSP is available but the compile fails: - MinGW cross compile from Linux to Windows. - Native FreeBSD compile. Not sure what to do from here. I think I'll probably have to disable this for this upcoming release. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/