Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 609602 - sys-devel/crossdev: Add default options for mmix target
Summary: sys-devel/crossdev: Add default options for mmix target
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: crossdev-bugs
  Show dependency tree
 
Reported: 2017-02-17 07:38 UTC by Matthias Maier
Modified: 2017-11-21 23:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Maier gentoo-dev 2017-02-17 07:38:25 UTC
Hi folks,

with a minor change to the crossdev script, essentially adding

  case ${CTARGET} in
      ...
      mmix*)
          KPKG="[none]";
          LPKG="newlib";
          STAGE_DEFAULT=${STAGE_LIBC};;
      ...
  esac


I am able to bootstrap a full stage 3 cross-compiler for mmix [1,2].
Would it be possible to augment the crossdev script with above options?

Two comments:

  * binutils and gcc are extremely picky about the arch triplet and require
    that one specifies exactly "mmix", no "mmix-newlib", 
    "mmix-unknown-newlib", etc.

  * It need the crossdev options --without-headers as well - is it possible to
    set this in crossdev as default parameter as well?


[1]

$ crossdev --without-headers -v -t mmix

 * crossdev version:      20151026
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   *
 * Target System:         mmix
 * Stage:                 3 (C compiler & libc)
 * ABIs:                  default

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * libc:                  newlib-[latest]

 * CROSSDEV_OVERLAY:      /var/lib/crossdev
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    
 * Portage flags:          -v

[2]

$ cat hello.c 
#include <stdio.h>
int main()
{
    printf("Hello World\n");
    return 0;
}

$ mmix-gcc -v hello.c
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/mmix/gcc-bin/5.4.0/mmix-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/mmix/5.4.0/lto-wrapper
Target: mmix
Configured with: /var/tmp/portage/cross-mmix/gcc-5.4.0-r3/work/gcc-5.4.0/configure --host=x86_64-pc-linux-gnu --target=mmix --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/mmix/gcc-bin/5.4.0 --includedir=/usr/lib/gcc/mmix/5.4.0/include --datadir=/usr/share/gcc-data/mmix/5.4.0 --mandir=/usr/share/gcc-data/mmix/5.4.0/man --infodir=/usr/share/gcc-data/mmix/5.4.0/info --with-gxx-include-dir=/usr/lib/gcc/mmix/5.4.0/include/g++-v5 --with-python-dir=/share/gcc-data/mmix/5.4.0/python --enable-languages=c --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 5.4.0-r3 p1.3, pie-0.6.5' --enable-esp --enable-poison-system-directories --disable-bootstrap --disable-multilib --disable-altivec --disable-fixed-point --disable-libgcj --disable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --disable-libquadmath --enable-lto --without-isl --disable-libsanitizer
Thread model: single
gcc version 5.4.0 (Gentoo Hardened 5.4.0-r3 p1.3, pie-0.6.5) 
COLLECT_GCC_OPTIONS='-v'
 /usr/libexec/gcc/mmix/5.4.0/cc1 -quiet -v hello.c -quiet -dumpbase hello.c -auxbase hello -version -o /tmp/ccnZz9ZC.s
GNU C11 (Gentoo Hardened 5.4.0-r3 p1.3, pie-0.6.5) version 5.4.0 (mmix)
        compiled by GNU C version 6.3.0, GMP version 6.1.0, MPFR version 3.1.3-p4, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/mmix/5.4.0/../../../../mmix/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/mmix/5.4.0/include
 /usr/lib/gcc/mmix/5.4.0/include-fixed
 /usr/lib/gcc/mmix/5.4.0/../../../../mmix/include
End of search list.
GNU C11 (Gentoo Hardened 5.4.0-r3 p1.3, pie-0.6.5) version 5.4.0 (mmix)
        compiled by GNU C version 6.3.0, GMP version 6.1.0, MPFR version 3.1.3-p4, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 79a479b4f6eeb95cc613b2669c48d2c9
COLLECT_GCC_OPTIONS='-v'
 /usr/libexec/gcc/mmix/as -no-predefined-syms -x -o /tmp/ccv1pKbY.o /tmp/ccnZz9ZC.s
COMPILER_PATH=/usr/libexec/gcc/mmix/5.4.0/:/usr/libexec/gcc/mmix/5.4.0/:/usr/libexec/gcc/mmix/:/usr/lib/gcc/mmix/5.4.0/:/usr/lib/gcc/mmix/
LIBRARY_PATH=/usr/lib/gcc/mmix/5.4.0/:/usr/lib/gcc/mmix/5.4.0/../../../../mmix/lib/
COLLECT_GCC_OPTIONS='-v'
 /usr/libexec/gcc/mmix/5.4.0/collect2 -plugin /usr/libexec/gcc/mmix/5.4.0/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/mmix/5.4.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccEwwOnj.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc --defsym __.MMIX.start..text=0x100 -m mmo /usr/lib/gcc/mmix/5.4.0/crti.o /usr/lib/gcc/mmix/5.4.0/crtbegin.o -L/usr/lib/gcc/mmix/5.4.0 -L/usr/lib/gcc/mmix/5.4.0/../../../../mmix/lib /tmp/ccv1pKbY.o -lgcc -lc -lgcc /usr/lib/gcc/mmix/5.4.0/crtend.o /usr/lib/gcc/mmix/5.4.0/crtn.o

$ mmix a.out 
Hello World
Comment 1 Larry the Git Cow gentoo-dev 2017-11-21 23:01:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=97efbe3a9a544e4e295285cf17928ffd62031dfc

commit 97efbe3a9a544e4e295285cf17928ffd62031dfc
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2017-11-21 22:59:39 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2017-11-21 22:59:39 +0000

    Add 'mmix' target, bug #609602
    
    Add basic support for MMIX by Matthias Maier.
    
    Usage example:
    
    $ crossdev -t mmix
    
    Closes: https://bugs.gentoo.org/609602
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 crossdev | 8 ++++++++
 1 file changed, 8 insertions(+)