← Back to team overview

maria-discuss team mailing list archive

Re: what is adding the -g compile parm?

 



Am 20.09.2015 um 19:14 schrieb Sergei Golubchik:
Hi, Reindl!

On Sep 20, Reindl Harald wrote:
"-O3 -g" appears in the cmake output, that likely breaks ld.gold / -flto
and so the question: who the explain the build *not* add that useless
param for production builds like most oterh software don't

without one could also remove the strip-calls in rpm-spec-files!

Sorry, I have more questions that answers...

* How do you build?

+ export 'CFLAGS=-m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -fopenmp -mfpmath=sse -pipe -fno-strict-aliasing -fomit-frame-pointer -finline-functions -finline-limit=60 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -funroll-loops -funswitch-loops -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fPIC -fno-exceptions -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'

Where do you see -O3 -g?

the " -fPIC -O3 -g -static-libgcc" stuff comes *after* my global CFLAGS and so overrides them

[  6%] Building C object strings/CMakeFiles/strings.dir/ctype-cp932.c.o
cd /home/builduser/rpmbuild/BUILD/mariadb-10.0.21/strings && /usr/bin/cc -DDISABLE_MYSQL_THREAD_H -DHAVE_CONFIG_H -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -fopenmp -mfpmath=sse -pipe -fno-strict-aliasing -fomit-frame-pointer -finline-functions -finline-limit=60 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -funroll-loops -funswitch-loops -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fPIC -fno-exceptions -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1 -I/home/builduser/rpmbuild/BUILD/mariadb-10.0.21/include -o CMakeFiles/strings.dir/ctype-cp932.c.o -c /home/builduser/rpmbuild/BUILD/mariadb-10.0.21/strings/ctype-cp932.c [ 6%] Building C object unittest/examples/CMakeFiles/no_plan-t.dir/no_plan-t.c.o cd /home/builduser/rpmbuild/BUILD/mariadb-10.0.21/unittest/examples && /usr/bin/cc -DHAVE_CONFIG_H -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -fopenmp -mfpmath=sse -pipe -fno-strict-aliasing -fomit-frame-pointer -finline-functions -finline-limit=60 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -funroll-loops -funswitch-loops -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fPIC -fno-exceptions -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1 -I/home/builduser/rpmbuild/BUILD/mariadb-10.0.21/include -I/home/builduser/rpmbuild/BUILD/mariadb-10.0.21/unittest/mytap -o CMakeFiles/no_plan-t.dir/no_plan-t.c.o -c /home/builduser/rpmbuild/BUILD/mariadb-10.0.21/unittest/examples/no_plan-t.c
make[2]: Leaving directory '/home/builduser/rpmbuild/BUILD/mariadb-10.0.21'
/usr/bin/make -f unittest/examples/CMakeFiles/simple-t.dir/build.make unittest/examples/CMakeFiles/simple-t.dir/build
make[2]: Entering directory '/home/builduser/rpmbuild/BUILD/mariadb-10.0.21'
[  6%] Building C object vio/CMakeFiles/vio.dir/viosslfactories.c.o
cd /home/builduser/rpmbuild/BUILD/mariadb-10.0.21/vio && /usr/bin/cc -DHAVE_CONFIG_H -DHAVE_OPENSSL -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -fopenmp -mfpmath=sse -pipe -fno-strict-aliasing -fomit-frame-pointer -finline-functions -finline-limit=60 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=6 -D_FORTIFY_SOURCE=2 -Wstack-protector -Wformat -Werror=format-security -O3 -funroll-loops -funswitch-loops -minline-all-stringops -fwrapv -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fPIC -fno-exceptions -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -DDBUG_OFF -DMY_PTHREAD_FASTMUTEX=1 -I/home/builduser/rpmbuild/BUILD/mariadb-10.0.21/include -o CMakeFiles/vio.dir/viosslfactories.c.o -c /home/builduser/rpmbuild/BUILD/mariadb-10.0.21/vio/viosslfactories.c [ 6%] Building C object unittest/examples/CMakeFiles/simple-t.dir/simple-t.c.o
make[2]: Leaving directory '/home/builduser/rpmbuild/BUILD/mariadb-10.0.21'
cd /home/builduser/rpmbuild/BUILD/mariadb-10.0.21/unittest/examples && /usr/bin/cc -DHAVE_CONFIG_H -m64 -O2 -g0 -march=sandybridge -mtune

* Why do you think it breaks gold? It shouldn't. In fact, gold doesn't
   work for a completely different reason, see MDEV-5982.
* Why would it break -flto? TokuDB is always compiled with -flto, so
   either "-O3 -g" isn't added autumatically in our builds or -flto works
   with it just fine.

because a mysql error report which i found in that context
tokudb don#t matter here, xtradb fails by build all with -flto

Besides, we don't use rpm spec files, cpack generates then
internally as needed

don't matter

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References