Open jian256384 opened 7 months ago
As for the things I know Fortran is currently brocken on almost all configurations.
Please upload build.log
aswell.
Please upload
build.log
aswell.
log.zip This is the compressed package I reconstructed, which contains build.log, config.log, and config files. Could you please take a look for me?
Oh, it's a common error on baremetal systems. configure
tries to test the compiler but the linker fails because there is no crt0.o
(The startfile with code thats run before main
). configure
tries to compile a executable to test the compiler when it's only configuring a library. There are ways around this but there are ugly, like realy ugly. For example it's possible to inject a mok-up crt0.o
(compiled from some dumb code) into the savestate and/or sysroot or it shoud be possible the hardcode that check-outcome using some commando line variables.
The quick fix here is to disable the module and everything that hard-depends on it (if even possible).
@jian256384 that's actually weird:
configure:3074: checking whether the C compiler works
configure:3096: .../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/./gcc/xgcc -B.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/./gcc/ -B.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/bin/ -B.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/lib/ -isystem .../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/include -isystem .../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/sys-include -g -O2 -idirafter /home/y/x-tools/HOST-x86_64-w64-mingw32/arc-multilib-elf/arc-multilib-elf/include -g -Os -static conftest.c >&5
.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/bin/ld: cannot find crt0.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:3100: $? = 1
configure:3138: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libbacktrace"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3143: error: in `.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/arc-multilib-elf/libbacktrace':
configure:3145: error: C compiler cannot create executables
See `config.log' for more details
Looks like you're trying to build a canadian cross toolchain with more language front-ends enabled in the gcc (--enable-languages=c,c++,fortran,lto
). But so far I don't see any obvious reason why crt0.o
couldn't be found. crt0.o
gets built as a part of Newlib and so I'm surprised it's not found.
Let me try to reproduce the same behavior locally and then we'll see what's wrong here. But in the meantime it would be interesting to understand what you're trying to achieve: do you need to have a bare-metal Fortran compiler for ARC processors or it's just a random config you're experimenting with?
Not quite right. Newlib only has a crt0.o
for some configurations. For example x86_64-elf
has a similar problem.
@jian256384 that's actually weird:
configure:3074: checking whether the C compiler works configure:3096: .../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/./gcc/xgcc -B.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/./gcc/ -B.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/bin/ -B.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/lib/ -isystem .../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/include -isystem .../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/sys-include -g -O2 -idirafter /home/y/x-tools/HOST-x86_64-w64-mingw32/arc-multilib-elf/arc-multilib-elf/include -g -Os -static conftest.c >&5 .../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/buildtools/arc-multilib-elf/bin/ld: cannot find crt0.o: No such file or directory collect2: error: ld returned 1 exit status configure:3100: $? = 1 configure:3138: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "package-unused" | #define PACKAGE_TARNAME "libbacktrace" | #define PACKAGE_VERSION "version-unused" | #define PACKAGE_STRING "package-unused version-unused" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3143: error: in `.../arc/.build/HOST-x86_64-w64-mingw32/arc-multilib-elf/build/build-cc-gcc-final-build-x86_64-build_pc-linux-gnu/arc-multilib-elf/libbacktrace': configure:3145: error: C compiler cannot create executables See `config.log' for more details
Looks like you're trying to build a canadian cross toolchain with more language front-ends enabled in the gcc (
--enable-languages=c,c++,fortran,lto
). But so far I don't see any obvious reason whycrt0.o
couldn't be found.crt0.o
gets built as a part of Newlib and so I'm surprised it's not found.Let me try to reproduce the same behavior locally and then we'll see what's wrong here. But in the meantime it would be interesting to understand what you're trying to achieve: do you need to have a bare-metal Fortran compiler for ARC processors or it's just a random config you're experimenting with?
I need to build a bare-metal Fortran compiler for ARC.
Not quite right. Newlib only has a
crt0.o
for some configurations. For examplex86_64-elf
has a similar problem.
May I ask what modifications I need to make to achieve the correct configuration?
crt0.o
in the sysroot under lib
(maybe just touch
works else you need to compile somthing with the _start
that calls main; use assembler)
config.log config.txt
Is it not possible to run Fortran on bare metal?