FS#20647 - [lib32-zlib] PKGBUILD doesn't remove optimization flags
Attached to Project:
Community Packages
Opened by Ng Oon-Ee (ngoonee) - Saturday, 28 August 2010, 05:48 GMT
Last edited by Ionut Biru (wonder) - Tuesday, 31 August 2010, 23:25 GMT
Opened by Ng Oon-Ee (ngoonee) - Saturday, 28 August 2010, 05:48 GMT
Last edited by Ionut Biru (wonder) - Tuesday, 31 August 2010, 23:25 GMT
|
Details
Description:
PKGBUILD for lib32-zlib removes -O2 but adds -O3 to the CFLAGS variable, causing segfault. Additional info: * package version(s) 1.2.5.3 ([multilib] version) * config and/or log files etc. Steps to reproduce: makepkg lib32-zlib, the -O3 flag is clearly used. |
This task depends upon
Closed by Ionut Biru (wonder)
Tuesday, 31 August 2010, 23:25 GMT
Reason for closing: Fixed
Additional comments about closing: lib32-zlib-1.2.5-4
Tuesday, 31 August 2010, 23:25 GMT
Reason for closing: Fixed
Additional comments about closing: lib32-zlib-1.2.5-4
http://mail.madler.net/pipermail/zlib-devel_madler.net/2010-May/002277.html
http://mail.madler.net/pipermail/zlib-devel_madler.net/2010-May/002281.html
<brain0> this is a problem when combining SSE, -O3 and -free-vectorize
<brain0> we could try to add -fno-tree-vectorize to CFLAGS
Apparently the bug is in gcc 4.5.0, see http://mail.madler.net/pipermail/zlib-devel_madler.net/2010-May/002268.html
A possible workaround should be to build zlib with the following flags:
-O3 and -free-vectorize or -03 and -mstackrealign
export CFLAGS="${CFLAGS/-O2/-O3 -fno-tree-vectorize} -DUNALIGNED_OK"
the segfault does not occur with my app. I leave it up to wonder to decide whether this is a 'fix' or (more likely) just a hack.