Commit Graph

123 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
77d2cd8d43 - fix some gcc->GCC
- remove commented text in glibc (chap 5), and fix a directory location

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11934 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2020-06-13 08:55:55 +00:00
Thomas Trepl
fb386e05f1 Rename package entities to be independent of chapter numbering
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11921 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2020-06-11 12:55:28 +00:00
Bruce Dubbs
79524a0c69 Text updates for cross2 Chapter 5
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11914 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2020-06-09 23:10:16 +00:00
Bruce Dubbs
fcc027677d Initial commit of alternative cross LFS
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2020-06-07 20:16:00 +00:00
Pierre Labastie
efcb393343 Make the new book
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11831 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2020-05-03 21:02:51 +00:00
Bruce Dubbs
97af73804e Typo
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11799 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2020-03-28 16:48:44 +00:00
Bruce Dubbs
649045ce16 LFS-9.1
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11762 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2020-02-29 21:24:14 +00:00
Bruce Dubbs
d876f0e2f2 Explain with-glibc-version in gcc pass 1
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11753 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2020-02-17 22:26:06 +00:00
Douglas R. Reno
3dfd95eaf1 Cleanup after the --disable-libmpx instruction removal in GCC. This required changes to GCC Pass 1 (CH5) and the main GCC page (CH6)
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11600 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2019-05-11 04:39:07 +00:00
Xi Ruoyao
032b60c66b Remove useless option in GCC (pass 1 and final)
In GCC 9.1 release libmpx has been removed.  So --disable-libmpx is no
longer needed.



git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11594 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2019-05-08 07:10:42 +00:00
Pierre Labastie
6070f516c5 Change <productname> tags so that they reflect the dbhtml processing
instruction

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11574 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2019-04-10 20:20:22 +00:00
Bruce Dubbs
1067bacad2 Update description/rationale for Libstdc++ in Chapter 5
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11424 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2018-06-20 15:20:49 +00:00
Bruce Dubbs
0d84af1cbb Typos and wording changes
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11343 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2017-12-28 03:52:38 +00:00
DJ Lucas
a05450f636 Fix description of commands in gcc pass1.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11206 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2017-03-11 05:48:22 +00:00
Bruce Dubbs
b2f3f15a09 Update to gcc-6.3.0.
Update to gmp-6.1.2. 
Update to   iproute2-4.9.0.
Update to man-pages-4.09.
Update to man-db-2.7.6.1.
Update to linux-4.9.
Update to eudev-3.2.1.



git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11157 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2016-12-21 21:42:05 +00:00
DJ Lucas
be3d9f313a Merge nosym branch.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11154 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2016-12-17 06:46:18 +00:00
Bruce Dubbs
1118b1757d Create branches/merge in svn repo fo rtesting of merged LFS books
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/merge@11073 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2016-05-24 21:24:59 +00:00
Krejzi
42130d6299 Updated to file-5.26, gcc-6.1.0, grep-2.25, gzip-1.8, linux-4.5.2 and tzdata-2016d.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11049 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2016-04-28 02:33:21 +00:00
Bruce Dubbs
f1dd5475c9 Move external build directories into dedicated build directories inside the
source tree for binutils, gcc, and glibc.



git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10991 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2016-01-27 21:49:38 +00:00
Bruce Dubbs
05a0344472 Update to tzdata-2015e.
Update to eudev-3.1.2.
Update to mpfr-3.1.3.
Update to linux-4.1.
Simplify gcc-pass1 instructions. Thanks to Pierre Labastie for the patch. 


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10918 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2015-06-24 00:56:29 +00:00
Krejzi
d0da965ab2 Fixed backslash alignments.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10893 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2015-04-20 11:20:56 +00:00
Bruce Dubbs
5f28defe66 Adjust discussion of LFS envronment variable to be before first use.
Use --with-glibc-version=2.11 in gcc-pass1.
Update to dejagnu-1.5.3.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10886 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2015-03-31 21:25:42 +00:00
Bruce Dubbs
238d351be0 Update to gcc-4.9.2
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10786 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2014-10-31 16:27:24 +00:00
Bruce Dubbs
75128f91c3 Remove redundant wording when checking toolchain values.
Reword bootscripts README file.
Remove reference to mudflap


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10693 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2014-08-15 23:04:08 +00:00
Bruce Dubbs
8a8177f9b9 Intermediate commit to test a change to gcc.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10672 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2014-08-03 16:37:17 +00:00
Chris Staub
b6d678f56a Updated command explanatations for GCC Pass 1
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10623 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2014-07-03 03:58:03 +00:00
Bruce Dubbs
8aa7fdeb1c Remove unneeded confiugure switches from gcc.
Restore installation of udev-lfs support files.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10567 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2014-05-20 00:44:22 +00:00
Bruce Dubbs
e079f16688 Remove unneeded symlink in gcc-pass1.
Update to util-linux-2.24.2.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10552 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2014-04-25 19:04:56 +00:00
Bruce Dubbs
61d3147955 Update to gcc-4.9
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10550 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2014-04-25 01:55:26 +00:00
Bruce Dubbs
ee648fdd8c Update to linux-3.14
Update to file-5.18
Update to flex-2.5.39
Update to GMP-6.0.0a
Update to libpipeline-1.3.0
Update to man-pages-3.64
Update to systemd-212
Update to udev-lfs-20140408


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10532 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2014-04-08 02:52:50 +00:00
Matthew Burgess
a2e7068e94 Add description of GCC's --enable-mpfr switches.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10380 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2013-11-23 23:35:47 +00:00
Matthew Burgess
6458e3172e Fix the alignment of some command continuation constructs.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10233 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2013-03-29 19:50:55 +00:00
Matthew Burgess
4e179e7764 Remove instructions to prevent the building of GCC's info files.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10228 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2013-03-29 11:27:05 +00:00
Matthew Burgess
908077d7f8 Upgrade to GCC-4.8.0. Fixes #3312.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10220 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2013-03-28 17:38:55 +00:00
Bruce Dubbs
dd06b538b5 Update to texinfo-5.0 and linux-3.7.9.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10162 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2013-02-18 21:33:51 +00:00
Bruce Dubbs
5cef3143bf Update udev explanation.
Be consistent with ln options.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10015 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2012-10-02 22:40:39 +00:00