GitHub - isoriano1968/gcc-cross-amix: All kind of AMIGA AMIX 2.1c related stuff · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
isoriano1968
gcc-cross-amix
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>8 Commits<br>8 Commits
.gitattributes
.gitattributes
.gitignore
.gitignore
Makefile
Makefile
README.md
README.md
amix-gcc-wrapper.sh
amix-gcc-wrapper.sh
View all files
Repository files navigation
AMIX Cross-Toolchain Bootstrap
This directory bootstraps a Linux-hosted AMIX cross toolchain for the target:
m68k-cbm-sysv4
Current status:
C compiler: works<br>GNU assembler: works<br>GNU ld: works<br>Dynamically linked AMIX C executable: works on AMIX baremetal<br>C++ / g++: not complete yet
Redistribution Notice
This repository must not include AMIX headers, libraries, startup objects, or<br>full system trees. Each user must provide their own AMIX sysroot from a<br>licensed AMIX installation.
Do not commit files such as:
usr/include/*<br>usr/lib/libc.so.1<br>usr/lib/ld.so.1<br>usr/ccs/lib/crt*.o<br>usr/ccs/lib/mcrt*.o<br>usr/ccs/lib/pcrt*.o
Quick Start On LMDE
First copy or mount your AMIX tree on Linux. The examples below assume:
AMIX_ROOT=/media/sf_Storage/usr-amix
The tree should contain at least:
$AMIX_ROOT/usr/include<br>$AMIX_ROOT/usr/lib/libc.so.1<br>$AMIX_ROOT/usr/lib/ld.so.1<br>$AMIX_ROOT/usr/ccs/lib/crt1.o<br>$AMIX_ROOT/usr/ccs/lib/crti.o<br>$AMIX_ROOT/usr/ccs/lib/crtn.o
Build and install:
cd tools/amix-cross<br>make deps-hint<br>make all AMIX_ROOT=$AMIX_ROOT<br>. build/env.sh<br>make validate-sysroot AMIX_ROOT=$AMIX_ROOT<br>make test-hello AMIX_ROOT=$AMIX_ROOT
The Makefile refreshes old config.guess and config.sub files from<br>/usr/share/misc, so install autotools-dev on LMDE before building.
The default install prefix is:
$HOME/opt/amix-cross
Use /opt/amix-cross if preferred:
make PREFIX=/opt/amix-cross all
If /opt/amix-cross is root-owned, create it first and give yourself write<br>access, or run the install phases with suitable privileges.
Building AMIX Programs
After make all and . build/env.sh, a normal C build should work:
hello.c
int<br>main(void)<br>puts("hello from AMIX cross");<br>return 0;<br>EOF
m68k-cbm-sysv4-gcc hello.c -o hello<br>file hello">cat > hello.c 'EOF'<br>#include
int<br>main(void)<br>puts("hello from AMIX cross");<br>return 0;<br>EOF
m68k-cbm-sysv4-gcc hello.c -o hello<br>file hello
Expected:
ELF 32-bit MSB executable, Motorola m68k, 68020, version 1 (SYSV), dynamically linked
Copy the executable to AMIX and run it there.
Important Variables
TARGET=m68k-cbm-sysv4<br>BINUTILS_VERSION=2.8.1<br>GCC_VERSION=2.7.2.3<br>CPUFLAGS=-m68020<br>AMIX_ROOT=/path/to/usr-amix<br>SYSROOT=$HOME/opt/amix-cross/m68k-cbm-sysv4/sysroot<br>AMIX_CRT_DIR=$SYSROOT/usr/ccs/lib
HOST_CFLAGS defaults to -O2 -g -std=gnu89 -fcommon -no-pie because the 1990s GNU<br>configure tests and sources expect pre-C99 implicit int behavior.
BINUTILS_DISABLE_DIRS is empty by default now. GNU ld must build for the<br>toolchain to become self-contained.
AMIX Runtime Files
Linux-side linking needs the AMIX startup objects in addition to libc.so.1<br>and ld.so.1. The sysroot target copies usr/include, usr/lib,<br>usr/sys, and usr/ccs from AMIX_ROOT when present.
Look on AMIX in likely locations:
ls -l /usr/ccs/lib /usr/lib /lib<br>find / -name 'crt*.o' -o -name 'values-X*.o'
The Makefile currently checks for:
crt1.o<br>crti.o<br>crtn.o
If they live outside the sysroot default, pass that directory:
make check-runtime AMIX_ROOT=/media/sf_Storage/usr-amix AMIX_CRT_DIR=/media/sf_Storage/usr-amix/usr/ccs/lib
Once ld and those startup files are available, try:
make test-hello AMIX_ROOT=/media/sf_Storage/usr-amix
The installed wrapper supports the normal C path once the sysroot contains<br>usr/ccs/lib:
m68k-cbm-sysv4-gcc hello.c -o hello
Build and test a C hello binary on AMIX before working on gcc-full / C++.
Kernel And Driver Objects
Example:
make AMIX_ROOT=$HOME/src/usr-amix CPUFLAGS=-m68030 test-random
AMIX Makefiles
Old AMIX Makefiles often hardcode native tools in recipes:
exp: $(OBJ)<br>ld -r...