probablynotartyom / g-dos Goto Github PK
View Code? Open in Web Editor NEWA portable, ROM-booting hobby OS. Currently supports m68k, arm, and PowerPC targets
A portable, ROM-booting hobby OS. Currently supports m68k, arm, and PowerPC targets
Sometimes you can actually get a few commands to register, but most of the time it just behaves in completely unpredictable ways.
Given that the code running there is almost identical to the native version running under Linux, I'ts lead me to believe that one of my LIBc functions is probably broken.
it was probably a good idea to start writing test cases for them eventually
i want to check the example given:
make distclean
./config.sh PLATFORM=versatilepb ARCH=arm
make PREFIX=arm-linux-gnueabi- all
[...]
[AR] created: /home/bastian/software/G-DOS/lib/libc.a
make[2]: Leaving directory '/home/bastian/software/G-DOS'
make[2]: Entering directory '/home/bastian/software/G-DOS'
[USR][CC] -c argtest.c -o argtest.o
[USR][LD] argtest.o -o argtest
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(stdchar.o):(.bss+0x0): multiple definition of `__global_flags'; /home/bastian/software/G-DOS/usr/argtest.o:(.bss+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(stdchar.o):(.rodata+0x0): multiple definition of `__global_flag_names'; /home/bastian/software/G-DOS/usr/argtest.o:(.rodata+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0xc): multiple definition of `__global_flags'; /home/bastian/software/G-DOS/usr/argtest.o:(.bss+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.rodata+0x0): multiple definition of `__global_flag_names'; /home/bastian/software/G-DOS/usr/argtest.o:(.rodata+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(puts.o):(.bss+0x0): multiple definition of `stdin'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(puts.o):(.bss+0x4): multiple definition of `stdout'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x4): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(puts.o):(.bss+0x8): multiple definition of `stderr'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x8): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(sys.o):(.rodata+0x0): multiple definition of `__global_flag_names'; /home/bastian/software/G-DOS/usr/argtest.o:(.rodata+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(sys.o):(.bss+0x0): multiple definition of `__global_flags'; /home/bastian/software/G-DOS/usr/argtest.o:(.bss+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(strerror.o):(.bss+0x0): multiple definition of `__global_flags'; /home/bastian/software/G-DOS/usr/argtest.o:(.bss+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(strerror.o):(.rodata+0x0): multiple definition of `__global_flag_names'; /home/bastian/software/G-DOS/usr/argtest.o:(.rodata+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(sprintf.o):(.bss+0x0): multiple definition of `stdin'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(sprintf.o):(.bss+0x4): multiple definition of `stdout'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x4): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(sprintf.o):(.bss+0x8): multiple definition of `stderr'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x8): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(vsnprintf.o):(.bss+0x0): multiple definition of `stdin'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x0): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(vsnprintf.o):(.bss+0x4): multiple definition of `stdout'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x4): first defined here
arm-linux-gnueabi-ld: /home/bastian/software/G-DOS/lib/libc.a(vsnprintf.o):(.bss+0x8): multiple definition of `stderr'; /home/bastian/software/G-DOS/lib/libc.a(printf.o):(.bss+0x8): first defined here
arm-linux-gnueabi-ld: /usr/lib/gcc-cross/arm-linux-gnueabi/10/libgcc.a(_dvmd_lnx.o): in function `__aeabi_ldiv0':
(.text+0x8): undefined reference to `raise'
make[2]: *** [Makefile:114: /home/bastian/software/G-DOS/usr/argtest] Error 1
make[2]: Leaving directory '/home/bastian/software/G-DOS'
make[1]: *** [Makefile:100: deps] Error 2
make[1]: Leaving directory '/home/bastian/software/G-DOS'
make: *** [Makefile:94: all] Error 2
the same happens with musl
and
PREFIX=armel-linux-musleabi-
and:
bastian@ryzen:~/software/G-DOS$ arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabi/10/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --disable-sjlj-exceptions --with-arch=armv5te --with-float=soft --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.1 20210110 (Debian 10.2.1-6)
when linking the final binary on all ARM platforms, the build fails with something along the lines of:
[DEP] Setting up directories
mkdir -p /run/media/artyom/devroot/Projects/builds/G-DOS/bin
[CCFLAGS] = -fno-builtin -fno-exceptions -fno-unwind-tables -w -mfloat-abi=soft -nostdlib -nostartfiles -static -mcpu=arm926ej-s -marm -mbe32 -mabi=aapcs-linux -include /run/media/artyom/devroot/Projects/builds/G-DOS/src/platform/arm/versatilepb/hwdeps.h -I /run/media/artyom/devroot/Projects/builds/G-DOS/src/platform/arm/versatilepb -I /run/media/artyom/devroot/Projects/builds/G-DOS/src/cpu/arm/include -I /run/media/artyom/devroot/Projects/builds/G-DOS/src/include
make[1]: Entering directory '/run/media/artyom/devroot/Projects/builds/G-DOS'
make[2]: Entering directory '/run/media/artyom/devroot/Projects/builds/G-DOS'
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/lib/libc.a' is up to date.
make[2]: Leaving directory '/run/media/artyom/devroot/Projects/builds/G-DOS'
make[2]: Entering directory '/run/media/artyom/devroot/Projects/builds/G-DOS'
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/usr/loadtest' is up to date.
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/usr/argtest' is up to date.
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/usr/iotest' is up to date.
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/usr/hello' is up to date.
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/usr/ski' is up to date.
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/usr/brot' is up to date.
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/usr/count' is up to date.
make[2]: Leaving directory '/run/media/artyom/devroot/Projects/builds/G-DOS'
make[2]: Entering directory '/run/media/artyom/devroot/Projects/builds/G-DOS'
make[2]: '/run/media/artyom/devroot/Projects/builds/G-DOS/bin/romdisk.o' is up to date.
make[2]: Leaving directory '/run/media/artyom/devroot/Projects/builds/G-DOS'
make[2]: Entering directory '/run/media/artyom/devroot/Projects/builds/G-DOS'
[LD] Creating final binary
arm-none-eabi-ld: error: source object /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/mm.o has EABI version 5, but target /run/media/artyom/devroot/Projects/builds/G-DOS/bin/gdos has EABI version 0
arm-none-eabi-ld: failed to merge target specific data of file /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/mm.o
arm-none-eabi-ld: error: source object /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/platform/arm/versatilepb/splash.o has EABI version 5, but target /run/media/artyom/devroot/Projects/builds/G-DOS/bin/gdos has EABI version 0
arm-none-eabi-ld: failed to merge target specific data of file /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/platform/arm/versatilepb/splash.o
arm-none-eabi-ld: error: source object /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/traps.o has EABI version 5, but target /run/media/artyom/devroot/Projects/builds/G-DOS/bin/gdos has EABI version 0
arm-none-eabi-ld: failed to merge target specific data of file /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/traps.o
arm-none-eabi-ld: error: source object /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/helpers.o has EABI version 5, but target /run/media/artyom/devroot/Projects/builds/G-DOS/bin/gdos has EABI version 0
arm-none-eabi-ld: failed to merge target specific data of file /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/helpers.o
arm-none-eabi-ld: error: source object /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/elf.o has EABI version 5, but target /run/media/artyom/devroot/Projects/builds/G-DOS/bin/gdos has EABI version 0
arm-none-eabi-ld: failed to merge target specific data of file /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/elf.o
arm-none-eabi-ld: error: source object /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/rpi-mailbox.o has EABI version 5, but target /run/media/artyom/devroot/Projects/builds/G-DOS/bin/gdos has EABI version 0
arm-none-eabi-ld: failed to merge target specific data of file /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/rpi-mailbox.o
arm-none-eabi-ld: error: source object /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/startup.o has EABI version 5, but target /run/media/artyom/devroot/Projects/builds/G-DOS/bin/gdos has EABI version 0
arm-none-eabi-ld: failed to merge target specific data of file /run/media/artyom/devroot/Projects/builds/G-DOS/bin/src/cpu/arm/startup.o
...
It seems newer versions of GCC have mixed ABIs in their libgcc.a and the linker is getting confused. No matter what abi version i build for, the linker reports that it's targeting version 0 (meaning unknown abi conformance)
The m68k and PowerPC targets both build and run fine using the same source tree.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.