pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/doc/guide/files Bootstrapping pkgsrc to build 64-bit b...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2e819c18aa10
branches: trunk
changeset: 508396:2e819c18aa10
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Feb 18 19:59:12 2006 +0000
description:
Bootstrapping pkgsrc to build 64-bit binaries on Solaris with SunPro is
non-trivial. At least, it's documented now.
diffstat:
doc/guide/files/platforms.xml | 72 ++++++++++++++++++++++++++++++++++++++----
1 files changed, 65 insertions(+), 7 deletions(-)
diffs (97 lines):
diff -r 686a8c4a9cad -r 2e819c18aa10 doc/guide/files/platforms.xml
--- a/doc/guide/files/platforms.xml Sat Feb 18 18:16:21 2006 +0000
+++ b/doc/guide/files/platforms.xml Sat Feb 18 19:59:12 2006 +0000
@@ -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>
+ #! /bin/sh
+ exec /opt/SUNWspro/bin/cc -xtarget=ultra -xarch=v9 ${1+"$@"}
+</programlisting>
+
+ <para>Then, pass the definition for <varname>CC</varname> in the
+ environment of the <command>bootstrap</command> command:</para>
<programlisting>
- CFLAGS= -xtarget=ultra -xarch=v9
+ &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>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>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>
Home |
Main Index |
Thread Index |
Old Index