dslm4515 / Musl-LFS

Linux From Scratch using Musl as Libc
GNU General Public License v3.0
170 stars 21 forks source link

Why are our ``CFLAGS`` equal to ``-g0 -O0``? #75

Closed takusuman closed 2 years ago

takusuman commented 2 years ago

There's a more in-depth explanation of why are we using these?

Reference: https://github.com/dslm4515/Musl-LFS/blob/stable-9.00/doc/2-toolchain/04-gcc#L76-L77

dslm4515 commented 2 years ago

If I remember correctly it was to speed up the compile time for GCC and reduce debugging symbols.

I would have to check through the commits

dslm4515 commented 2 years ago

Per commit c8d6a00cca1105206ac622f3752c113871a1b39c

CFLAGS was set to -g0 -O0 to disable optimizations to speed up compile time of GCC. GCC built for the toolchain /tools is not the GCC used in the final MLFS system. Therefore, any optimizations would not be utilized in the final system.

takusuman commented 2 years ago

CFLAGS was set to -g0 -O0 to disable optimizations to speed up compile time of GCC

Gotcha! Thanks Derrick!