浏览代码

Ensure proper architecture selection in libffi installation

Add a configuration option to libffi to ensure proper
architecture selection.  Include an explanation
and how to select alternative options.

was r11435.
Bruce Dubbs 7 年之前
父节点
当前提交
9c5c36afbe
共有 3 个文件被更改,包括 42 次插入5 次删除
  1. 12 1
      chapter01/changelog.xml
  2. 27 1
      chapter06/libffi.xml
  3. 3 3
      general.ent

+ 12 - 1
chapter01/changelog.xml

@@ -42,7 +42,18 @@
     appropriate for the entry or if needed the entire day's listitem.
 -->
     <listitem>
-      <para>2018-07-03</para>
+      <para>2018-07-07</para>
+      <itemizedlist>
+        <listitem>
+           <para>[bdubbs] - 添加一个 libffi 配置选项以保证其选择正确架构,
+           并提供其解释和选用其他选项的方法。修复
+           <ulink url="&lfs-ticket-root;4303">#4303</ulink>。</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>2018-07-06</para>
       <itemizedlist>
         <listitem>
            <para>[bdubbs] -

+ 27 - 1
chapter06/libffi.xml

@@ -54,7 +54,33 @@ sed -e '/^includedir/ s/=.*$/=@includedir@/' \
 
     <para>准备安装 libffi:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr --disable-static --with-gcc-arch=native</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><parameter>--with-gcc-arch=native</parameter></term>
+        <listitem>
+          <!--para>Ensure gcc optimizes for the current system.  If this
+          is not specified, the system is guessed and the code generated
+          may not be correct for some systems.  If the generated code
+          will be copied from the native system to a less capable 
+          system, use the less capable system as a parameter. For details 
+          about alternative system types, see <ulink 
+          url='https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/x86-Options.html'>
+          the x86 options in the gcc manual</ulink>.</para-->
+          <para>保证 gcc 为当前系统进行优化。如果不使用该选项,
+          构建系统会猜测系统架构,在某些系统上可能生成不正确的代码。
+          如果要将生成的代码从本地系统复制到指令集功能较弱的系统中,
+          需要使用目标系统架构作为该选项的参数值,参阅
+          <ulink url=
+          'https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/x86-Options.html'>
+          gcc 手册中提供的的 x86 选项</ulink>。</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
 
     <para>编译该软件包:</para>
 

+ 3 - 3
general.ent

@@ -1,13 +1,13 @@
-<!ENTITY version         "SVN-20180706">
+<!ENTITY version         "SVN-20180707">
 <!ENTITY short-version   "svn">  <!-- Used below in &blfs-book; 
                                       Change to x.y for release but not -rc releases -->
 <!ENTITY generic-version "development"> <!-- Use "development"  or "x.y[-pre{x}]" -->
 
-<!ENTITY versiond        "20180706-systemd">
+<!ENTITY versiond        "20180707-systemd">
 <!ENTITY short-versiond  "systemd">
 <!ENTITY generic-versiond "systemd"> 
 
-<!ENTITY releasedate     "2018 年 7 月 6 日">
+<!ENTITY releasedate     "2018 年 7 月 7 日">
 
 <!ENTITY copyrightdate   "1999-2018"><!-- jhalfs needs a literal dash, not &ndash; -->
 <!ENTITY milestone       "8.3">