Changeset 5e2f0cb for final-system
- Timestamp:
- Aug 31, 2006, 1:30:34 PM (18 years ago)
- Children:
- 6b42aac
- Parents:
- 96c52ef
- Location:
- final-system
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
final-system/mips64-chapter.xml
r96c52ef r5e2f0cb 24 24 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/> 25 25 <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"/> 26 27 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/> 27 28 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/> -
final-system/multilib/perl-64bit.xml
r96c52ef r5e2f0cb 116 116 <screen os="m"><userinput>mv /usr/bin/perl{,-64}</userinput></screen> 117 117 118 <para os="n">Now we need to create a multilib wrapper that lets us choose119 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> 120 120 121 <screen os="o"><userinput>cat > perl_wrapper.c << "EOF" 122 #include <stdio.h> 123 #include <stdlib.h> 124 #include <string.h> 125 #include <unistd.h> 126 #include <errno.h> 121 <screen os="o"><userinput>ln -sv multiarch_wrapper /usr/bin/perl</userinput></screen> 127 122 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)&&(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> 166 129 167 130 </sect2> -
final-system/ppc64-chapter.xml
r96c52ef r5e2f0cb 23 23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ppc64/binutils.xml"/> 24 24 <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"/> 25 26 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/> 26 27 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/> -
final-system/sparc64-chapter.xml
r96c52ef r5e2f0cb 23 23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/> 24 24 <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"/> 25 26 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/coreutils.xml"/> 26 27 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/iana-etc.xml"/> -
final-system/x86_64-chapter.xml
r96c52ef r5e2f0cb 23 23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="multilib/binutils.xml"/> 24 24 <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"/> 25 26 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="x86_64/coreutils.xml"/> 26 27 <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.