Go to file
Xi Ruoyao 2ca7fca799
gcc: Don't decrease the stack limit
I've had doubts on this "ulimit -s 32768" command for years.  After
reading GCC code (libiberty/stack-limit.c) I'm pretty sure this command
is not doing what we expected.

In a typical Linux distro, the default "soft" stack limit is 8 MiB and
the default "hard" stack limit is infinite.  And GCC will automatically
increase the soft limit to 64 MiB if the original soft limit is smaller
than 64 MiB, and the hard limit is at least 64 MiB.  So with a typical
default configuration, the real stack limit of GCC is 64 MiB.

But our "ulimit -s 32768" command sets both the soft limit and the hard
limit to 32 MiB.  Thus we are actually *decreasing* the real stack
limit.  Fortunately this has not caused any test failures, but it's just
wrong (contradicting with the explanation of the command).

Thus just raise the hard limit to infinite in case the host distro uses
a not so typical configuration where the hard limit is tight, and let
GCC to set up the soft limit to the expected value on its own.  It's
more future-proof than "ulimit -s 65536" in case GCC changes the
expected stack limit in the future.

It should be safe to make the change in freeze because in jhalfs it only
affects the test suite, and even in a manual build the user can skip
this command if not running the GCC test suite.
2024-08-27 16:58:46 +08:00
appendices Package updates. 2024-08-17 16:08:56 -05:00
bootscripts Update to lfs-bootscripts-20240825 2024-08-25 15:37:38 +08:00
chapter01 Update to lfs-bootscripts-20240825 2024-08-25 15:37:38 +08:00
chapter02 Move punctuation/comma into quotes for <xref>s 2024-06-22 11:43:31 +08:00
chapter03 Package updates. 2024-08-05 13:07:12 -05:00
chapter04 Some About SBUs page reword 2024-08-27 12:32:31 +08:00
chapter05 Add more detail to the About SBUs page. 2024-08-26 17:59:31 -05:00
chapter06 gcc-pass2: Fix description of LDFLAGS_FOR_TARGET= 2024-08-19 13:56:08 +08:00
chapter07 Package and format updates. 2024-06-30 10:40:41 -05:00
chapter08 gcc: Don't decrease the stack limit 2024-08-27 16:58:46 +08:00
chapter09 systemd configuration: adjust some wording 2024-08-19 09:55:19 -05:00
chapter10 kernel: Really fix missing revision attribute 2024-08-13 16:52:16 +08:00
chapter11 If we need to create the link target of /dev/shm, make its mode 1777 2024-02-04 22:56:04 +08:00
images Adding some new png files to supoprt alternate css 2015-08-10 17:53:57 +00:00
part3intro toolchaintechnotes: Refer to Glibc wiki instead of shlib-versions 2024-08-05 12:08:18 +08:00
prologue Make capitalization os SysVinit consistent. 2024-07-31 16:59:30 -05:00
stylesheets Fix typos 2024-08-25 15:37:34 +08:00
udev-lfs Typos on comments. 2024-08-23 14:01:06 -05:00
.gitignore build: Add "make dist" 2023-09-13 14:10:38 +08:00
aux-file-data.sh Typos on comments. 2024-08-23 14:01:06 -05:00
gen-changelog.py gen-changelog: Handles holding tickets 2023-12-31 01:09:57 +08:00
general.ent hostreq: Raise min-kernel to 4.19 2024-02-02 09:03:51 +08:00
git-version.sh Fix typos 2024-08-25 15:37:34 +08:00
index.xml Change all xml files to utf-8 encoding 2024-01-18 20:53:23 +01:00
INSTALL doc: correct the URL of BLFS docbook-xml-4.5 page 2022-02-23 02:10:17 +08:00
lfs-latest-git.php Typos on comments. 2024-08-23 14:01:06 -05:00
lfs-latest.php currency: Remove stale lfs-latest.php and symlink lfs-latest-git.php to it 2023-09-03 03:30:43 +08:00
make-aux-files.sh Fix make-aux-file for lfs-bootscript entities 2021-09-22 23:21:31 +02:00
Makefile build: Use -r for git ls-tree in make dist 2024-08-12 19:20:16 +08:00
obfuscate.sh Fix small typos 2023-08-03 22:55:17 +08:00
packages.ent Update to lfs-bootscripts-20240825 2024-08-25 15:37:38 +08:00
patches.ent Package updates. 2024-08-05 13:07:12 -05:00
pdf-fixups.sh Fix pdf presentation issues and some misc issues 2022-03-14 13:08:40 -05:00
process-scripts.sh Remove eol spaces 2021-09-07 23:10:29 +02:00
README Remove eol spaces 2021-09-07 23:05:44 +02:00
tidy.conf Generate utf-8 encoded html 2023-11-23 20:59:52 +01:00

LFS Book README

This document is meant to instruct the user on how to convert the book's XML
source to other formats (e.g. HTML, PDF, PS and TXT).  First, if you have not
already done so, please read the INSTALL file for instructions on how to install
the required software.  If you have already completed the steps outlined in the
INSTALL file, then continue reading for examples how to convert these files into
various other formats.

In all examples, setting the parameter REV=systemd is needed to build the
systemd version of the book.

XML to XHTML:
-------------
make BASEDIR=/path/to/output/location


XML to single file XHTML (nochunks):
------------------------------------
make BASEDIR=/path/to/output/location nochunks

XML to TXT
----------
Follow the instructions for nochunks and then run:
lynx -dump /path/to/nochunks >/path/to/output

XML to PDF:
-----------
make BASEDIR=/path/to/output/location pdf