Changeset b1c8283


Ignore:
Timestamp:
11/18/2022 05:57:47 AM (17 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
f8b1860
Parents:
1cc301f
Message:

chapter08: reword description of compiler optimizations

We don't recommend customizing optimizations, but we use optimizations
provided by package default or release build mode.

Reword the paragraph so the people won't be puzzled once they see
"--enable-optimizations" in Python, or "--buildtype=release" (to prevent
unoptimized build) in BLFS meson commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/introduction.xml

    r1cc301f rb1c8283  
    2121  may need it.</para>
    2222
    23   <para>We do not recommend using optimizations.  They can make
     23  <para>We do not recommend using customized optimizations.  They can make
    2424  a program run slightly faster, but they may also cause compilation
    2525  difficulties, and problems when running the program.  If a package refuses to
    26   compile when using optimization, try to compile it without optimization and
    27   see if that fixes the problem. Even if the package does compile when using
     26  compile with a customized optimization, try to compile it without
     27  optimization and see if that fixes the problem. Even if the package does compile when using a customized
    2828  optimization, there is the risk it may have been compiled incorrectly because
    2929  of the complex interactions between the code and the build tools.  Also note that
     
    3131  not specified in the book have not been tested. This may cause problems with
    3232  the toolchain packages (Binutils, GCC and Glibc).  The small potential gains
    33   achieved by using compiler optimizations are often outweighed by the risks.
     33  achieved by customizing compiler optimizations are often outweighed by the risks.
    3434  First-time builders of LFS are encouraged to build without custom
    35   optimizations. The resulting system will still run very fast, and be stable
    36   at the same time.</para>
     35  optimizations.</para>
     36
     37  <para>On the other hand, we keeps the optimizations enabled by the default
     38  configuration of packages.  In addition, we sometimes explicitly enable an
     39  optimized configuration provided by the package but not enabled by
     40  default.  The package maintainers have already tested these configurations
     41  and consider them safe, so it's not likely they would break the build.
     42  Generally the default configuration already enables <option>-O2</option>
     43  or <option>-O3</option>, so the resulting system will still run very fast
     44  without any customized optimization, and be stable at the same time.</para>
    3745
    3846  <para>Before the installation instructions, each installation page provides
Note: See TracChangeset for help on using the changeset viewer.