Closed MastaG closed 4 years ago
Thanks @DC-SWAT I've reverted both commits by adding the reverts to patches/kos.diff /usr/local/dc/kos/kos/kernel/arch/dreamcast/kernel/init.c now looks like:
`#if GNUC >= 4 void _init(void); void _fini(void); void __verify_newlib_patch();
Still the same error happens.
configure: error: in /usr/local/dc/kos/kos-ports/opus/build/opus-1.1.1': configure: error: C compiler cannot create executables See
config.log' for more details
configure:3553: kos-cc conftest.c >&5 /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/5.2.0/../../../../sh-elf/bin/ld: /usr/local/dc/kos/kos/lib/dreamcast/libkallisti.a(init.o): in function
arch_shutdown':
/usr/local/dc/kos/kos/kernel/arch/dreamcast/kernel/init.c:275: undefined reference to __fini' /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/5.2.0/../../../../sh-elf/bin/ld: /usr/local/dc/kos/kos/lib/dreamcast/libkallisti.a(init.o): in function
arch_main':
/usr/local/dc/kos/kos/kernel/arch/dreamcast/kernel/init.c:227: undefined reference to __init' collect2: error: ld returned 1 exit status
Nevermind fixed it.. will push another fix to this PR and then you can merge it :)
gcc 8 don't stable
@megavolt85 I'm still building the toolchain with gcc 5. Please see my two commits.
It's just that I'm building the toolchain on a recent Linux distro (Fedora 31) which features gcc 9. Building gcc 5 cross-compiler with host gcc 9 requires a small patch.
The second commit is the fix for upstream KOS as pointed out bu @DC-SWAT
I've tested the toolchain build from a clean state from begin to end without problems now :)
I've changed the title. I meant fix building the toolchain with recent HOST compilers :)
Please merge so everybody can benefit.
Also add buildscript for Fedora linux
Still I'm getting a configure error when building opus from kos-ports: configure:3531: checking whether the C compiler works configure:3553: kos-cc conftest.c >&5 /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/5.2.0/../../../../sh-elf/bin/ld: /usr/local/dc/kos/kos/lib/dreamcast/libkallisti.a(init.o): in function
arch_shutdown': /usr/local/dc/kos/kos/kernel/arch/dreamcast/kernel/init.c:275: undefined reference to
__fini' /opt/toolchains/dc/sh-elf/lib/gcc/sh-elf/5.2.0/../../../../sh-elf/bin/ld: /usr/local/dc/kos/kos/lib/dreamcast/libkallisti.a(init.o): in functionarch_main': /usr/local/dc/kos/kos/kernel/arch/dreamcast/kernel/init.c:227: undefined reference to
__init' collect2: error: ld returned 1 exit status configure:3557: $? = 1 configure:3595: result: noSomehow static library libkallisti.a has a undefined reference to fini and init ? Any help would be nice!