source: cross-tools/sparc64/flags.xml@ 0f2dc86

Last change on this file since 0f2dc86 was ca8f6bb, checked in by Jim Gifford <clfs@…>, 19 years ago

r685@server (orig r683): jim | 2005-11-10 09:30:11 -0800

r728@server: jim | 2005-11-10 09:27:09 -0800
Fixed typo in Sparc GCCTARGET export. Thank you Erik van der Kolk


  • Property mode set to 100644
File size: 3.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-cross-tools-flags">
9 <title>Build Flags</title>
10 <?dbhtml filename="flags.html"?>
11
12 <para>We will need to setup target specific flags for the compiler
13 and linkers. You can choose the appropriate BUILD32 and BUILD64
14 from the table at the bottom of the page.</para>
15
16<screen><userinput>export BUILD32="[BUILD32 entries]"
17export BUILD64="[BUILD64 entries]"
18export GCCTARGET="[GCCTARGET entries]"</userinput></screen>
19
20 <para>You will need to set your host target triplet for 32 bit:</para>
21
22<screen><userinput>export LFS_TARGET32="sparcv9-unknown-linux-gnu"</userinput></screen>
23
24 <para>Let's perform a sanity check to prevent build issues. If our LFS_HOST matches our
25 target, we will get some failures during our cross-compile:</para>
26
27<screen><userinput>if [ "${LFS_HOST}" = "${LFS_TARGET32}" ]; then \
28 echo "Host and Target can't be the same." ; fi</userinput></screen>
29
30 <para>If the above test gave you "Host and Target can't be the same", you will need to change your LFS_HOST to a
31 a different target triplet:</para>
32
33<screen><userinput>export LFS_HOST="`echo ${MACHTYPE} | sed -e 's/unknown/cross/g' -e 's/-pc-/-cross-/g'`"</userinput></screen>
34
35 <para>Lets add the build flags to <filename>~/.bashrc</filename> to
36 prevent issues if we stop and come back later.</para>
37
38<screen><userinput>echo export BUILD32=\""${BUILD32}\"" &gt;&gt; ~/.bashrc
39echo export BUILD64=\""${BUILD64}\"" &gt;&gt; ~/.bashrc
40echo export GCCTARGET=\""${GCCTARGET}\"" &gt;&gt; ~/.bashrc
41echo export LFS_TARGET32=\""${LFS_TARGET32}\"" &gt;&gt; ~/.bashrc
42echo export LFS_HOST=\""${LFS_HOST}\"" &gt;&gt; ~/.bashrc</userinput></screen>
43
44 <para>The following table gives the entires for different Sparc 64 capable
45 processors. Pick the processor that matches your system.</para>
46
47 <table>
48 <title>List of architectures, target triplets, and recommended book</title>
49 <tgroup cols="2" align="center">
50 <colspec colname="Processor"/>
51 <colspec colname="Build32"/>
52 <colspec colname="Build64"/>
53 <colspec colname="GCC"/>
54 <thead>
55 <row>
56 <entry>Processor</entry>
57 <entry>BUILD32</entry>
58 <entry>BUILD64</entry>
59 <entry>GCCTARGET</entry>
60 </row>
61 </thead>
62 <tbody>
63 <row>
64 <entry>Ultrasparc and Ultrasparc2</entry>
65 <entry>-m32 -mcpu=ultrasparc -mtune=ultrasparc</entry>
66 <entry>-m64 -mcpu=ultrasparc -mtune=ultrasparc</entry>
67 <entry>-mcpu=ultrasparc -mtune=ultrasparc</entry>
68 </row>
69 <row>
70 <entry>Ultrasparc3</entry>
71 <entry>-m32 -mcpu=ultrasparc3 -mtune=ultrasparc3</entry>
72 <entry>-m64 -mcpu=ultrasparc3 -mtune=ultrasparc3</entry>
73 <entry>-mcpu=ultrasparc3 -mtune=ultrasparc3</entry>
74 </row>
75 </tbody>
76 </tgroup>
77 </table>
78
79</sect1>
80
Note: See TracBrowser for help on using the repository browser.