diff options
author | rillig <rillig@pkgsrc.org> | 2006-02-18 19:59:12 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-02-18 19:59:12 +0000 |
commit | a67eedd930cf13f12d1a9e17e1f9158e829348a2 (patch) | |
tree | 22ef12ed5ca902b626b945f2393682045ac689c1 /doc/guide/files/platforms.xml | |
parent | 40847c5f37c075a4471acb72560649a017cccc81 (diff) | |
download | pkgsrc-a67eedd930cf13f12d1a9e17e1f9158e829348a2.tar.gz |
Bootstrapping pkgsrc to build 64-bit binaries on Solaris with SunPro is
non-trivial. At least, it's documented now.
Diffstat (limited to 'doc/guide/files/platforms.xml')
-rw-r--r-- | doc/guide/files/platforms.xml | 72 |
1 files changed, 65 insertions, 7 deletions
diff --git a/doc/guide/files/platforms.xml b/doc/guide/files/platforms.xml index 1012e09b8f1..be08ab16804 100644 --- a/doc/guide/files/platforms.xml +++ b/doc/guide/files/platforms.xml @@ -1,4 +1,4 @@ -<!-- $NetBSD: platforms.xml,v 1.27 2006/02/14 17:10:15 rillig Exp $ --> +<!-- $NetBSD: platforms.xml,v 1.28 2006/02/18 19:59:12 rillig Exp $ --> <chapter id="platforms"> <title>Using pkgsrc on systems other than &os;</title> @@ -551,6 +551,11 @@ <para>Please note the use of GNU binutils on Solaris is <emphasis>not</emphasis> supported.</para> + <para>Whichever compiler you use, please ensure the compiler tools and + your $prefix are in your <varname>PATH</varname>. This includes + <filename>/usr/ccs/{bin,lib}</filename> + and e.g. <filename>/usr/pkg/{bin,sbin}</filename>.</para> + <sect3 id="solaris-gcc-note"> <title>If you are using gcc</title> @@ -593,16 +598,69 @@ CPP= /usr/ccs/lib/cpp </programlisting> - <para>You may also want to build 64-bit binaries, e.g.:</para> +</sect3> +<sect3 id="solaris-sunpro-64"> +<title>Buildling 64-bit binaries with SunPro</title> + + <para>Building 64-bit binaries is a little trickier. First, you + need to bootstrap pkgsrc in 64-bit mode. One problem here is + that while building one of the programs in the bootstrap kit + (<filename>bmake</filename>), the <varname>CFLAGS</varname> + variable is not honored, even if it is set in the environment. + To work around this bug, you can create a simple shell script + called <filename>cc64</filename> and put it somewhere in the + <varname>PATH</varname>:</para> <programlisting> - CFLAGS= -xtarget=ultra -xarch=v9 + #! /bin/sh + exec /opt/SUNWspro/bin/cc -xtarget=ultra -xarch=v9 ${1+"$@"} </programlisting> - <para>Whichever compiler you use, please ensure the compiler tools and - your $prefix are in your <varname>PATH</varname>. This includes - <filename>/usr/ccs/{bin,lib}</filename> - and e.g. <filename>/usr/pkg/{bin,sbin}</filename>.</para> + <para>Then, pass the definition for <varname>CC</varname> in the + environment of the <command>bootstrap</command> command:</para> + +<programlisting> + &uprompt; <userinput>cd bootstrap</userinput> + &uprompt; <userinput>CC=cc64 ./bootstrap</userinput> +</programlisting> + + <para>After bootstrapping, there are two alternative ways, + depending on whether you want to find bugs in packages or get + your system ready quickly. If you just want a running system, + add the following lines to your <filename>mk.conf</filename> + file:</para> + +<programlisting> + CC= cc64 + CXX= CC64 + PKGSRC_COMPILER= sunpro +</programlisting> + + <para>This way, all calls to the compiler will be intercepted by + the above wrapper and therefore get the necessary ABI options + automatically. (Don't forget to create the shell script + <filename>CC64</filename>, too.)</para> + + <para>To find packages that ignore the user-specified + <varname>CFLAGS</varname> and <varname>CXXFLAGS</varname>, add + the following lines to your <filename>mk.conf</filename> + file:</para> + +<programlisting> + CC= cc + CXX= CC + PKGSRC_COMPILER= sunpro + CFLAGS= -xtarget=ultra -xarch=v9 + CXXFLAGS= -xtarget=ultra -xarch=v9 + LDFLAGS= -xtarget=ultra -xarch=v9 +</programlisting> + + <para>Packages that don't use the flags provided in the + configuration file will try to build 32-bit binaries and fail + during linking. Detecting this is useful to prevent bugs on + other platforms where the error would not show up but pass + silently.</para> + </sect3> <sect3 id="plat.sunos.problems"><title>Common problems</title> |