Changeset 5accd22 for BOOK


Ignore:
Timestamp:
Aug 31, 2006, 1:19:47 PM (18 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
60915df
Parents:
e7b5340
Message:

Renamed the multilib_wrapper to multiarch_wrapper
Changed the env var from PERL_ARCH to USE_ARCH
Moved the multiarch_wrapper to its own page towords the beginning of building the final system.

Location:
BOOK/final-system
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • BOOK/final-system/mips64-chapter.xml

    re7b5340 r5accd22  
    2424  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/>
    2525  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips64/gcc.xml"/>
     26  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/multiarch_wrapper.xml"/>
    2627  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/>
    2728  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
  • BOOK/final-system/multilib/perl-64bit.xml

    re7b5340 r5accd22  
    116116<screen os="m"><userinput>mv /usr/bin/perl{,-64}</userinput></screen>
    117117
    118     <para os="n">Now we need to create a multilib wrapper that lets us choose
    119     which perl installation to use:</para>
     118    <para os="n">Now we need to create a link to the multiarch wrapper that
     119    lets us choose which perl installation to use:</para>
    120120
    121 <screen os="o"><userinput>cat &gt; perl_wrapper.c &lt;&lt; "EOF"
    122 #include &lt;stdio.h&gt;
    123 #include &lt;stdlib.h&gt;
    124 #include &lt;string.h&gt;
    125 #include &lt;unistd.h&gt;
    126 #include &lt;errno.h&gt;
     121<screen os="o"><userinput>ln -sv multiarch_wrapper /usr/bin/perl</userinput></screen>
    127122
    128 int main (int argc, char *argv[])
    129 {
    130   char *perl_arch;
    131   if ((perl_arch = getenv("PERL_ARCH")) == NULL)
    132     perl_arch = "64";
    133 
    134   char *filename = malloc(strlen(argv[0]) + strlen(perl_arch) + 2);
    135   strcpy(filename, argv[0]);
    136   strcat(filename, "-");
    137   strcat(filename, perl_arch);
    138 
    139   int ret = 0;
    140   ret = execvp(filename, argv);
    141   if ((ret != 0)&amp;&amp;(errno != 0))
    142   {
    143     char *errmsg = malloc(strlen(filename) + 19);
    144     strcpy(errmsg, "Unable to execute ");
    145     strcat(errmsg, filename);
    146     perror(errmsg);
    147     free(errmsg);
    148   }
    149 
    150   free(filename);
    151 
    152   return ret;
    153 }
    154 EOF
    155 gcc ${BUILD64} perl_wrapper.c -o /usr/bin/perl</userinput></screen>
    156 
    157     <para os="p">This multilib wrapper makes it possible to build perl
    158     extensions other then 64-bit. The PERL_ARCH environment variable controls
    159     which perl binary to execute. Some packages that may attempt to build
    160     against perl will run <command>perl -V:cc</command> to get the command
    161     that was used to build perl. If you're building a 32-bit extension but you
    162     only have a 64-bit perl this is not desired. By setting PERL_ARCH=32 you
    163     will be able to build the 32-bit extension because
    164     <command>perl -V:cc</command> will return the command used to build the
    165     32-bit perl installation.</para>
     123    <para os="p">The value of the <envar>USE_ARCH</envar> enviornment variable
     124    will decide which perl binary to execute.
     125    <command>USE_ARCH=32 perl -V:cc</command> will give the value of CC used to
     126    build the 32bit perl. The multiarch_wrapper will help later with building
     127    perl extensions and bindings. Without the multiarch_wrapper it is very hard
     128    to setup a 32bit extenstion or binding.</para>
    166129
    167130  </sect2>
  • BOOK/final-system/ppc64-chapter.xml

    re7b5340 r5accd22  
    2323  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ppc64/binutils.xml"/>
    2424  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ppc64/gcc.xml"/>
     25  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/multiarch_wrapper.xml"/>
    2526  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/>
    2627  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
  • BOOK/final-system/sparc64-chapter.xml

    re7b5340 r5accd22  
    2323  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/>
    2424  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sparc64/gcc.xml"/>
     25  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/multiarch_wrapper.xml"/>
    2526  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/>
    2627  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
  • BOOK/final-system/x86_64-chapter.xml

    re7b5340 r5accd22  
    2323  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/>
    2424  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/gcc.xml"/>
     25  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/multiarch_wrapper.xml"/>
    2526  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/>
    2627  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
Note: See TracChangeset for help on using the changeset viewer.