Funktionierende Toolchains: Unterschied zwischen den Versionen

Aus darkrealm Wiki
Zur Navigation springen Zur Suche springen
Chris (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Chris (Diskussion | Beiträge)
Zeile 257: Zeile 257:
</pre>
</pre>


 
Make durchführen:
 
<pre>
PATH=/usr/bin make all
</pre>


= sys-devel/crossdev-20171230 =
= sys-devel/crossdev-20171230 =

Version vom 29. März 2025, 12:26 Uhr

Funktionierende Toolchains

KallistiOS Toolchain

mkdir /media/chris/development/dreamcast/toolchains
cd /media/chris/development/dreamcast/toolchains
git clone -b v2.1.x https://github.com/KallistiOS/KallistiOS.git kos
cd kos/utils/dc-chain/
cp -av Makefile.default.cfg Makefile.cfg

Makefile.cfg bearbeiten:

# Sega Dreamcast Toolchains Maker (dc-chain)
# This file is part of KallistiOS.

#########################
### TOOLCHAIN PROFILE ###
#########################

# Choose a toolchain profile from the following available options:
# No longer supported upstream:
# - 9.3.0-legacy: Former 'stable' option, based on GCC 9.3.0 and Newlib 3.3.0.
# - 9.5.0-winxp:  Most recent versions of tools which run on Windows XP.
# - 10.5.0:       Last release in the GCC 10 series, released 2023-07-07.
# - 11.5.0:       Last release in the GCC 11 series, released 2024-07-19.
# Supported upstream:
# - 12.4.0:       Latest release in the GCC 12 series, released 2024-06-20.
# - stable:       Tested stable; based on GCC 13.2.0, released 2023-07-27.
# - 13.3.0:       Latest release in the GCC 13 series, released 2024-05-21.
# - 14.2.0:       Latest release in the GCC 14 series, released 2024-08-01.
# Development versions:
# - 13.3.1-dev    Bleeding edge GCC 13 series from git.
# - 14.2.1-dev    Bleeding edge GCC 14 series from git.
# - 15.0.0-dev    Bleeding edge GCC 15 series from git.
# - gccrs-dev:    GCC fork for development of the GCCRS Rust compiler.
# - rustc-dev:    GCC fork for development of the libgccjit rustc GCC codegen.
# If unsure, select stable. See README.md for more detailed descriptions.
toolchain_profile=stable

########################
### DOWNLOAD OPTIONS ###
########################

### Download protocol (http|https|ftp)
# Specify the protocol you want to use for downloading package files.
download_protocol=https

### Force downloader (curl|wget)
# Specify here if you'd prefer to use 'wget' or 'curl'. If neither is specified,
# a web downloader tool will be auto-detected in the following order: cURL, Wget
# You must have either Wget or cURL installed to use dc-chain.
#force_downloader=wget

### Specify GNU mirror override
# The default mirror for GNU sources is 'ftpmirror.gnu.org'
# This setting overrides the default mirror with a preferred mirror.
#gnu_mirror=mirrors.kernel.org

#####################
### BUILD OPTIONS ###
#####################

### SH toolchain install path
# Specify the directory where the SH toolchain will be installed. This setting
# must match the KOS_CC_BASE setting in your KOS "environ.sh" configuration.
sh_toolchain_path=/media/chris/development/dreamcast/toolchains/sh-elf

### ARM toolchain install path
# Specify the directory where the ARM toolchain will be installed. This setting
# must match the DC_ARM_BASE setting in your KOS "environ.sh" configuration.
arm_toolchain_path=/media/chris/development/dreamcast/toolchains/arm-eabi

### Make jobs (n|<empty>)
# Set this value to the number of parallel jobs you want to run with make.
# For fastest toolchain building, set to the number of CPU threads available.
# Using multiple jobs may cause issues in certain environments and may be
# automatically disabled. If you encounter errors building your toolchain,
# reduce the number of jobs to 1 to avoid issues and ease troubleshooting.
makejobs=16

### Verbose (1|0)
# Choose whether to actively display compilation messages on the screen.
# Messages are saved to the build log files regardless of this setting.
verbose=1

### Erase (1|0)
# Erase build directories as toolchain components are installed to save space.
erase=1

### Install toolchain debug symbols (1|0)
# Choose whether to keep the debugging symbols for the toolchain.
# This is only useful if you wish to debug the toolchain itself.
#toolchain_debug=1

########################
### LANGUAGE OPTIONS ###
########################

### Enable C++
# Builds C++ support, including the C++ compiler and its standard library. The
# vast majority of language features are supported, with C++23 and early C++26
# support included. KallistiOS provides several examples with C++ support, so it
# is enabled by default. Adding C++ support requires extra disk space and
# compilation time, so you may disable it here if you do not plan on using C++.
enable_cpp=1

### Enable Objective-C
# Builds Objective-C support. Currently, this builds the Obj-C compiler and
# runtime, but does not build a standard library. The GNUStep Base Library is
# currently in active development for future inclusion in the kos-ports library.
# KallistiOS provides examples with Obj-C support, so it is enabled by default.
enable_objc=1

### Enable Objective C++
# Builds Objective C++ support. This hybrid language allows both C++ and Obj-C
# methods to be called from both contexts. Enabled by default as both the C++
# and Obj-C languages are already enabled by default.
enable_objcpp=1

### Enable D
# Builds D support. This will build the D compiler, but does not build the
# Phobos Runtime Library. D support may only be enabled on POSIX platforms which
# have its external dependencies provided through a host DMD, GDC, or LDC
# compiler installation.
#enable_d=1

### Enable Ada
# Builds Ada support. This will build the GNAT Ada compiler and tools but does
# not build the libada runtime library. In order for this build to succeed, the
# host's GCC version must match the target Dreamcast version, plus the same
# version of GNAT and its tools must be preinstalled (and in your path).
#enable_ada=1

### Enable Rust
# Builds the work-in-progress GCCRS Rust compiler frontend for GCC. Requires a
# development version of GCC. Use with the gccrs-dev toolchain profile for the
# most recent updates to the GCCRS compiler. This option is not to be confused
# with using this toolchain as a backend for rustc; see libgccjit below.
#enable_rust=1

### Enable libgccjit
# Enables the libgccjit embeddable GCC library. This is most commonly enabled to
# allow using this toolchain as a backend for the official rustc compiler. Use
# with the rustc-dev toolchain profile if this is your use case.
#enable_libgccjit=1

###################
### GCC OPTIONS ###
###################

### Floating point precision support (m4-single-only|m4-single|m4)
# Build support for various SH4 floating-point operation ABIs. KallistiOS only
# officially supports single-precision-only mode (m4-single-only); however,
# experimental support for single-precision-default mode (m4-single) has been
# added to allow for the use of full 64-bit doubles. You may also include
# double-precision-default (m4) which is untested and unsupported, or you may
# choose to specify only m4-single-only to save disk space.
precision_modes=m4-single-only,m4-single

### Default floating point mode (m4|m4-single|m4-single-only)
# Choose the default floating point precision ABI used when GCC is invoked. This
# may be overridden by passing -m4-single-only, -m4-single, or -m4 to GCC.
# KOS currently only officially supports m4-single-only, so it is the default.
default_precision=m4-single-only

### GCC threading model (single|kos)
# KallistiOS patches to GCC provide a 'kos' thread model, which should be used.
# If you want to disable threading support for C++, Objective-C, and so forth,
# you can set this option to 'single'.
thread_model=kos

### Automatic patching for KallistiOS (1|0)
# Uncomment this option if you want to disable applying KallistiOS patches to
# toolchain source files before building. This will disable usage of the 'kos'
# thread model. Only do this if you understand what you are doing.
#use_kos_patches=0

### Disable GCC Native Language Support (1|0)
# By default, NLS allows GCC to output diagnostics in non-English languages.
# Uncomment this option to disable NLS and force GCC to output in English.
#disable_nls=1

######################
### NEWLIB OPTIONS ###
######################

### Automatic patching for Newlib (1|0)
# Uncomment this option if you want to disable the automatic patching of Newlib
# needed by KallistiOS. This will keep the generated toolchain completely raw.
# This will also disable the 'kos' thread model. Only do this if you understand
# what you are doing.
#auto_fixup_sh4_newlib=0

### C99 format specifier support (1|0)
# Define this to build Newlib with additional support for the C99 format
# specifiers, used by printf and friends. These include support for size_t,
# ptrdiff_t, intmax_t, and sized integral types.
newlib_c99_formats=1

### Multibyte character set support (1|0)
# Define this to build Newlib with additional multibyte support. This enables
# three special locales: "C-JIS", "C-SJIS", and "C-EUCJP". The multibyte
# support extends to the mb and wc functions in stdlib as well as format
# characters for the printf and scanf family of routines.
#newlib_multibyte=1

### iconv() character encoding conversions support (encoding list)
# Define a list here to enable support for the iconv() function and <iconv.h>
# header file. The given comma separated list defines for which encoding types
# to include bidirectional conversion support. For the full list of available
# encodings, see the Newlib configuration documentation.
#newlib_iconv_encodings=us_ascii,utf8,utf16,ucs_2_internal,ucs_4_internal

### Optimize Newlib for space (1|0)
# Uncomment this option to optimize for space when building Newlib. This will
# build Newlib with compiler flags which favor smaller code sizes over faster
# performance.
#newlib_opt_space=1

###################
### C++ OPTIONS ###
###################

### Timezone database support (1|0|path)
# Uncomment this option to enable building support for C++'s std::chrono::tzdb
# into your C++ standard library by using a combination of the system's local
# timezone DB and one dynamically fetched from the "IANA Time Zone Database."
# Without support enabled, only the "UTC" and "GMT" timezones will be defined.
# You can optionally provide the path to a directory with a custom "tzdata.zi"
# database file. NOTE: Enabling this will result in larger C++ binaries!
#libstdcxx_tzdb=1

#######################
### WINDOWS OPTIONS ###
#######################

### MinGW/MSYS
# Standalone binaries (1|0)
# Uncomment this option if you want static binaries that are standalone and
# require no dependencies. When this option is used, binaries can be run outside
# the MinGW/MSYS environment. This is NOT recommended; only do this if you know
# what you are doing.
#standalone_binary=1

### Force installation of BFD for SH (1|0)
# Uncomment this option if you want to force installation of 'libbfd' for the SH
# toolchain. This is required for MinGW/MSYS and can't be disabled in this
# scenario. This option is here mainly if you want to force the installation of
# 'libbfd' under other environments, but this won't be necessary in most cases,
# as 'libelf' is used almost everywhere. Please note, 'libbfd' is not portable
# if you built it on another environment. Only use this flag if you understand
# what you are doing.
#sh_force_libbfd_installation=1

Make durchführen:

PATH=/usr/bin make all

sys-devel/crossdev-20171230

SH-ELF

USE="-threads -nptl" crossdev -t sh-elf -P -v
crossdev -t sh-elf -S -P -v