![](https://secure.gravatar.com/avatar/359652f5d5394fdc76fea714c0e40c97.jpg?s=120&d=mm&r=g)
Hi it would be nice only send mails to the list because you break threading.... Am 21.01.2017 um 22:54 schrieb Vladislav Vaintroub:
On 1/21/2017 6:23 PM, Reindl Harald wrote:
Am 21.01.2017 um 06:59 schrieb Reindl Harald:
why does MariaDB use "-g -static-libgcc" in "mysql_release.cmake" and so besides override -g0 break -flto builds?
I think you might be misunderstanding the purpose of mysql_release.cmake it is there to simplify the build of release packages, for us. If you want to build exactly like our release package are build, use
thanks for the hint, years ago i forked the rpm-spec from Fedora, removed that now
cmake <path-to-source> -DBUILD_CONFIG=mysql_release make package
If you want something special, do not use it.
cmake <path-to-source> make package
This provides a good baseline (builds with RelWithDebInfo build type, i.e optimized with debug info) you can add your flags on top of that
sorry but no - it don't provide a good baseline at all setting -O3 unconditional and the why you removed from your quotes anyways, it still overrides and -flto fails "-fstack-protector --param=ssp-buffer-size=4 -fno-exceptions -fno-rtti -O2 -g" is not supposed to be here the build below was with "-DWITH_PIC=NO" and with "-DWITH_PIC=YES" you can see even a lot of lto-mismatch-errors before the build breaks as i tried also switch to -O2 in general with no success for -flto ________________________________________________ supposed CFLAGS + export 'CFLAGS=-m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mavx -mfpmath=sse -msse2avx -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -fno-strict-aliasing -fno-gcse-after-reload -fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-peel-loops -fno-predictive-commoning -fno-tree-loop-distribute-patterns -fno-unswitch-loops -fPIC -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fno-exceptions -fno-rtti -flto -ffat-lto-objects -fuse-linker-plugin -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wno-stack-protector -Wa,--noexecstack' + export 'SH_LDFLAGS=-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,nodump -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mavx -mfpmath=sse -msse2avx -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -fno-strict-aliasing -fno-gcse-after-reload -fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-peel-loops -fno-predictive-commoning -fno-tree-loop-distribute-patterns -fno-unswitch-loops -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fno-exceptions -fno-rtti -flto -ffat-lto-objects -fuse-linker-plugin -Wa,--noexecstack' + SH_LDFLAGS='-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,nodump -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mavx -mfpmath=sse -msse2avx -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -fno-strict-aliasing -fno-gcse-after-reload -fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-peel-loops -fno-predictive-commoning -fno-tree-loop-distribute-patterns -fno-unswitch-loops -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fno-exceptions -fno-rtti -flto -ffat-lto-objects -fuse-linker-plugin -Wa,--noexecstack' + LDFLAGS='-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,nodump -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mavx -mfpmath=sse -msse2avx -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -fno-strict-aliasing -fno-gcse-after-reload -fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-peel-loops -fno-predictive-commoning -fno-tree-loop-distribute-patterns -fno-unswitch-loops -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fno-exceptions -fno-rtti -flto -ffat-lto-objects -fuse-linker-plugin -Wa,--noexecstack -pie -fPIE' ________________________________________________ [ 54%] Building CXX object storage/xtradb/CMakeFiles/xtradb.dir/ut/ut0vec.cc.o cd /home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb && /usr/bin/c++ -DHAVE_BZIP2=1 -DHAVE_CONFIG_H -DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS_64=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS_BYTE=1 -DHAVE_IB_GCC_ATOMIC_TEST_AND_SET=1 -DHAVE_IB_GCC_ATOMIC_THREAD_FENCE=1 -DHAVE_IB_GCC_SYNC_SYNCHRONISE=1 -DHAVE_LZ4=1 -DHAVE_LZMA=1 -DHAVE_LZO=1 -DLINUX_NATIVE_AIO=1 -DSIZEOF_PTHREAD_T=8 -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/include -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/include -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/handler -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/sql -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mavx -mfpmath=sse -msse2avx -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -fno-strict-aliasing -fno-gcse-after-reload -fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-peel-loops -fno-predictive-commoning -fno-tree-loop-distribute-patterns -fno-unswitch-loops -fPIC -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fno-exceptions -fno-rtti -flto -ffat-lto-objects -fuse-linker-plugin -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wno-stack-protector -Wa,--noexecstack -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -fno-exceptions -fno-rtti -O2 -g -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -DUNIV_LINUX -D_GNU_SOURCE=1 -o CMakeFiles/xtradb.dir/ut/ut0vec.cc.o -c /home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/ut/ut0vec.cc [ 54%] Building CXX object storage/xtradb/CMakeFiles/xtradb.dir/ut/ut0wqueue.cc.o cd /home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb && /usr/bin/c++ -DHAVE_BZIP2=1 -DHAVE_CONFIG_H -DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS_64=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS_BYTE=1 -DHAVE_IB_GCC_ATOMIC_TEST_AND_SET=1 -DHAVE_IB_GCC_ATOMIC_THREAD_FENCE=1 -DHAVE_IB_GCC_SYNC_SYNCHRONISE=1 -DHAVE_LZ4=1 -DHAVE_LZMA=1 -DHAVE_LZO=1 -DLINUX_NATIVE_AIO=1 -DSIZEOF_PTHREAD_T=8 -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/include -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/include -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/handler -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/sql -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mavx -mfpmath=sse -msse2avx -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -fno-strict-aliasing -fno-gcse-after-reload -fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-peel-loops -fno-predictive-commoning -fno-tree-loop-distribute-patterns -fno-unswitch-loops -fPIC -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fno-exceptions -fno-rtti -flto -ffat-lto-objects -fuse-linker-plugin -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wno-stack-protector -Wa,--noexecstack -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -fno-exceptions -fno-rtti -O2 -g -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -DUNIV_LINUX -D_GNU_SOURCE=1 -o CMakeFiles/xtradb.dir/ut/ut0wqueue.cc.o -c /home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/ut/ut0wqueue.cc [ 54%] Building CXX object storage/xtradb/CMakeFiles/xtradb.dir/ut/ut0timer.cc.o cd /home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb && /usr/bin/c++ -DHAVE_BZIP2=1 -DHAVE_CONFIG_H -DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS_64=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS_BYTE=1 -DHAVE_IB_GCC_ATOMIC_TEST_AND_SET=1 -DHAVE_IB_GCC_ATOMIC_THREAD_FENCE=1 -DHAVE_IB_GCC_SYNC_SYNCHRONISE=1 -DHAVE_LZ4=1 -DHAVE_LZMA=1 -DHAVE_LZO=1 -DLINUX_NATIVE_AIO=1 -DSIZEOF_PTHREAD_T=8 -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/include -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/include -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/handler -I/home/builduser/rpmbuild/BUILD/mariadb-10.1.21/sql -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mavx -mfpmath=sse -msse2avx -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -fno-strict-aliasing -fno-gcse-after-reload -fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-peel-loops -fno-predictive-commoning -fno-tree-loop-distribute-patterns -fno-unswitch-loops -fPIC -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fno-exceptions -fno-rtti -flto -ffat-lto-objects -fuse-linker-plugin -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wno-stack-protector -Wa,--noexecstack -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -fno-exceptions -fno-rtti -O2 -g -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -DUNIV_LINUX -D_GNU_SOURCE=1 -o CMakeFiles/xtradb.dir/ut/ut0timer.cc.o -c /home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb/ut/ut0timer.cc [ 55%] Linking CXX static library libxtradb.a cd /home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb && /usr/bin/cmake -P CMakeFiles/xtradb.dir/cmake_clean_target.cmake cd /home/builduser/rpmbuild/BUILD/mariadb-10.1.21/storage/xtradb && /usr/bin/cmake -E cmake_link_script CMakeFiles/xtradb.dir/link.txt --verbose=1 /usr/bin/ar qc libxtradb.a CMakeFiles/xtradb.dir/api/api0api.cc.o CMakeFiles/xtradb.dir/api/api0misc.cc.o CMakeFiles/xtradb.dir/btr/btr0btr.cc.o CMakeFiles/xtradb.dir/btr/btr0cur.cc.o CMakeFiles/xtradb.dir/btr/btr0pcur.cc.o CMakeFiles/xtradb.dir/btr/btr0scrub.cc.o CMakeFiles/xtradb.dir/btr/btr0sea.cc.o CMakeFiles/xtradb.dir/btr/btr0defragment.cc.o CMakeFiles/xtradb.dir/buf/buf0buddy.cc.o CMakeFiles/xtradb.dir/buf/buf0buf.cc.o CMakeFiles/xtradb.dir/buf/buf0dblwr.cc.o CMakeFiles/xtradb.dir/buf/buf0checksum.cc.o CMakeFiles/xtradb.dir/buf/buf0dump.cc.o CMakeFiles/xtradb.dir/buf/buf0flu.cc.o CMakeFiles/xtradb.dir/buf/buf0lru.cc.o CMakeFiles/xtradb.dir/buf/buf0rea.cc.o CMakeFiles/xtradb.dir/buf/buf0mtflu.cc.o CMakeFiles/xtradb.dir/data/data0data.cc.o CMakeFiles/xtradb.dir/data/data0type.cc.o CMakeFiles/xtradb.dir/dict/dict0boot.cc.o CMakeFiles/xtradb.dir/dict/dict0crea.cc.o CMakeFiles/xtradb.dir/dict/dict0dict.cc.o CMakeFiles/xtradb.dir/dict/dict0load.cc.o CMakeFiles/xtradb.dir/dict/dict0mem.cc.o CMakeFiles/xtradb.dir/dict/dict0stats.cc.o CMakeFiles/xtradb.dir/dict/dict0stats_bg.cc.o CMakeFiles/xtradb.dir/dyn/dyn0dyn.cc.o CMakeFiles/xtradb.dir/eval/eval0eval.cc.o CMakeFiles/xtradb.dir/eval/eval0proc.cc.o CMakeFiles/xtradb.dir/fil/fil0fil.cc.o CMakeFiles/xtradb.dir/fil/fil0pagecompress.cc.o CMakeFiles/xtradb.dir/fil/fil0crypt.cc.o CMakeFiles/xtradb.dir/fsp/fsp0fsp.cc.o CMakeFiles/xtradb.dir/fut/fut0fut.cc.o CMakeFiles/xtradb.dir/fut/fut0lst.cc.o CMakeFiles/xtradb.dir/ha/ha0ha.cc.o CMakeFiles/xtradb.dir/ha/ha0storage.cc.o CMakeFiles/xtradb.dir/ha/hash0hash.cc.o CMakeFiles/xtradb.dir/fts/fts0fts.cc.o CMakeFiles/xtradb.dir/fts/fts0ast.cc.o CMakeFiles/xtradb.dir/fts/fts0blex.cc.o CMakeFiles/xtradb.dir/fts/fts0config.cc.o CMakeFiles/xtradb.dir/fts/fts0opt.cc.o CMakeFiles/xtradb.dir/fts/fts0pars.cc.o CMakeFiles/xtradb.dir/fts/fts0que.cc.o CMakeFiles/xtradb.dir/fts/fts0sql.cc.o CMakeFiles/xtradb.dir/fts/fts0tlex.cc.o CMakeFiles/xtradb.dir/handler/ha_innodb.cc.o CMakeFiles/xtradb.dir/handler/handler0alter.cc.o CMakeFiles/xtradb.dir/handler/i_s.cc.o CMakeFiles/xtradb.dir/handler/xtradb_i_s.cc.o CMakeFiles/xtradb.dir/ibuf/ibuf0ibuf.cc.o CMakeFiles/xtradb.dir/lock/lock0iter.cc.o CMakeFiles/xtradb.dir/lock/lock0lock.cc.o CMakeFiles/xtradb.dir/lock/lock0wait.cc.o CMakeFiles/xtradb.dir/log/log0log.cc.o CMakeFiles/xtradb.dir/log/log0online.cc.o CMakeFiles/xtradb.dir/log/log0recv.cc.o CMakeFiles/xtradb.dir/log/log0crypt.cc.o CMakeFiles/xtradb.dir/mach/mach0data.cc.o CMakeFiles/xtradb.dir/mem/mem0mem.cc.o CMakeFiles/xtradb.dir/mem/mem0pool.cc.o CMakeFiles/xtradb.dir/mtr/mtr0log.cc.o CMakeFiles/xtradb.dir/mtr/mtr0mtr.cc.o CMakeFiles/xtradb.dir/os/os0file.cc.o CMakeFiles/xtradb.dir/os/os0proc.cc.o CMakeFiles/xtradb.dir/os/os0sync.cc.o CMakeFiles/xtradb.dir/os/os0thread.cc.o CMakeFiles/xtradb.dir/os/os0stacktrace.cc.o CMakeFiles/xtradb.dir/page/page0cur.cc.o CMakeFiles/xtradb.dir/page/page0page.cc.o CMakeFiles/xtradb.dir/page/page0zip.cc.o CMakeFiles/xtradb.dir/pars/lexyy.cc.o CMakeFiles/xtradb.dir/pars/pars0grm.cc.o CMakeFiles/xtradb.dir/pars/pars0opt.cc.o CMakeFiles/xtradb.dir/pars/pars0pars.cc.o CMakeFiles/xtradb.dir/pars/pars0sym.cc.o CMakeFiles/xtradb.dir/que/que0que.cc.o CMakeFiles/xtradb.dir/read/read0read.cc.o CMakeFiles/xtradb.dir/rem/rem0cmp.cc.o CMakeFiles/xtradb.dir/rem/rem0rec.cc.o CMakeFiles/xtradb.dir/row/row0ext.cc.o CMakeFiles/xtradb.dir/row/row0ftsort.cc.o CMakeFiles/xtradb.dir/row/row0import.cc.o CMakeFiles/xtradb.dir/row/row0ins.cc.o CMakeFiles/xtradb.dir/row/row0merge.cc.o CMakeFiles/xtradb.dir/row/row0mysql.cc.o CMakeFiles/xtradb.dir/row/row0log.cc.o CMakeFiles/xtradb.dir/row/row0purge.cc.o CMakeFiles/xtradb.dir/row/row0row.cc.o CMakeFiles/xtradb.dir/row/row0sel.cc.o CMakeFiles/xtradb.dir/row/row0uins.cc.o CMakeFiles/xtradb.dir/row/row0umod.cc.o CMakeFiles/xtradb.dir/row/row0undo.cc.o CMakeFiles/xtradb.dir/row/row0upd.cc.o CMakeFiles/xtradb.dir/row/row0quiesce.cc.o CMakeFiles/xtradb.dir/row/row0vers.cc.o CMakeFiles/xtradb.dir/srv/srv0conc.cc.o CMakeFiles/xtradb.dir/srv/srv0mon.cc.o CMakeFiles/xtradb.dir/srv/srv0srv.cc.o CMakeFiles/xtradb.dir/srv/srv0start.cc.o CMakeFiles/xtradb.dir/sync/sync0arr.cc.o CMakeFiles/xtradb.dir/sync/sync0rw.cc.o CMakeFiles/xtradb.dir/sync/sync0sync.cc.o CMakeFiles/xtradb.dir/trx/trx0i_s.cc.o CMakeFiles/xtradb.dir/trx/trx0purge.cc.o CMakeFiles/xtradb.dir/trx/trx0rec.cc.o CMakeFiles/xtradb.dir/trx/trx0roll.cc.o CMakeFiles/xtradb.dir/trx/trx0rseg.cc.o CMakeFiles/xtradb.dir/trx/trx0sys.cc.o CMakeFiles/xtradb.dir/trx/trx0trx.cc.o CMakeFiles/xtradb.dir/trx/trx0undo.cc.o CMakeFiles/xtradb.dir/usr/usr0sess.cc.o CMakeFiles/xtradb.dir/ut/ut0bh.cc.o CMakeFiles/xtradb.dir/ut/ut0byte.cc.o CMakeFiles/xtradb.dir/ut/ut0crc32.cc.o CMakeFiles/xtradb.dir/ut/ut0dbg.cc.o CMakeFiles/xtradb.dir/ut/ut0list.cc.o CMakeFiles/xtradb.dir/ut/ut0mem.cc.o CMakeFiles/xtradb.dir/ut/ut0rbt.cc.o CMakeFiles/xtradb.dir/ut/ut0rnd.cc.o CMakeFiles/xtradb.dir/ut/ut0ut.cc.o CMakeFiles/xtradb.dir/ut/ut0vec.cc.o CMakeFiles/xtradb.dir/ut/ut0wqueue.cc.o CMakeFiles/xtradb.dir/ut/ut0timer.cc.o /usr/bin/ranlib libxtradb.a make[2]: Leaving directory '/home/builduser/rpmbuild/BUILD/mariadb-10.1.21' [ 55%] Built target xtradb make[1]: Leaving directory '/home/builduser/rpmbuild/BUILD/mariadb-10.1.21' Makefile:160: recipe for target 'all' failed make: *** [all] Error 2 Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.2LBslX (%build) Fehler beim Bauen des RPM: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.2LBslX (%build)