From a67eedd930cf13f12d1a9e17e1f9158e829348a2 Mon Sep 17 00:00:00 2001 From: rillig Date: Sat, 18 Feb 2006 19:59:12 +0000 Subject: Bootstrapping pkgsrc to build 64-bit binaries on Solaris with SunPro is non-trivial. At least, it's documented now. --- doc/guide/files/platforms.xml | 72 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 7 deletions(-) (limited to 'doc') 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 @@ - + Using pkgsrc on systems other than &os; @@ -551,6 +551,11 @@ Please note the use of GNU binutils on Solaris is not supported. + Whichever compiler you use, please ensure the compiler tools and + your $prefix are in your PATH. This includes + /usr/ccs/{bin,lib} + and e.g. /usr/pkg/{bin,sbin}. + If you are using gcc @@ -593,16 +598,69 @@ CPP= /usr/ccs/lib/cpp - You may also want to build 64-bit binaries, e.g.: + + +Buildling 64-bit binaries with SunPro + + 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 + (bmake), the CFLAGS + 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 cc64 and put it somewhere in the + PATH: - CFLAGS= -xtarget=ultra -xarch=v9 + #! /bin/sh + exec /opt/SUNWspro/bin/cc -xtarget=ultra -xarch=v9 ${1+"$@"} - Whichever compiler you use, please ensure the compiler tools and - your $prefix are in your PATH. This includes - /usr/ccs/{bin,lib} - and e.g. /usr/pkg/{bin,sbin}. + Then, pass the definition for CC in the + environment of the bootstrap command: + + + &uprompt; cd bootstrap + &uprompt; CC=cc64 ./bootstrap + + + 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 mk.conf + file: + + + CC= cc64 + CXX= CC64 + PKGSRC_COMPILER= sunpro + + + 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 + CC64, too.) + + To find packages that ignore the user-specified + CFLAGS and CXXFLAGS, add + the following lines to your mk.conf + file: + + + CC= cc + CXX= CC + PKGSRC_COMPILER= sunpro + CFLAGS= -xtarget=ultra -xarch=v9 + CXXFLAGS= -xtarget=ultra -xarch=v9 + LDFLAGS= -xtarget=ultra -xarch=v9 + + + 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. + Common problems -- cgit v1.2.3