[ 
https://issues.apache.org/jira/browse/STDCXX-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Ashley updated STDCXX-1074:
--------------------------------

    Description: 
Set your environment according to your machine type... intel and sparc examples 
shown

{noformat}
    i386 32bit:
    setenv CC "cc"
    setenv CXX "CC"
    setenv BUILDTYPE 8d
    setenv CFLAGS_I386_COMMON "-m32 -xarch=386 -Xc -features=extinl 
-xregs=no%frameptr -xO3 -xbuiltin=%none -KPIC -DPIC"
    setenv CFLAGS "${CFLAGS_I386_COMMON}"
    setenv CXXFLAGS_I386_COMMON "-library=Crun -norunpath -Qoption ccfe 
++boolflag:sunwcch=false -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe 
-expand=10000 
-features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic 
-instances=global -template=geninlinefuncs -verbose=template -xregs=no%frameptr 
-xO3  -xbuiltin=%none -KPIC -DPIC -xlang=c99 -xbuiltin=%none -xinline= 
-xlibmieee -xustr=ascii_utf16_ushort -z ignore -KPIC -DPIC -mt -D_REENTRANT 
-DNDEBUG -D_IN_BUILD_STDCXX -D__EXTENSIONS__ -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_XPG5 -D_POSIX_PTHREAD_SEMANTICS 
-s +w2 -errtags -erroff=hidef"
    setenv CXXFLAGS_BUILD "-library=no%Cstd ${CXXFLAGS_I386_COMMON}"
    setenv CXXFLAGS_TESTS "-library=Cstd ${CXXFLAGS_I386_COMMON}"

    sparc 64bit:
    setenv CC "cc -xtarget=ultra -m64 -xcode=pic32"
    setenv CXX "CC -xtarget=ultra -m64 -xcode=pic32"
    setenv BUILDTYPE 8D
    setenv CFLAGS_SPARC_COMMON "-m64 -xarch=sparcvis -xmemalign=16i -Qoption cg 
-xregs=no%appl -xbuiltin=%none -xO4 -KPIC -DPIC"
    setenv CFLAGS "${CFLAGS_SPARC_COMMON}"
    setenv CXXFLAGS_SPARC_COMMON "-library=Crun -norunpath -Qoption ccfe 
++boolflag:sunwcch=false -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe 
-expand=10000 
-features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic 
-instances=global -template=geninlinefuncs -verbose=template -xvis=yes 
-xregs=no%appl -xO4 -xbuiltin=%none -KPIC -DPIC -xlang=c99 -xbuiltin=%none 
-xinline= -xlibmieee -xustr=ascii_utf16_ushort -z ignore -KPIC -DPIC -mt 
-D_REENTRANT -DNDEBUG -D_IN_BUILD_STDCXX -D__EXTENSIONS__ -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_XPG5 -D_POSIX_PTHREAD_SEMANTICS 
-s +w2 -errtags -erroff=hidef"
    setenv CXXFLAGS_BUILD "-library=no%Cstd ${CXXFLAGS_SPARC_COMMON}"
    setenv CXXFLAGS_TESTS "-library=Cstd ${CXXFLAGS_SPARC_COMMON}"
{noformat}

Then paste this into your (I'm using tcsh) shell to perform the compile.

{noformat}
    setenv TOPDIR  /var/tmp/stdcxx-4.2.1
    setenv CXXFLAGS "${CXXFLAGS_BUILD}"
    setenv BUILDDIR  "${TOPDIR}/build"
    setenv CPPFLAGS "-I/var/tmp/stdcxx-4.2.1/include/ansi 
-I/var/tmp/stdcxx-4.2.1/include/tr1 -I/var/tmp/stdcxx-4.2.1/include"
    setenv LDFLAGS "-lpthread -lumem -lm -lc -s -z ignore"
    setenv LD_OPTIONS "-M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.noexdata 
-M /usr/lib/ld/map.pagealign -lpthread -lumem -lm -lc -s -z ignore"
    cd /var/tmp
    rm -rf /stdcxx stdcxx-4.2.1
    gunzip -c /usr/local/src/utils/stdcxx-4.2.1.tar.gz | tar -xvf -
    gunzip -c /usr/local/src/utils/stdcxx-4.2.1.solaris.studio.patches.tar.gz | 
tar -xvf -
    stdcxx-4.2.1.patches/install_patches_src.sh
    stdcxx-4.2.1.patches/fix_header_files.sh
    cd stdcxx-4.2.1
    mkdir lib
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/collapse_static_locals.lib.cpp                          -o 
lib/collapse_static_locals.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hcollapse_static_locals.lib.so 
lib/collapse_static_locals.lib.o       -o lib/libcollapse_static_locals.lib.so
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/collapse_template_statics.lib.cpp                       -o 
lib/collapse_template_statics.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hcollapse_template_statics.lib.so 
lib/collapse_template_statics.lib.o -o lib/libcollapse_template_statics.lib.so
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/collapse_template_locals.lib.cpp                        -o 
lib/collapse_template_locals.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hcollapse_template_locals.lib.so 
lib/collapse_template_locals.lib.o   -o lib/libcollapse_template_locals.lib.so
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/extern_inline.lib.cpp                                   -o 
lib/extern_inline.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hextern_inline.lib.so 
lib/extern_inline.lib.o                         -o lib/libextern_inline.lib.so
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/lib_exceptions.lib.cpp                                  -o 
lib/lib_exceptions.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hlib_exceptions.lib.so 
lib/lib_exceptions.lib.o                       -o lib/liblib_exceptions.lib.so
    setenv LD_OPTIONS "-L/var/tmp/stdcxx-4.2.1/lib -R/var/tmp/stdcxx-4.2.1/lib 
-L/var/tmp/stdcxx-4.2.1/build/include -R/var/tmp/stdcxx-4.2.1/build/include"
    gmake BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
CXXFLAGS="${CXXFLAGS_BUILD}" LD_OPTIONS="${LD_OPTIONS}" LDFLAGS="${LDFLAGS} 
${LD_OPTIONS}" config
    unsetenv LIBDIR
    unsetenv LD_OPTIONS
    mkdir -p build/lib/.depend
    cp ../stdcxx-4.2.1.patches/atomic-cxx.d build/lib/.depend/.
    touch -acm build/lib/.depend/atomic-cxx.d
    ln -sf config.h build/include/rwconfig_std.h
    find . -type f -name "core" -exec rm -f {} \; -print
    gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
CXXFLAGS="${CXXFLAGS_BUILD}" LDFLAGS="${LDFLAGS}" lib examples util
    mkdir -p build/etc/nls
    ln -s /var/tmp/stdcxx-4.2.1/etc/nls/languages build/etc/nls/languages
    ln -s /var/tmp/stdcxx-4.2.1/etc/nls/encodings build/etc/nls/encodings
    ln -s /var/tmp/stdcxx-4.2.1/etc/nls/countries build/etc/nls/countries
    ln -s /var/tmp/stdcxx-4.2.1/etc/nls/gen_list build/etc/nls/gen_list
    perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i build/makefile.in
    perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i build/include/vars.sh
    perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i etc/config/sunpro.config
    gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" LDFLAGS="${LDFLAGS}" 
CXXFLAGS="${CXXFLAGS_TESTS}" rwtest
    gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" LDFLAGS="${LDFLAGS}" 
CXXFLAGS="${CXXFLAGS_TESTS}" tests
    gmake -C${BUILDDIR}/bin BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" LDFLAGS="${LDFLAGS}" 
CXXFLAGS="${CXXFLAGS_TESTS}" install
    gmake -C${BUILDDIR}/lib BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" LDFLAGS="${LDFLAGS}" 
CXXFLAGS="${CXXFLAGS_TESTS}" install
{noformat}

Attached is a stdcxx-4.2.1.solaris.studio.patches.tar.gz file which contains 
the Solaris specific patches and scripts to apply them, as well as to install 
header files critical to the compile. These were sources from the 
https://java.net/projects/solaris-userland/sources/gate/show/components/stdcxx?rev=1333
 cache.

  was:
Set your environment according to your machine type... intel and sparc examples 
shown

    i386 32bit:
    setenv CC "cc"
    setenv CXX "CC"
    setenv BUILDTYPE 8d
    setenv CFLAGS_I386_COMMON "-m32 -xarch=386 -Xc -features=extinl 
-xregs=no%frameptr -xO3 -xbuiltin=%none -KPIC -DPIC"
    setenv CFLAGS "${CFLAGS_I386_COMMON}"
    setenv CXXFLAGS_I386_COMMON "-library=Crun -norunpath -Qoption ccfe 
++boolflag:sunwcch=false -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe 
-expand=10000 
-features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic 
-instances=global -template=geninlinefuncs -verbose=template -xregs=no%frameptr 
-xO3  -xbuiltin=%none -KPIC -DPIC -xlang=c99 -xbuiltin=%none -xinline= 
-xlibmieee -xustr=ascii_utf16_ushort -z ignore -KPIC -DPIC -mt -D_REENTRANT 
-DNDEBUG -D_IN_BUILD_STDCXX -D__EXTENSIONS__ -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_XPG5 -D_POSIX_PTHREAD_SEMANTICS 
-s +w2 -errtags -erroff=hidef"
    setenv CXXFLAGS_BUILD "-library=no%Cstd ${CXXFLAGS_I386_COMMON}"
    setenv CXXFLAGS_TESTS "-library=Cstd ${CXXFLAGS_I386_COMMON}"

    sparc 64bit:
    setenv CC "cc -xtarget=ultra -m64 -xcode=pic32"
    setenv CXX "CC -xtarget=ultra -m64 -xcode=pic32"
    setenv BUILDTYPE 8D
    setenv CFLAGS_SPARC_COMMON "-m64 -xarch=sparcvis -xmemalign=16i -Qoption cg 
-xregs=no%appl -xbuiltin=%none -xO4 -KPIC -DPIC"
    setenv CFLAGS "${CFLAGS_SPARC_COMMON}"
    setenv CXXFLAGS_SPARC_COMMON "-library=Crun -norunpath -Qoption ccfe 
++boolflag:sunwcch=false -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe 
-expand=10000 
-features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic 
-instances=global -template=geninlinefuncs -verbose=template -xvis=yes 
-xregs=no%appl -xO4 -xbuiltin=%none -KPIC -DPIC -xlang=c99 -xbuiltin=%none 
-xinline= -xlibmieee -xustr=ascii_utf16_ushort -z ignore -KPIC -DPIC -mt 
-D_REENTRANT -DNDEBUG -D_IN_BUILD_STDCXX -D__EXTENSIONS__ -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_XPG5 -D_POSIX_PTHREAD_SEMANTICS 
-s +w2 -errtags -erroff=hidef"
    setenv CXXFLAGS_BUILD "-library=no%Cstd ${CXXFLAGS_SPARC_COMMON}"
    setenv CXXFLAGS_TESTS "-library=Cstd ${CXXFLAGS_SPARC_COMMON}"

Then paste this into your (I'm using tcsh) shell to perform the compile.

    setenv TOPDIR  /var/tmp/stdcxx-4.2.1
    setenv CXXFLAGS "${CXXFLAGS_BUILD}"
    setenv BUILDDIR  "${TOPDIR}/build"
    setenv CPPFLAGS "-I/var/tmp/stdcxx-4.2.1/include/ansi 
-I/var/tmp/stdcxx-4.2.1/include/tr1 -I/var/tmp/stdcxx-4.2.1/include"
    setenv LDFLAGS "-lpthread -lumem -lm -lc -s -z ignore"
    setenv LD_OPTIONS "-M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.noexdata 
-M /usr/lib/ld/map.pagealign -lpthread -lumem -lm -lc -s -z ignore"
    cd /var/tmp
    rm -rf /stdcxx stdcxx-4.2.1
    gunzip -c /usr/local/src/utils/stdcxx-4.2.1.tar.gz | tar -xvf -
    gunzip -c /usr/local/src/utils/stdcxx-4.2.1.solaris.studio.patches.tar.gz | 
tar -xvf -
    stdcxx-4.2.1.patches/install_patches_src.sh
    stdcxx-4.2.1.patches/fix_header_files.sh
    cd stdcxx-4.2.1
    mkdir lib
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/collapse_static_locals.lib.cpp                          -o 
lib/collapse_static_locals.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hcollapse_static_locals.lib.so 
lib/collapse_static_locals.lib.o       -o lib/libcollapse_static_locals.lib.so
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/collapse_template_statics.lib.cpp                       -o 
lib/collapse_template_statics.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hcollapse_template_statics.lib.so 
lib/collapse_template_statics.lib.o -o lib/libcollapse_template_statics.lib.so
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/collapse_template_locals.lib.cpp                        -o 
lib/collapse_template_locals.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hcollapse_template_locals.lib.so 
lib/collapse_template_locals.lib.o   -o lib/libcollapse_template_locals.lib.so
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/extern_inline.lib.cpp                                   -o 
lib/extern_inline.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hextern_inline.lib.so 
lib/extern_inline.lib.o                         -o lib/libextern_inline.lib.so
    ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
etc/config/src/lib_exceptions.lib.cpp                                  -o 
lib/lib_exceptions.lib.o
    ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hlib_exceptions.lib.so 
lib/lib_exceptions.lib.o                       -o lib/liblib_exceptions.lib.so
    setenv LD_OPTIONS "-L/var/tmp/stdcxx-4.2.1/lib -R/var/tmp/stdcxx-4.2.1/lib 
-L/var/tmp/stdcxx-4.2.1/build/include -R/var/tmp/stdcxx-4.2.1/build/include"
    gmake BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
CXXFLAGS="${CXXFLAGS_BUILD}" LD_OPTIONS="${LD_OPTIONS}" LDFLAGS="${LDFLAGS} 
${LD_OPTIONS}" config
    unsetenv LIBDIR
    unsetenv LD_OPTIONS
    mkdir -p build/lib/.depend
    cp ../stdcxx-4.2.1.patches/atomic-cxx.d build/lib/.depend/.
    touch -acm build/lib/.depend/atomic-cxx.d
    ln -sf config.h build/include/rwconfig_std.h
    find . -type f -name "core" -exec rm -f {} \; -print
    gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
CXXFLAGS="${CXXFLAGS_BUILD}" LDFLAGS="${LDFLAGS}" lib examples util
    mkdir -p build/etc/nls
    ln -s /var/tmp/stdcxx-4.2.1/etc/nls/languages build/etc/nls/languages
    ln -s /var/tmp/stdcxx-4.2.1/etc/nls/encodings build/etc/nls/encodings
    ln -s /var/tmp/stdcxx-4.2.1/etc/nls/countries build/etc/nls/countries
    ln -s /var/tmp/stdcxx-4.2.1/etc/nls/gen_list build/etc/nls/gen_list
    perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i build/makefile.in
    perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i build/include/vars.sh
    perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i etc/config/sunpro.config
    gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" LDFLAGS="${LDFLAGS}" 
CXXFLAGS="${CXXFLAGS_TESTS}" rwtest
    gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" LDFLAGS="${LDFLAGS}" 
CXXFLAGS="${CXXFLAGS_TESTS}" tests
    gmake -C${BUILDDIR}/bin BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" LDFLAGS="${LDFLAGS}" 
CXXFLAGS="${CXXFLAGS_TESTS}" install
    gmake -C${BUILDDIR}/lib BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" LDFLAGS="${LDFLAGS}" 
CXXFLAGS="${CXXFLAGS_TESTS}" install

Attached is a stdcxx-4.2.1.solaris.studio.patches.tar.gz file which contains 
the Solaris specific patches and scripts to apply them, as well as to install 
header files critical to the compile. These were sources from the 
https://java.net/projects/solaris-userland/sources/gate/show/components/stdcxx?rev=1333
 cache.

    
> HOWTO: Compiling stdcxx 4.2.1 on Solaris with Sun Studio 12.3 compiler
> ----------------------------------------------------------------------
>
>                 Key: STDCXX-1074
>                 URL: https://issues.apache.org/jira/browse/STDCXX-1074
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: Build and Installation
>    Affects Versions: 4.2.1
>         Environment: Tested on:
> Solaris 10 i386 32bit
> Solaris 11 i386 32bit
> Solaris 10 SPARC 64bit
>            Reporter: Mark Ashley
>            Priority: Minor
>              Labels: compiler, solaris, studio
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-4.2.1.solaris.studio.patches.tar.gz
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> Set your environment according to your machine type... intel and sparc 
> examples shown
> {noformat}
>     i386 32bit:
>     setenv CC "cc"
>     setenv CXX "CC"
>     setenv BUILDTYPE 8d
>     setenv CFLAGS_I386_COMMON "-m32 -xarch=386 -Xc -features=extinl 
> -xregs=no%frameptr -xO3 -xbuiltin=%none -KPIC -DPIC"
>     setenv CFLAGS "${CFLAGS_I386_COMMON}"
>     setenv CXXFLAGS_I386_COMMON "-library=Crun -norunpath -Qoption ccfe 
> ++boolflag:sunwcch=false -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe 
> -expand=10000 
> -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic 
> -instances=global -template=geninlinefuncs -verbose=template 
> -xregs=no%frameptr -xO3  -xbuiltin=%none -KPIC -DPIC -xlang=c99 
> -xbuiltin=%none -xinline= -xlibmieee -xustr=ascii_utf16_ushort -z ignore 
> -KPIC -DPIC -mt -D_REENTRANT -DNDEBUG -D_IN_BUILD_STDCXX -D__EXTENSIONS__ 
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_XPG5 
> -D_POSIX_PTHREAD_SEMANTICS -s +w2 -errtags -erroff=hidef"
>     setenv CXXFLAGS_BUILD "-library=no%Cstd ${CXXFLAGS_I386_COMMON}"
>     setenv CXXFLAGS_TESTS "-library=Cstd ${CXXFLAGS_I386_COMMON}"
>     sparc 64bit:
>     setenv CC "cc -xtarget=ultra -m64 -xcode=pic32"
>     setenv CXX "CC -xtarget=ultra -m64 -xcode=pic32"
>     setenv BUILDTYPE 8D
>     setenv CFLAGS_SPARC_COMMON "-m64 -xarch=sparcvis -xmemalign=16i -Qoption 
> cg -xregs=no%appl -xbuiltin=%none -xO4 -KPIC -DPIC"
>     setenv CFLAGS "${CFLAGS_SPARC_COMMON}"
>     setenv CXXFLAGS_SPARC_COMMON "-library=Crun -norunpath -Qoption ccfe 
> ++boolflag:sunwcch=false -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe 
> -expand=10000 
> -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic 
> -instances=global -template=geninlinefuncs -verbose=template -xvis=yes 
> -xregs=no%appl -xO4 -xbuiltin=%none -KPIC -DPIC -xlang=c99 -xbuiltin=%none 
> -xinline= -xlibmieee -xustr=ascii_utf16_ushort -z ignore -KPIC -DPIC -mt 
> -D_REENTRANT -DNDEBUG -D_IN_BUILD_STDCXX -D__EXTENSIONS__ -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_XPG5 -D_POSIX_PTHREAD_SEMANTICS 
> -s +w2 -errtags -erroff=hidef"
>     setenv CXXFLAGS_BUILD "-library=no%Cstd ${CXXFLAGS_SPARC_COMMON}"
>     setenv CXXFLAGS_TESTS "-library=Cstd ${CXXFLAGS_SPARC_COMMON}"
> {noformat}
> Then paste this into your (I'm using tcsh) shell to perform the compile.
> {noformat}
>     setenv TOPDIR  /var/tmp/stdcxx-4.2.1
>     setenv CXXFLAGS "${CXXFLAGS_BUILD}"
>     setenv BUILDDIR  "${TOPDIR}/build"
>     setenv CPPFLAGS "-I/var/tmp/stdcxx-4.2.1/include/ansi 
> -I/var/tmp/stdcxx-4.2.1/include/tr1 -I/var/tmp/stdcxx-4.2.1/include"
>     setenv LDFLAGS "-lpthread -lumem -lm -lc -s -z ignore"
>     setenv LD_OPTIONS "-M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.noexdata 
> -M /usr/lib/ld/map.pagealign -lpthread -lumem -lm -lc -s -z ignore"
>     cd /var/tmp
>     rm -rf /stdcxx stdcxx-4.2.1
>     gunzip -c /usr/local/src/utils/stdcxx-4.2.1.tar.gz | tar -xvf -
>     gunzip -c /usr/local/src/utils/stdcxx-4.2.1.solaris.studio.patches.tar.gz 
> | tar -xvf -
>     stdcxx-4.2.1.patches/install_patches_src.sh
>     stdcxx-4.2.1.patches/fix_header_files.sh
>     cd stdcxx-4.2.1
>     mkdir lib
>     ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
> etc/config/src/collapse_static_locals.lib.cpp                          -o 
> lib/collapse_static_locals.lib.o
>     ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hcollapse_static_locals.lib.so 
> lib/collapse_static_locals.lib.o       -o lib/libcollapse_static_locals.lib.so
>     ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
> etc/config/src/collapse_template_statics.lib.cpp                       -o 
> lib/collapse_template_statics.lib.o
>     ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G 
> -hcollapse_template_statics.lib.so lib/collapse_template_statics.lib.o -o 
> lib/libcollapse_template_statics.lib.so
>     ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
> etc/config/src/collapse_template_locals.lib.cpp                        -o 
> lib/collapse_template_locals.lib.o
>     ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hcollapse_template_locals.lib.so 
> lib/collapse_template_locals.lib.o   -o lib/libcollapse_template_locals.lib.so
>     ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
> etc/config/src/extern_inline.lib.cpp                                   -o 
> lib/extern_inline.lib.o
>     ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hextern_inline.lib.so 
> lib/extern_inline.lib.o                         -o lib/libextern_inline.lib.so
>     ${CXX} ${CPPFLAGS} ${CXXFLAGS_BUILD} -c 
> etc/config/src/lib_exceptions.lib.cpp                                  -o 
> lib/lib_exceptions.lib.o
>     ${CXX} ${CXXFLAGS_BUILD} ${LDFLAGS}  -G -hlib_exceptions.lib.so 
> lib/lib_exceptions.lib.o                       -o lib/liblib_exceptions.lib.so
>     setenv LD_OPTIONS "-L/var/tmp/stdcxx-4.2.1/lib 
> -R/var/tmp/stdcxx-4.2.1/lib -L/var/tmp/stdcxx-4.2.1/build/include 
> -R/var/tmp/stdcxx-4.2.1/build/include"
>     gmake BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
> CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
> PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
> BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
> CXXFLAGS="${CXXFLAGS_BUILD}" LD_OPTIONS="${LD_OPTIONS}" LDFLAGS="${LDFLAGS} 
> ${LD_OPTIONS}" config
>     unsetenv LIBDIR
>     unsetenv LD_OPTIONS
>     mkdir -p build/lib/.depend
>     cp ../stdcxx-4.2.1.patches/atomic-cxx.d build/lib/.depend/.
>     touch -acm build/lib/.depend/atomic-cxx.d
>     ln -sf config.h build/include/rwconfig_std.h
>     find . -type f -name "core" -exec rm -f {} \; -print
>     gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
> CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
> PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
> BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
> CXXFLAGS="${CXXFLAGS_BUILD}" LDFLAGS="${LDFLAGS}" lib examples util
>     mkdir -p build/etc/nls
>     ln -s /var/tmp/stdcxx-4.2.1/etc/nls/languages build/etc/nls/languages
>     ln -s /var/tmp/stdcxx-4.2.1/etc/nls/encodings build/etc/nls/encodings
>     ln -s /var/tmp/stdcxx-4.2.1/etc/nls/countries build/etc/nls/countries
>     ln -s /var/tmp/stdcxx-4.2.1/etc/nls/gen_list build/etc/nls/gen_list
>     perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i build/makefile.in
>     perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i build/include/vars.sh
>     perl -pe 's/-library=no%Cstd/-library=Cstd/g' -i etc/config/sunpro.config
>     gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
> CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
> PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
> BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
> LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS_TESTS}" rwtest
>     gmake -C${BUILDDIR} BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
> CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
> PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
> BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
> LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS_TESTS}" tests
>     gmake -C${BUILDDIR}/bin BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
> CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
> PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
> BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
> LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS_TESTS}" install
>     gmake -C${BUILDDIR}/lib BUILDDIR="${BUILDDIR}" BUILDTYPE="${BUILDTYPE}" 
> CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CONFIG=sunpro.config 
> PREFIX=/usr/local SHELL=/bin/bash CC="${CC}" CXX="${CXX}" 
> BUILDMODE="shared,pthreads" TOPDIR="/var/tmp/stdcxx-4.2.1" 
> LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS_TESTS}" install
> {noformat}
> Attached is a stdcxx-4.2.1.solaris.studio.patches.tar.gz file which contains 
> the Solaris specific patches and scripts to apply them, as well as to install 
> header files critical to the compile. These were sources from the 
> https://java.net/projects/solaris-userland/sources/gate/show/components/stdcxx?rev=1333
>  cache.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to