[lfs] branch trunk updated: gcc-pass1: Explain -i.orig

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.book
Message-ID <175522707287.31119.1000568340408238861@rivendell.linuxfromscratch.org>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository lfs.

The following commit(s) were added to refs/heads/trunk by this push:
     new 6026724d1 gcc-pass1: Explain -i.orig
6026724d1 is described below

commit 6026724d1abc45b7d14dbcc95c7a87933282dad3
Author: Xi Ruoyao <[email protected]>
AuthorDate: Fri Aug 15 10:59:12 2025 +0800

    gcc-pass1: Explain -i.orig
    
    A frequently asked question is "why not using -i.orig instead of -i for
    ${some_random_sed_command_in_book}" but I really expect people to learn
    from this example and do it on their own if they really need...
---
 chapter05/gcc-pass1.xml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml
index 6ea6d48b6..3a537e014 100644
--- a/chapter05/gcc-pass1.xml
+++ b/chapter05/gcc-pass1.xml
@@ -72,6 +72,23 @@ mv -v mpc-&mpc-version; mpc</userinput></screen>
  ;;
 esac</userinput></screen>
 
+    <note>
+      <para>
+        This example demonstrates the use of the
+        <parameter>-i.orig</parameter> switch.  It makes the
+        <command>sed</command> copy the <filename>t-linux64</filename>
+        to <filename>t-linux64.orig</filename>, and then edit the
+        <filename>t-linux64</filename> inplace.  So you may run
+        <command>diff -u gcc/config/i386/t-linux64{.orig,}</command>
+        to visualize the change done by the <command>sed</command> command
+        afterwards.  We'll simply use <parameter>-i</parameter> (which just
+        edits the original file inplace without copying it) for all other
+        packages in the book, but you can change it to
+        <parameter>-i.orig</parameter> in any case you want to keep a copy
+        of the original file.
+      </para>
+    </note>
+
     <para>The GCC documentation recommends building GCC
     in a dedicated build directory:</para>
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.