Name | Last modified | Size | Description | |
---|---|---|---|---|
Parent Directory | - | |||
2007-VGP352/ | 2007-03-20 00:25 | - | ||
2007-VGP353/ | 2007-05-28 06:26 | - | ||
2007-VGP393/ | 2007-12-11 19:49 | - | ||
2007Q1-VGP352/ | 2009-09-30 17:24 | - | ||
2007Q2-VGP353/ | 2009-09-30 17:24 | - | ||
2007Q4-VGP351/ | 2008-01-17 01:12 | - | ||
2007Q4-VGP393/ | 2009-09-30 17:24 | - | ||
2008Q1-VGP352/ | 2008-03-13 05:31 | - | ||
2008Q2-VGP353/ | 2008-05-14 01:03 | - | ||
2008Q3-VGP393/ | 2008-09-11 06:11 | - | ||
2009Q1-VGP351/ | 2009-03-20 04:46 | - | ||
2009Q2-VGP352/ | 2009-06-13 18:14 | - | ||
2009Q3-VGP353/ | 2009-08-29 05:52 | - | ||
2009Q4-VGP351/ | 2009-12-13 04:43 | - | ||
2010Q1-VGP352/ | 2010-03-17 23:58 | - | ||
2010Q2-VGP351/ | 2010-06-14 06:47 | - | ||
2010Q4-VGP352/ | 2010-12-16 00:32 | - | ||
2011Q1-CS341/ | 2011-04-06 21:15 | - | ||
2011Q1-VGP353/ | 2011-03-22 22:50 | - | ||
2011Q2-CS341/ | 2011-06-06 18:53 | - | ||
2011Q4-VGP351/ | 2011-12-14 17:23 | - | ||
2012Q1-VGP352/ | 2012-03-08 01:51 | - | ||
2012Q2-VGP353/ | 2012-05-31 02:12 | - | ||
2012Q4-VGP351/ | 2012-12-06 04:51 | - | ||
2013Q1-VGP352/ | 2013-02-28 02:17 | - | ||
2013Q2-VGP353/ | 2013-05-23 16:31 | - | ||
GLSL_presentation/ | 2009-10-04 21:39 | - | ||
Intel-4004/ | 2022-11-11 22:38 | - | ||
LCA2015/ | 2015-01-14 20:31 | - | ||
OpenGL_tutorials/ | 2010-04-07 00:11 | - | ||
SGI_compiler_docs/ | 2010-05-05 18:33 | - | ||
cmod-results/ | 2015-01-22 17:09 | - | ||
dpas_swsb/ | 2024-04-12 18:40 | - | ||
glu3/ | 2010-05-13 02:59 | - | ||
initializer/ | 2010-08-30 15:22 | - | ||
map-notes/ | 2012-02-28 17:21 | - | ||
results/ | 2016-10-04 15:15 | - | ||
simple2.shader_test | 2012-03-20 23:56 | 133 | ||
simple.shader_test | 2012-03-20 23:41 | 167 | ||
git-send-email-shortcut | 2010-10-07 22:42 | 264 | ||
idr-mesa-build-flags.txt | 2024-06-17 20:35 | 679 | ||
compare-perf.sh | 2020-05-14 15:37 | 1.0K | ||
after.txt | 2023-01-31 16:01 | 1.1K | ||
divide.glsl | 2016-09-08 20:16 | 1.3K | ||
bad_file.patch | 2017-01-25 20:05 | 1.4K | ||
lower_vector_derefs.patch | 2018-10-08 18:16 | 1.4K | ||
shared-atomicCompSwap-int64.shader_test | 2018-08-31 19:29 | 1.5K | ||
udivmod64.glsl | 2016-09-15 01:58 | 1.5K | ||
0001-WIR-nir-algebraic-Eliminiate-spurious-type-conversio.patch | 2020-02-11 00:02 | 1.5K | ||
atomicCompSwap-float-vs-NaN.png | 2018-05-30 02:45 | 2.0K | ||
bad_vs.txt | 2021-12-09 22:58 | 2.5K | ||
big_matrix.shader_test | 2023-05-24 04:46 | 3.0K | ||
results.txt | 2022-07-07 01:18 | 4.6K | ||
noise.tar.bz2 | 2010-08-25 20:15 | 5.8K | ||
0001-report.py-Gather-and-log-some-statistics-about-the-h.patch | 2018-03-22 18:48 | 6.1K | ||
light_cycles_pillow.jpg | 2010-08-02 23:59 | 6.1K | ||
robust.patch | 2013-02-21 18:07 | 6.3K | ||
iadd64.html | 2022-10-27 18:21 | 6.7K | ||
problems.txt | 2024-01-23 23:53 | 6.9K | ||
udivmod64.cpp | 2016-09-15 01:58 | 7.2K | ||
0002-Use-confidence-interval-instead.patch | 2018-03-22 18:48 | 8.9K | ||
clientinfo_unittest.cpp | 2013-01-29 22:55 | 8.9K | ||
opsdotkhr.txt | 2024-05-30 23:37 | 9.0K | ||
eglinfo.txt | 2019-01-23 19:22 | 9.1K | ||
dump.txt | 2013-05-06 21:45 | 9.3K | ||
README.html | 2021-10-20 03:27 | 13K | ||
total-changes.txt | 2019-01-24 19:06 | 23K | ||
firehose.jpg | 2017-11-28 01:23 | 28K | ||
mesa-review-stats.html | 2015-01-14 20:12 | 29K | ||
pcss.jpg | 2012-05-02 19:46 | 41K | ||
before-vs-after.txt | 2020-01-22 23:31 | 48K | ||
oops.jpg | 2018-08-20 16:16 | 74K | ||
snowpocalypse.jpg | 2023-02-23 16:12 | 90K | ||
emerge-output.txt | 2022-03-01 01:18 | 93K | ||
fedora-23-derp.jpg | 2015-11-27 23:50 | 100K | ||
IMG_20171022_180850.jpg | 2017-10-23 02:04 | 114K | ||
IMG_20171022_180904.jpg | 2017-10-23 02:04 | 115K | ||
screenshot.jpg | 2022-01-11 18:22 | 127K | ||
issue-4213-shader.txt | 2021-09-20 19:46 | 167K | ||
MESA_gpu_program3.txt | 2009-10-19 23:06 | 190K | ||
directions.png | 2019-10-17 17:53 | 207K | ||
before.txt | 2022-11-23 00:23 | 494K | ||
glsl-mat-from-int-ctor-03-NIR_PRINT.txt | 2019-03-01 22:22 | 536K | ||
diff.txt | 2020-12-03 23:51 | 607K | ||
mesa_build.txt | 2019-06-17 21:21 | 704K | ||
changes.txt | 2023-05-25 01:21 | 731K | ||
nec-multisync-xv29.jpg | 2022-01-26 18:31 | 938K | ||
output.txt | 2023-05-31 18:00 | 1.2M | ||
IMG_20170809_171659.jpg | 2017-08-10 00:18 | 1.4M | ||
permedia_misc.tar.bz2 | 2010-03-08 03:07 | 2.0M | ||
This process is not for the faint of heart. There are a lot of tedious steps involved. There are two major "phases." The first phase builds a cross-binutils and a cross-compiler that runs on the host (assuming a modern Linux system) to generate binaries for the SPARC v8 Solaris platform. The second phase uses the components built in the first phase to build native binutils and a native compiler that will run on the SPARC v8 Solaris platform.
The reference target (and ultimately build) system used for this document is a SPARCstation 5 running Solaris 2.6. Names and locations of files may differ on other versions of Solaris. Platform-specific flags may differ for other SPARC processors. The reference host system used for this document is a x86-64 running Fedora 33.
Much of the information in this document is based on How to Build a GCC Cross-Compiler.
Before starting down this long and winding road, there is a bunch of software that must be collected both from the Internet and from the Solaris system.
Testing cross-binuntils and building the cross-compiler require some files from the Solaris system. Specifically, the contents of /usr/lib
and /usr/include
are needed. Collect those files using the following commands:
cd /usr
tar cf $HOME/from-Solaris.tar include lib
Transfer the resulting from-Solaris.tar
file to the build system.
FINISHME: Also need values-Xa.o
from the target system!
The complete compiler suite includes GNU binutils and the GNU compiler collection. Binutils from GIT was found to work with only trivial issues (discussed in the 'Building the cross-tools' section). The releases/gcc-4.3
branch from this repository should be used for GCC. Several code changes were necessary for GCC 4.3, and those are included in this repository.
In addition, building GCC requires mpfr
, gmp
, and mpc
. On Fedora 33, the development packages installed on the system were sufficient to build the cross-compiler. Building these packages from source code was only necessary to build the native compiler.
All of the relevant code can be acquired with the following commands:
wget http://ftpmirror.gnu.org/mpfr/mpfr-3.1.2.tar.xz
wget http://ftpmirror.gnu.org/gmp/gmp-6.0.0a.tar.xz
wget http://ftpmirror.gnu.org/mpc/mpc-1.0.2.tar.gz
git clone git://sourceware.org/git/binutils-gdb.git
git clone https://github.com/ianromanick/gcc.git
It is possible to newer versions of mpfr
, gmp
, and mpc
will also work. The versions listed here were used in the article referenced above for building GCC 4.9.2.
All of the cross-tools will be installed in ~/sparc
. The first step is to partially populate this directory with the files acquired from the Solaris machine.
cd ~
mkdir -p sparc/sparc-sun-solaris2
cd sparc/sparc-sun-solaris2
tar xf ~/from-Solaris.tar
mv include sys-include
The first major piece of software to build is binutils. At least as of b3a01ce2155
("CTF: incorrect underlying type setting for enumeration types"), binutils GIT seems to work properly without major problems. The one small issue related to the target system name. Many of the later pieces of software require the full target system name, sparc-sun-solaris2.6
. However, the binutils configure
script claims this is unsupported. Leaving off the minor version, sparc-sun-solaris2
, works fine.
mkdir binutils-gdb-sparc-sun-solaris2
cd binutils-gdb-sparc-sun-solaris2
../binutils-gdb/configure --prefix=~/sparc --target=sparc-sun-solaris2
make && make install
After installation, a couple steps are necessary to "clean up" for the next software packages. Specifically, links must be created from the sparc-sun-solaris2
files and directories to sparc-sun-solaris2.6
files and directories.
cd ~/sparc/bin
for i in sparc-sun-solaris2-*; do
ln $i $(echo $i | sed 's/solaris2/solaris2.6/')
done
cd ..
ln -s sparc-sun-solaris2 sparc-sun-solaris2.6
At this point it is possible to assemble and link a small program to run on the target system! Copy and paste the following assembly program to a file called a.s
.
.global main
main:
save %sp, -112, %sp
mov 15, %o2
mov 1, %o0
sethi %hi(msg), %o1
mov 0, %i0
call write, 0
or %o1, %lo(msg), %o1
jmp %i7+8
restore
msg:
.asciz "Hello, world!\n"
Assemble and link the program with the following commands:
sparc-sun-solaris2.6-as a.s -o a.o
sparc-sun-solaris2.6-ld a.o -lc -o hello1
This should result in a hello1
file that is in the neighborhood of 2,100 bytes. More importantly, the file
command should describe it as "ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically linked, interpreter /usr/lib/ld.so.1, not stripped
". Copy the hello1
file to the Solaris sysem, and run it there. It should produce the output, "Hello, world!"
Assuming the simple program works as expected on the Solaris system, it is time to move on to building the cross-compiler.
Building the cross-compiler proceeds in a manner similar to building the cross-binutils. There are two additional hitches. At some point between 2011 and 2021, the texinfo tools changed in a backwards incompatible way. As a result, 2021 texinfo tools cannot build the documenation for GCC 4.3. This can probably be fixed, but the root cause of the problem as not been investigated. A workaround is to replace the makeinfo
command with the true
command. In addition, there seem to be problems buiding GCC 4.3 with parallel make
. The make
commandline shown below works around both of these issues:
cd gcc
git checkout releases/gcc-4.3
cd ..
mkdir gcc-sparc-sun-solaris2.6
cd gcc-sparc-sun-solaris2.6
../gcc/configure --prefix=~/sparc --target=sparc-sun-solaris2 \
--enable-obsolete --enable-languages='c,c++'
make MAKEINFO=/usr/bin/true -j1 && make install
Only the compilers for C and C++ are built because those are the only languages needed to build the native compiler.
At this point it is possible to compile a small program to run on the target system! Copy and paste the following C program to a file called b.c
.
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello, world!\n");
return 0;
}
Compile the program with the following command:
sparc-sun-solaris2.6-gcc b.c -o hello2
This should result in a hello2
file that is in the neighborhood of 6,300 bytes. More importantly, the file
command should describe it as "ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically linked, interpreter /usr/lib/ld.so.1, not stripped
". Copy the hello2
file to the Solaris sysem, and run it there. It should produce the output, "Hello, world!"
Assuming the simple program works as expected on the Solaris system, it is time to move on to building the native compiler. This is where the "fun" really begins.
All of the native tools will be installed in /opt/local
. Normally these tools would be installed on the target machine in /usr/local
. Since /usr/local
on the build machine contains native binaries, it is not practical to build the programs to install there. /opt/local
is chosen because it is unlikely to confict with anything on the build system, and it should also work on the target system. Using chroot
is also possible, but it is requires more effort.
Prepare the installation directory using the following commands:
sudo mkdir /opt/local
sudo chown $(id -un):$(id -gn) /opt/local
gmp
FINISHME
tar xf gmp-6.0.0a.tar.xz
mkdir gmp-sparc-sun-solaris2.6
cd gmp-sparc-sun-solaris2.6
../gmp-6.0.0/configure --prefix=/opt/local --target=sparc-sun-solaris2.6 \
--host=sparc-sun-solaris2.6 --build=$MACHTYPE
make && make install
cd ..
mpfr
FINISHME
tar xf mpfr-3.1.2.tar.xz
mkdir mpfr-sparc-sun-solaris2.6
cd mpfr-sparc-sun-solaris2.6
../mpfr-3.1.2/configure --prefix=/opt/local --target=sparc-sun-solaris2.6 \
--host=sparc-sun-solaris2.6 --build=$MACHTYPE --with-gmp=/opt/local
make && make install
cd ..
mpc
FINISHME
tar xf mpc-1.0.2.tar.gz
mkdir mpc-sparc-sun-solaris2.6
cd mpc-sparc-sun-solaris2.6
../mpc-1.0.2/configure --prefix=/opt/local --target=sparc-sun-solaris2.6 \
--host=sparc-sun-solaris2.6 --build=$MACHTYPE --with-gmp=/opt/local \
--with-mpfr=/opt/local
make && make install
cd ..
FINISHME
mkdir binutils-gdb-sparc-sun-solaris2-native
cd binutils-gdb-sparc-sun-solaris2-native
../binutils-gdb/configure --prefix=/opt/local --target=sparc-sun-solaris2 \
--host=sparc-sun-solaris2 --build=$MACHTYPE
make && make install
FINISHME
mkdir gcc-sparc-sun-solaris2.6
cd gcc-sparc-sun-solaris2.6-native
../gcc/configure --prefix=/opt/local --target=sparc-sun-solaris2 \
--host=sparc-sun-solaris2 --build=$MACHTYPE --enable-obsolete \
--enable-languages='c,c++' --with-gmp=/opt/local \
--with-mpfr=/opt/local --with-mpc=/opt/local
make MAKEINFO=/usr/bin/true -j1 && make install
Transfering the files to the Solaris system presents still more problems. Several of the files have full paths that are longer than 99 characters, and Solaris 2.6 tar
cannot handle that. It will terminate with the error
tar: directory checksum error
The majority of online sources (e.g., stackechange) will emphatically state that this is due to giving tar
a compressed file, but that is not the only cause of this problem. An IBM support article does, however, provide a correct solution without providing any analysis of the root cause. There are two reasonable solutions. As suggested in the IBM support article, cross-building GNU Tar for the target system will work. Having GNU Tar on the target system is probably the best long-term solution. Cross-building it should be accomplished in a similar manner as cross-building any of the other components built here.
An alternative workaround is the create two separate archive files. The first contains all of the files except the files in local/include/c++/4.3.6/ext/pb_ds/detail
, and the second contains only those files. The second archive is created relative to that directory, so the full paths of those files are much, much shorter.
cd /opt
tar -c -H v7 --exclude='local/include/c++/4.3.6/ext/pb_ds/detail/*' \
-f ~/everything.tar local
cd local/include/c++/4.3.6/ext/pb_ds
tar -c -H v7 -f ~/just-detail.tar detail
Once the files are extracted on the target system there are a couple additional steps.
bin:bin
using cd /opt/local ; chown -R bin:bin *
/opt/local/bin
to the user's PATH
variable./opt/local/lib
to the user's LD_LIBRARY_PATH
variable.