Commit Graph

1238 Commits

Author SHA1 Message Date
Bruce Dubbs
8a0ae36a91 Fix extra spacing around some xml tags. 2024-10-25 11:37:55 -05:00
Bruce Dubbs
eae9237225 Add more detail to the About SBUs page. 2024-08-26 17:59:31 -05:00
Andrew Kreimer
a18957940c
docs: fix a typo
In section "5.3. GCC-13.2.0 - Pass 1",
the string "The are not strictly needed"
should have "They".

Fix that.
2024-08-09 22:24:18 +08:00
Xi Ruoyao
6e6641f9b7
binutils: Add --enable-new-dtags
This option makes ld use DT_RUNPATH instead of DT_RPATH.  DT_RPATH is
generally considered bad because it takes precedence over
LD_LIBRARY_PATH.  For example, eog is linked with -rpath /usr/lib/eog,
and with DT_RPATH if an old eog is already installed we are basically
impossible to debug a new eog build w/o overwriting the system
installation first or explicitly using "ld.so --inhibit-rpath" to
invoke it.

This "new" actually means "new in 2000," it's 24 years ago and all other
distros has enabled it.  Thus I guess some unexplainable "test suite
uses installed library instead of the just built one" issues in BLFS are
actually caused by this difference: the package author just assumes
everyone is using DT_RUNPATH thus they just set LD_LIBRARY_PATH and
consider it enough to test with the just built libraries, but DT_RPATH
breaks this expectation.

Let's eliminate the difference as it seems not doing anything good and
doing so just takes one switch.
2024-07-18 11:13:20 +08:00
Pierre Labastie
360fdfca9c Fix punctuation in quotes, and quote signs
- period and comma inside quotes
- " to <quote>
- some " to <literal> when it is a var value
2024-01-26 18:28:53 +01:00
Xi Ruoyao
ea93c117f2
treewide: Use <ulink> instead of <filename> for man pages
"gcc(1)" is really not a file name.

Use <ulink> and link to the online man page on
https://man.archlinux.org/ so the user can refer to the man pages more
easily.

The change is done via a sed command and long lines are wrapped
manually.
2024-01-26 01:59:06 +08:00
Pierre Labastie
7152faa5fa Change all xml files to utf-8 encoding 2024-01-18 20:53:23 +01:00
Bruce Dubbs
acde0a383a Typo 2024-01-04 09:44:21 -06:00
Xi Ruoyao
6fec3f51e7
binutils: Add --enable-default-hash-style=gnu for configure (#5401) 2023-12-31 02:37:07 +08:00
Bruce Dubbs
25b3c0f720 Package updates and one fix.
Disable building nscd in glibc.
Update to iana-etc-20230929.
Update to vim-9.0.1968.
Update to openssl-3.1.3.
Update to meson-1.2.2.
Update to man-db-2.12.0.
Update to linux-6.5.5.
Update to kmod-31.
Update to kbd-2.6.3.
Update to gettext-0.22.2.
Update to bc-6.7.0.
2023-10-01 13:37:57 -05:00
Xi Ruoyao
d269e20dcb
chapter05/libstdc++: Remove one more .la file 2023-09-15 19:27:41 +08:00
Xi Ruoyao
7a8fcc3918
glibc: Remove sed and option unneeded with 2.38
--disable-crypt is now the default, and the security fix for 2.37 is
included.
2023-08-02 10:54:44 +08:00
Xi Ruoyao
bbfb090d2a
glibc: Disable obsolete libcrypt implementation
I've not bothered to write an explanation for --disable-crypt because it
will likely be the default of Glibc-2.38, then we may drop it from the
command lines.
2023-06-30 03:19:20 +08:00
Xi Ruoyao
0f18f2b121
housekeeping after min-kernel bump
Update the rationale for min-kernel in hostreqs.  Add a note in
general.ent about the EOL of current min-kernel.  Realign the
backslashes in glibc instructions.
2023-06-05 23:20:48 +08:00
Bruce Dubbs
bd5b888ad3 Create new branch for gcc13 2023-04-27 10:01:17 -05:00
Xi Ruoyao
c6c1a068b9
glibc: Remove a sed useless for 2.37 2023-02-02 15:47:05 +08:00
Xi Ruoyao
139b77e4a2
decorate new note about $() and `` 2023-01-27 01:44:05 +08:00
Bruce Dubbs
adba2dae8a Add a comment about nested command substitution
"The command below shows an example of nested command substitution
 using two methods: backquotes and a $() construct. It could be
 rewritten using the same method for both substitutions, but is
 shown this way to demonstrate how they can be mixed. Generally
 the $() method is preferred."
2023-01-26 10:40:42 -06:00
Xi Ruoyao
31e9ff9527
gcc-pass1: housekeeping after --disable-decimal-float removal 2022-11-23 00:58:21 +08:00
Xi Ruoyao
f01f8a56da
gcc: remove --disable-decimal-float from pass 1 and 2
We need to enable decimal float here or MPFR will be built w/o decimal
float support.  Then 2 of 183 tests will be skipped, and this will also
cause an ICA issue.

Q: Why we need decimal float in pass 1?
A: We need pass-1 GCC with decimal float support to build decimal float
routines in pass-2 libgcc.
2022-11-22 18:22:53 +08:00
Xi Ruoyao
d45f50d26d
glibc: fix parallel build issue with make-4.4
We only need a one-line change in upstream fix (because we don't use
"make --shuffle").  Add it as a sed for both Chapter 5 and Chapter 8.

Note that the "minimal" sed would be '/MAEKFLAGS :=/s/r/ -r/'.  I
included an additional ')' so it won't modify "-r" again to "- -r".

Tested "make" and "make check" on a x86_64 with -j8 and an arm64 with
-j24.

Link: https://sourceware.org/git/?p=glibc.git;a=commit;h=2d7ed98add14
2022-11-01 11:05:05 +08:00
David Bryant
f6820bb618 Corrected spelling here and there. Regularized capitaization of package
names, corrected idiom / punctuation, and removed extraneous verbiage.
2022-10-30 09:23:55 -05:00
Pierre Labastie
793f9087f1 Fix sanity check in chapter 5
When I changed the sanity check to remove the "dummy.c" file, I
inadvertently used "gcc" instead of "$LFS_TGT-gcc". Which of course
finds the host gcc...
2022-10-06 09:07:42 +02:00
Xi Ruoyao
e502de1ab0
gcc: some reword of PIE/SSP/ASLR note
Expand tabs to 8 spaces like everywhere else in the book.

Explain that shared libraries are already covered by ASLR, PIE expands
the ASLR to cover the exetutables.

In 2022, stack smashing attackings are mostly constructing a sequence of
faked returning addresses to exectute a series of function already
existing in the programs or libraries itself (ret2lib).  Returning into
the code injected by the attacker is almost impossible because on
i686 (with a PAE/NX enabled kernel) or x86_64, running injected code
needs W/X mappings and those are very rare these days.
2022-09-11 11:35:06 +08:00
Pierre Labastie
8d3b2541da gcc-pass1: fix bold "and" in command explanation 2022-09-10 14:01:42 +02:00
Pierre Labastie
1bade3f439 Document the --enable-default-pie/ssp options
Also document test failures in gcc chapter 8
2022-09-10 13:41:38 +02:00
Pierre Labastie
0611f706d5 Use default-pie and default-ssp flags in gcc
Committing only the commands for now, so that others can test the
build. TODO:
- add command explanations
- add changelog
- comment on failing tests in binutils and gcc
2022-09-09 16:15:06 +02:00
Pierre Labastie
51b7349a97 Remove all non header files in linux headers
Report by Joe Locash that a perl script was left in /usr/include
with our current instructions
2022-08-31 21:34:49 +02:00
Pierre Labastie
b3f157c685 Don't use dummy.c for glibc sanity check in chap 5
It seems glibc creates dummy.c for its own use. This leaves some
dummy.xxx files in the directory, that may lead some users to think that
the directory is not properly cleaned up after the test (I did :)

So use a pipe so that only a.out is created
2022-08-25 09:24:58 +02:00
Xi Ruoyao
6099a47149
Remove libtool archive (.la) files in Chapter 5 and 6
They are really harmful.  In Binutils pass 2, libstdc++.la caused the
building system to use host /usr/lib/libstdc++.so for gprofng.  We now
has disabled gprofng for pass 2, but the similar issue also exists in
GCC pass 2.  In a normal LFS build, the building system silently uses
/usr/lib/libstdc++.so (I guess it does not blow up simply because some
blind luck); in a real cross build (x86 -> ARM for example) the build
will fail.

Remove the .la files to fix this issue.  Instead of only modifying
clfs-ng, it makes more sense to apply the change for trunk: though
the build does not fail, using host library is still a contamination.
2022-08-19 12:41:48 +08:00
Bruce Dubbs
1b11115cd2 Package updates.
Update to binutils-2.38.
Update to util-linux-2.38.1.
Update to Python3-3.10.6.
Update to glibc-2.36.
2022-08-06 17:40:17 -05:00
Xi Ruoyao
e1d233c8af
gcc-12: remove --enable-initfini-array in pass 1
Reference: https://gcc.gnu.org/r12-1328
2022-05-06 20:31:01 +08:00
Bruce Dubbs
bcb20b4701 Speling 2022-03-24 12:11:57 -05:00
Xi Ruoyao
459d4936ae
fix GCC PR100017 and enable libstdc++ for pass 2
This is the issue preventing us from cross-compiling libstdc++ in
Chapter 6.  By fixing this issue we can remove a seperate pass 2 for
libstdc++ and simplify the instruction.

The upstream fix will be released in 11.3 and 12.0, so we can remove the
first sed upgrading gcc next time.
2022-02-27 23:36:55 +08:00
Xi Ruoyao
d6006ef769
relax host system requirements
A requirement on Glibc is not needed at all.  It's enough once
$LFS_TGT-* is runnable.  A test on Alpine (using musl as libc) has
practically proved this.

We'd raised binutils and GCC requirements mostly for Glibc.  But now
Glibc is cross compiled by our cross toolchain with latest GCC and
binutils release, the host tools really does not matter.  In the Glibc
building process only two .c files are build with BUILD_CC (the C
compiler from the host), and they are highly conservative (mostly
unchanged for years).

Binutils does not have too much requirement on host GCC & Binutils:
there is even a Binutils commit in this week fixing a build failure with
GCC-4.2!

So the most strict limitation comes from GCC.  GCC requires host GCC to
support ISO C++ 11 so GCC >= 4.8 is needed.  And both GCC-4.8 and latest
GCC-11.2 claims a requirement for Binutils-2.12 (for x86_64) or 2.13.1
(for 32-bit x86), so we make minimal Binutils version 2.13.1.

And, host bzip2 is never used now: the only .tar.bz2 files are elfutils
and python docs.  They are not decompressed before entering chroot.
2022-02-19 10:29:47 +08:00
Bruce Dubbs
9904ecb1de Spelling/Typos 2022-02-18 14:49:40 -06:00
Xi Ruoyao
2cf3c176cf
break very long line 2022-02-15 15:45:00 +08:00
Xi Ruoyao
174d1bf948
libstdc++ pass 1: rephrase the explanation for --with-gxx-include-dir
I just received a private mail from some guy obviously puzzled by this
switch.  Expand the explanation a little to make it more clear.
2022-02-15 15:29:35 +08:00
Xi Ruoyao
bca4876ac5
Revert "binutils: use -j1 for make install"
This reverts commit 03a41fd0cd.

It's no longer needed after binutils-gdb commit "install dependencies for
ld -> bfd and libctf -> bfd" (755ba58e).
2022-02-04 17:55:05 +08:00
Xi Ruoyao
0fc98a07ff
gcc-pass1: set --with-glibc-version to target glibc version
"info gccinstall" says:

'--with-glibc-version=MAJOR.MINOR'
     Tell GCC that when the GNU C Library (glibc) is used on the target
     it will be version MAJOR.MINOR or later.  Normally this can be
     detected from the C library's header files, but this option may be
     needed when bootstrapping a cross toolchain without the header
     files available for building the initial bootstrap compiler.

So it can, and should be set to the version of glibc which will be built
for the chroot environment.

On x86_64, currently it does not make any difference with values >=
2.13.  But it may make a difference if a new feature is added to glibc,
or on other platforms.
2021-12-03 03:06:18 +08:00
Xi Ruoyao
0fc1b27b09
move the ln note back to chap 5 glibc
It was moved to chapter 4 during merged-/usr update.  However the ln
commands in chapater 4 are "trivial", so move it back to chapter 5 glibc
where we start to use a "different syntactic version" of it.
2021-11-12 00:41:02 +08:00
Bruce Dubbs
43b6ecdc1f Remove extra spaces 2021-09-15 11:24:27 -05:00
Pierre Labastie
a26f29f645 Remove spaces at end o lines - chapter05 2021-09-07 22:43:31 +02:00
Pierre Labastie
763a00a98d Fix spacing of backslashes in binutils-pass1 2021-08-24 13:02:18 +02:00
Bruce Dubbs
9c7598cc15 Package updates.
Update to glibc-2.34.
Update to diffutils-3.8.
Update to libcap-2.52.
2021-08-02 20:52:40 -05:00
DJ Lucas
4eee9ccd08 Ensure that glibc installs ldconfig and sln to /usr/sbin. 2021-07-21 20:02:02 -05:00
Xi Ruoyao
80838616e5
glibc: remove description of libc_cv_rtlddir for now 2021-05-16 02:28:22 +08:00
Xi Ruoyao
7f25c8447d
glibc: remove libc_cv_rtlddir override for now
Back to use the sed.  Need to investigate later.
2021-05-14 22:44:01 +08:00
Thomas Trepl (Moody)
1b1acbed65 Use /usr/lib for libc_cv_rtlddir 2021-05-14 12:54:44 +02:00
Thomas Trepl (Moody)
f5c3bf6e7e Use a configuration option to set the loader pathes in ldd 2021-05-13 18:30:55 +02:00