On 01/23/2019 02:16 PM, Pierre Labastie via blfs-dev wrote:
On 23/01/2019 20:48, Bruce Dubbs via blfs-dev wrote:
On 01/23/2019 01:33 PM, Brendan L via blfs-dev wrote:
I noticed some of the projects that switched to meson haven't set and
default buildtype, which means a debug build is produced. Most of the
gnome projects that switched set a default buildtype to debugoptimized
which is equivalent to -O2 -g (which autotools did). The book should
probably set debugoptimized to the packages that don't have a default
buildtype set.
These are the projects in the book without a buildtype that I could find:
dconf
libinput
file-roller
glib-networking
gnome-calculator
gnome-system-monitorbuildtype
libsoup
seahorse
gnome-control-center
gnome-settings-daemon
gnome-shell
baobab
epiphany
nautilus
Actually, that is covered at
http://www.linuxfromscratch.org/blfs/view/stable/introduction/notes-on-building.html#stripping
where all packages can be done at once instead of modifying a lot of
individual package instructions.
As far as I understand "debug" is "-g", while "debugoptimized" is "-O2 -g".
Stripping a package built with just "-g" does not bring it to "-O2".
That's true, but our policy has always been to use the default
optimization of the package. Most of the packages above are a part of
gnome.
I took a look at libinput. It's curious that with
-Dbuildtype=debugoptimized I got '-g -O2' for the gcc instructions, but
without it, I got '-g -O0'. So the debug symbols are present in either
case.
Some stats:
With -O0 -g:
-rwxrwxr-x 1 bdubbs bdubbs 904432 Jan 23 15:03 libinput.so.10.13.0
After stripping:
-rwxrwxr-x 1 bdubbs bdubbs 444440 Jan 23 15:04 libinput.so.10.13.0
With -O2 -g:
-rwxrwxr-x 1 bdubbs bdubbs 1652944 Jan 23 15:06 libinput.so.10.13.0
After stripping:
-rwxrwxr-x 1 bdubbs bdubbs 343560 Jan 23 15:07 libinput.so.10.13.0
It's an open question how much the optimization affects performance from
the user's point of view. Saving 100K is useful, but not critical in an
Xorg installation of about 300M..
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page