GCC

The GNU compiler suite is installed as per the Blastwave package. Currently, version 3.4.2 is installed.

For whatever reason GCC is not configured with the correct CPU architecture. Hence, in order to compile C/C++ code, you must ensure that the -mcpu=v9 option is specified (eg in CFLAGS).

Note that building 64-bit executables is possible (-m64) but you will not be able to link against the standard C/C++ libraries, as they are 32-bit only.

Hence for building regular unix tarballs you probably want to use:

$ CFLAGS=-mcpu=v9 ./configure

For building with BJam / Boost.Build, you can create a ~/user-config.jam file as follows:

# Compiler configuration
using gcc
  : 3.4.3
  : /usr/sfw/bin/g++
  : <cflags>"-mcpu=v9"
    <cxxflags>"-mcpu=v9"
    <linkflags>"-mcpu=v9"
    <linker-type>sun
 ;
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact