Frequently Asked Questions
en

Frequently Asked Questions

NOTE: The gccfss-on project is no longer active on this website so information here may be out of date. Current Oracle Solaris 11 product documentation can be found here. Information about downloading Oracle Solaris 11 can be found here.

GCC for SPARC® Systems - FAQ

Questions

  1. Where do I get support?
  2. What is the -xbinopt=prepare option?
  3. What GCC optimization levels are equivalent to the SunStudio optimization levels?
  4. What is the path to add to the environment variable PATH for the compilers?
  5. How to build GCCfss from sources ?
  6. ld: fatal: invalid relocation type: 0x52 ?

Answers
1.Q: Where do I get support?
A:  Reporting Bugs
 Use  bugs.sun.com (category "GCCFSS") to report problems and suggestions for improvements. You can also use it to check on the status of reported problems.
Use the Forum
 The CoolTools Forum. will be used to announce new releases of GCC for SPARC Systems. The Forum will also be used for a dialog on all aspects of the use of GCC for SPARC Systems and its results.
2.Q: What is the -xbinopt

prepare option?
A:  Please see this page
3.Q: What GCC optimization levels are equivalent to the SunStudio optimization levels?
A:  The SunStudio optimization levels are specified by the -xO command line option. These options are not accepted by GCC for SPARC Systems. Instead GCC for SPARC Systems uses -O options. The rough equivalence between them is specified in the following table.

SunStudio optimization levels
Equivalent GCC for SPARC Systems optimization level
-xO0
-O0
-xO1
none
-xO2
-O1 and -O
-xO3 and -O
-O2
-xO4
none
-xO5
-O3
-fast
-fast
4.Q: What is the path to add to the environment variable PATH for the compilers?
A:  /opt/gcc/bin
5.Q: How to build GCCfss from sources ?
A:
 Follow the following steps:
  1. Make sure that SUNW0scgfss package is already installed in /opt/SUNW0scgfss/
     This location is forcing GCCfss to be in /opt/gcc/
     If you want an alternative location for your newly built GCCfss replace 'opt' in all the pathes to your own directory and move SUNW0scgfss directory there
  2. create a build directory
  3. run 'configure' script from GCCfss sources in your build directory:
     /gccfss_source_dir/configure --prefix=/opt/gcc/ --enable-shared --with-system-zlib --enable-checking=release --disable-libmudflap --enable-version-specific-runtime-libs --with-gxx-include-dir=/opt/gcc/include/c++/4.0.3 --with-cpu=v9 --enable-languages=c,c++
  4. gmake or gmake bootstrap
  5. gmake install-gcc install-target-libstdc++-v3
  6. Have fun!
     NOTES:
  • All these steps assume that the person trying to build GCCfss is familiar with plain gcc build process
  • The GCCfss build process is setup to find some components from $prefix_dir/../SUNW0scgfss/... directory, so step #1 is important
  • Missing libsunir.so and lib_I_dbg_gen.so libraries during the linking phase of cc1/cc1plus indicate incorrectness in step #1
    *
  • GCCfss can be built with already installed GCCfss or with plain GCC 4.0.x
  • GCCfss configured and build on Solaris 10 will only work properly on Solaris 10 (just like plain GCC compiler), but you can install Solaris 9 and Solaris 10 versions of GCCfss into the same install directory and GCCfss driver will pick up the corrent version in the run-time
    6.Q: ld: fatal: invalid relocation type: 0x52 ?
    A:
    If you're seeing the following error message trying to compile any program with GCCfss:
    ld: fatal: relocation error: file /opt/gcc/lib/gcc/sparc-sun-solaris2.9/4.0.3/crtbegin.o: section .rela.text: invalid relocation type: 0x52
     That most probably means that you don't have required linker patches installed.
     The required patches are: http://cooltools.sunsource.net/gcc/4.0.3/ReleaseNotes.html#patches
     It's best to use the latest linker patch which is 112963-29: http://sunsolve.central.sun.com/cgi/pdownload.pl?target=112963-29&method=h
Tags:
Created by admin on 2009/10/26 12:13
Last modified by admin on 2009/10/26 12:13

XWiki Enterprise 2.7.1.34853 - Documentation