Project

General

Profile

Cross-compiling

Assume Debian (Linux) to Dyson.

APT repository

Dyson's APT repository includes pre-compiled packages for Debian (Linux / amd64). Add this line to /etc/apt/sources.list:

deb [ arch=amd64 ] http://apt.osdyson.org unstable main

Building binutils

Both normal and cross binutils should be installed on Debian (Linux) system. Thus original (not patched) version of binutils is overwritten by the Dyson's binutils. This is pretty safe, because Dyson's patches only affect Solaris targets, also Dyson's binutils are usually newer that Debian's.

  1. Get binutils source package from http://apt.osdyson.org/pool/main/b/binutils/ (you need version patched for Dyson), e. g.:
    $ dget -u http://apt.osdyson.org/pool/main/b/binutils/binutils_2.28-5%2Bdyson1.dsc
    
  2. Build normal binutils:
    $ cd binutils-2.28
    $ ./debian/rules stamps/control
    $ dpkg-buildpackage --build=any
    
  3. Build cross binutils. According to debian/README.cross it's quite simple:
    $ cd binutils-2.28
    $ TARGET=x86_64-pc-solaris2.11 ./debian/rules stamps/control
    $ TARGET=x86_64-pc-solaris2.11 dpkg-buildpackage --build=any
    
  4. Result:
    ...
    find debian/binutils-x86-64-pc-solaris2.11 -depth -newermt 'Sat, 13 May 2017 13:33:58 +0300' -print0 | \
        xargs -0r touch --no-dereference --date='Sat, 13 May 2017 13:33:58 +0300'
    dpkg --build debian/binutils-x86-64-pc-solaris2.11 ..
    dpkg-deb: building package 'binutils-x86-64-pc-solaris2.11' in '../binutils-x86-64-pc-solaris2.11_2.28-5+dyson1_amd64.deb'.
    
    $ dpkg -c ../binutils-x86-64-pc-solaris2.11_2.28-5+dyson1_amd64.deb
    drwxr-xr-x root/root         0 2017-05-13 13:33 ./
    drwxr-xr-x root/root         0 2017-05-13 13:33 ./usr/
    drwxr-xr-x root/root         0 2017-05-13 13:33 ./usr/bin/
    -rwxr-xr-x root/root     28176 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-addr2line
    -rwxr-xr-x root/root     56856 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-ar
    -rwxr-xr-x root/root    369928 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-as
    -rwxr-xr-x root/root     23776 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-c++filt
    -rwxr-xr-x root/root   3064344 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-dwp
    -rwxr-xr-x root/root     28160 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-elfedit
    -rwxr-xr-x root/root     93144 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-gprof
    -rwxr-xr-x root/root   1185712 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-ld
    hrwxr-xr-x root/root         0 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-ld.bfd link to ./usr/bin/x86_64-pc-solaris2.11-ld
    -rwxr-xr-x root/root   5206392 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-ld.gold
    -rwxr-xr-x root/root     41192 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-nm
    -rwxr-xr-x root/root    222448 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-objcopy
    -rwxr-xr-x root/root    353144 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-objdump
    -rwxr-xr-x root/root     56856 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-ranlib
    -rwxr-xr-x root/root    494112 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-readelf
    -rwxr-xr-x root/root     28024 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-size
    -rwxr-xr-x root/root     28144 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-strings
    -rwxr-xr-x root/root    222456 2017-05-13 13:33 ./usr/bin/x86_64-pc-solaris2.11-strip
    drwxr-xr-x root/root         0 2017-05-13 13:33 ./usr/lib/
    drwxr-xr-x root/root         0 2017-05-13 13:33 ./usr/lib/x86_64-linux-gnu/
    -rw-r--r-- root/root   1234664 2017-05-13 13:33 ./usr/lib/x86_64-linux-gnu/libbfd-2.28-solaris-amd64.so
    -rw-r--r-- root/root   1661968 2017-05-13 13:33 ./usr/lib/x86_64-linux-gnu/libopcodes-2.28-solaris-amd64.so
    ...
    

Building GCC

To be done

Also available in: PDF HTML TXT