r2375 - / branches/clfs-1.0/BOOK/final-system branches/clfs-1.0/BOOK/final-system/multilib

jim at linuxfromscratch.org jim at linuxfromscratch.org
Thu Aug 31 16:48:28 PDT 2006


Author: jim
Date: 2006-08-31 17:48:27 -0600 (Thu, 31 Aug 2006)
New Revision: 2375

Modified:
   /
   branches/clfs-1.0/BOOK/final-system/mips64-chapter.xml
   branches/clfs-1.0/BOOK/final-system/multilib/perl-64bit.xml
   branches/clfs-1.0/BOOK/final-system/ppc64-chapter.xml
   branches/clfs-1.0/BOOK/final-system/sparc64-chapter.xml
   branches/clfs-1.0/BOOK/final-system/x86_64-chapter.xml
Log:
 r5478 at server (orig r2512):  jciccone | 2006-08-31 13:30:34 -0700
 Applied r2511 from trunk to the clfs-1.0 branch.



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - b6734a72-470d-0410-b049-f317dca95413:/:2511
   + b6734a72-470d-0410-b049-f317dca95413:/:2512

Modified: branches/clfs-1.0/BOOK/final-system/mips64-chapter.xml
===================================================================
--- branches/clfs-1.0/BOOK/final-system/mips64-chapter.xml	2006-08-31 23:48:18 UTC (rev 2374)
+++ branches/clfs-1.0/BOOK/final-system/mips64-chapter.xml	2006-08-31 23:48:27 UTC (rev 2375)
@@ -23,6 +23,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips64/adjusting.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips64/gcc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/multiarch_wrapper.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/m4.xml"/>

Modified: branches/clfs-1.0/BOOK/final-system/multilib/perl-64bit.xml
===================================================================
--- branches/clfs-1.0/BOOK/final-system/multilib/perl-64bit.xml	2006-08-31 23:48:18 UTC (rev 2374)
+++ branches/clfs-1.0/BOOK/final-system/multilib/perl-64bit.xml	2006-08-31 23:48:27 UTC (rev 2375)
@@ -115,55 +115,18 @@
 
 <screen os="m"><userinput>mv /usr/bin/perl{,-64}</userinput></screen>
 
-    <para os="n">Now we need to create a multilib wrapper that lets us choose
-    which perl installation to use:</para>
+    <para os="n">Now we need to create a link to the multiarch wrapper that
+    lets us choose which perl installation to use:</para>
 
-<screen os="o"><userinput>cat > perl_wrapper.c << "EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
+<screen os="o"><userinput>ln -sv multiarch_wrapper /usr/bin/perl</userinput></screen>
 
-int main (int argc, char *argv[])
-{
-  char *perl_arch;
-  if ((perl_arch = getenv("PERL_ARCH")) == NULL)
-    perl_arch = "64";
+    <para os="p">The value of the <envar>USE_ARCH</envar> enviornment variable
+    will decide which perl binary to execute.
+    <command>USE_ARCH=32 perl -V:cc</command> will give the value of CC used to
+    build the 32bit perl. The multiarch_wrapper will help later with building
+    perl extensions and bindings. Without the multiarch_wrapper it is very hard
+    to setup a 32bit extenstion or binding.</para>
 
-  char *filename = malloc(strlen(argv[0]) + strlen(perl_arch) + 2);
-  strcpy(filename, argv[0]);
-  strcat(filename, "-");
-  strcat(filename, perl_arch);
-
-  int ret = 0;
-  ret = execvp(filename, argv);
-  if ((ret != 0)&&(errno != 0))
-  {
-    char *errmsg = malloc(strlen(filename) + 19);
-    strcpy(errmsg, "Unable to execute ");
-    strcat(errmsg, filename);
-    perror(errmsg);
-    free(errmsg);
-  }
-
-  free(filename);
-
-  return ret;
-}
-EOF
-gcc ${BUILD64} perl_wrapper.c -o /usr/bin/perl</userinput></screen>
-
-    <para os="p">This multilib wrapper makes it possible to build perl
-    extensions other then 64-bit. The PERL_ARCH environment variable controls
-    which perl binary to execute. Some packages that may attempt to build
-    against perl will run <command>perl -V:cc</command> to get the command
-    that was used to build perl. If you're building a 32-bit extension but you
-    only have a 64-bit perl this is not desired. By setting PERL_ARCH=32 you
-    will be able to build the 32-bit extension because
-    <command>perl -V:cc</command> will return the command used to build the
-    32-bit perl installation.</para>
-
   </sect2>
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"

Modified: branches/clfs-1.0/BOOK/final-system/ppc64-chapter.xml
===================================================================
--- branches/clfs-1.0/BOOK/final-system/ppc64-chapter.xml	2006-08-31 23:48:18 UTC (rev 2374)
+++ branches/clfs-1.0/BOOK/final-system/ppc64-chapter.xml	2006-08-31 23:48:27 UTC (rev 2375)
@@ -22,6 +22,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ppc64/adjusting.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ppc64/binutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ppc64/gcc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/multiarch_wrapper.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/m4.xml"/>

Modified: branches/clfs-1.0/BOOK/final-system/sparc64-chapter.xml
===================================================================
--- branches/clfs-1.0/BOOK/final-system/sparc64-chapter.xml	2006-08-31 23:48:18 UTC (rev 2374)
+++ branches/clfs-1.0/BOOK/final-system/sparc64-chapter.xml	2006-08-31 23:48:27 UTC (rev 2375)
@@ -22,6 +22,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/adjusting.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sparc64/gcc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/multiarch_wrapper.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/m4.xml"/>

Modified: branches/clfs-1.0/BOOK/final-system/x86_64-chapter.xml
===================================================================
--- branches/clfs-1.0/BOOK/final-system/x86_64-chapter.xml	2006-08-31 23:48:18 UTC (rev 2374)
+++ branches/clfs-1.0/BOOK/final-system/x86_64-chapter.xml	2006-08-31 23:48:27 UTC (rev 2375)
@@ -22,6 +22,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86_64/adjusting.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/gcc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/multiarch_wrapper.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86_64/coreutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/m4.xml"/>




More information about the cross-lfs mailing list