Just as a progress update, I have a working local RPM5 build and I
am able to build working packages out of it with the new XZ compression
support which results in smaller package payloads.
So I have got the basic Gcc 4.5.2 toolchain working and RPM5 packages.
I am now working on re-building packages for RPM5 itself using this new
compiler build. Once this is done I can provide a bootstrap mechanism so
that others can try out the packages. In the meantime I am providing a
tarball dump of all these packages which you can extract into your
OpenIndiana environment to play with the new compiler.
These will overwrite a few system files. However I am running my OI
environment with these packages installed so these should not screw
your system's happiness.
Here are the steps:
# Check you r boot envs
beadm list
--> Lets assume the active BE is named openindiana
# Take a boot env snapshot, just in case
beadm create openindiana@toolchain_dump
--> You are safe now
# Change to root
pfexec su -
cd /
# If you have gcc432 and mpfr package installed, uninstall them
pkg uninstall developer/gcc/gcc-dev-4
pkg uninstall developer/gcc/gcc-runtime-432
pkg uninstall developer/gcc/gcc-runtime-43
pkg uninstall developer/gcc/gcc-dev-4
pkg uninstall developer/gcc/gcc-432
pkg uninstall developer/gcc-3
pkg uninstall library/mpfr
# Download and unpack toolchain binaries
wget http://www.belenix.org/binfiles/toolchain.tar.bz2
bunzip2 -c toolchain.tar.bz2 | gtar xvpf -
/usr/bin/gcc --version
gcc (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Enjoy ...
It was fairly troublesome to get to this point. The proper working Gcc
3.4 compiler
in OI is too old and does no build some stuff properly and also has
older C++ ABI
compared to Gcc 4.x. So I tried using the Gcc 4.3.2 compiler in OI and found it
to be half useless. It has a bunch of problems:
1) It provides libssp.so which the compiler looks for
libssp_nonshared.a! Libssp is
a stack smash attack protector.
2) It has a improperly linked libstdc++ so C++ exception handling breaks and
crashes.
3) It is unable to compile the Parma Polyhedral Library required by
gcc to support
loop optimizations via advanced Polyhedral methods. It does not
appear to handle
C++ templates properly.
So I managed to do this:
1) Somehow build RPM5 and its dependencies in 64-bit mode using the ancient
Gcc 3.4 compiler in OI and dump them in /usr/local
2) Work out a set of required rpm macros to support the OpenSolaris platform.
3) Use this rpm to build subsequent packages.
4) Use the Gcc 4.3.2 compiler to build latest GMP. GMP delivers C++ stuff and
due to ABI and support concerns I could not use the Gcc 3.4. Exceptions were
enabled but they were not working!
5) Use SUN Studio to build Gcc 4.5.2 without ClooG/PPL support for loop
optimizations. Gcc 4.5.2 minimally needs latest GMP and base Mpfr. The Mpfr
already part of OI was fortunately enough.
6) Use this Gcc 4.5.2 to rebuild GMP and build Cloog/PPL. Exception handling was
now working - yay.
7) Throw out Gcc 4.3.2 and Gcc 3.4.
8) Build latest Mpfr and install it. Uninstall older Mpfr. Gcc 4.5.2
does not work now
since it used older Mpfr which has dfferent API signature!!
9) Rebuild Gcc 4.5.2 with SUN Studio so that it uses latest GMP, MPFR and
ClooG/PPL --- Everything works now PHEW!
10) Build latest ZLIB with a variety of optimizations including Loop
optimizations and
the new Link Time Optimization that can inline across compilation units among
other things. Replace system zlib using this one.
Remember I built all these are RPM5 packages. The toolchain download includes
all these binaries, but obviously no package info.
Next steps are to build RPM5 and all its deps as RPM packages. With proper
support for alternate-root install and driver install macros. The aim here is to
automate as much common post-install requirements as possible into pre-defined
macros so that post-install scripting can be avoided unless absolutely
necessary.
<-- RANT -->
The draconian, dictatorial, troublesome non-support of post install
scripting in IPS
is unwelcome to us. We cannot expect the entire free-software phenomenon on
this planet to think packaging the way we want it to be! The packaging software
can set guidelines but should also be flexible to cater to the needs
of a massively
diverse free software collection. It cannot be vice-versa except for
in limited tightly
controlled or dictated contexts.
</-- RANT -->
Regards,
Moinak.
---------- Forwarded message ----------
From: belenix-notify <belenix...@lists.sourceforge.net>
Date: Sun, Jan 23, 2011 at 12:48 PM
Subject: [belenix-notify] SF.net SVN: belenix:[414] trunk/spec_files
To: belenix...@lists.sourceforge.net
Revision: 414
http://belenix.svn.sourceforge.net/belenix/?rev=414&view=rev
Author: moinakg
Date: 2011-01-23 07:18:39 +0000 (Sun, 23 Jan 2011)
Log Message:
-----------
Initial RPM5 spec files for basic Gcc4 based toolchain.
Added Paths:
-----------
trunk/spec_files/rpms/
trunk/spec_files/rpms/cloog.spec
trunk/spec_files/rpms/ext-sources/
trunk/spec_files/rpms/gcc.spec
trunk/spec_files/rpms/gmp.spec
trunk/spec_files/rpms/graphviz.spec
trunk/spec_files/rpms/include/
trunk/spec_files/rpms/include/rpmmacros
trunk/spec_files/rpms/include/sysinfo
trunk/spec_files/rpms/macros
trunk/spec_files/rpms/mpc.spec
trunk/spec_files/rpms/mpfr.spec
trunk/spec_files/rpms/patches/
trunk/spec_files/rpms/patches/gcc4-01-nameser_compat.diff
trunk/spec_files/rpms/patches/gcc4-02-handle_pragma_pack_push_pop.diff
trunk/spec_files/rpms/patches/gcc45-c++-builtin-redecl.patch
trunk/spec_files/rpms/patches/gcc45-libgomp-omp_h-multilib.patch
trunk/spec_files/rpms/patches/gcc45-libstdc++-docs.patch
trunk/spec_files/rpms/patches/gcc45-pr33763.patch
trunk/spec_files/rpms/patches/gcc45-pr38757.patch
trunk/spec_files/rpms/patches/ppl-01-CS.diff
trunk/spec_files/rpms/patches/ppl-02-defs.diff
trunk/spec_files/rpms/patches/zlib-1.2.5-gentoo.patch
trunk/spec_files/rpms/ppl.spec
trunk/spec_files/rpms/utils/
trunk/spec_files/rpms/utils/bpkg
trunk/spec_files/rpms/zlib.spec
[snipped]
_______________________________________________
belenix-notify mailing list
belenix...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/belenix-notify
--
================================
http://www.belenix.org/
http://moinakg.wordpress.com/
_______________________________________________
belenix-discuss mailing list
http://mail.opensolaris.org/mailman/listinfo/belenix-discuss
http://groups.google.com/group/belenix-discuss