Opened 6 years ago
Closed 2 years ago
#10962 closed defect (outdated)
BACKENDS: AMIGAOS: Configuring with -flto errors out on finding a suitable compiler (AmigaOS4)
Reported by: | raziel- | Owned by: | raziel- |
---|---|---|---|
Priority: | normal | Component: | Common |
Version: | Keywords: | ||
Cc: | Game: |
Description
AmigaOS4 - BE - PPC - SDL
gcc -v
Using built-in specs.
COLLECT_GCC=/Development/Coding/SDK/gcc/bin/gcc
COLLECT_LTO_WRAPPER=/Development/Coding/SDK/gcc/bin/../libexec/gcc/ppc-amigaos/8.3.0/lto-wrapper
Target: ppc-amigaos
Configured with: /var/lib/jenkins/workspace/native-gcc-8/gcc/repo/configure --with-bugurl=https://github.com/sba1/adtools/issues --with-pkgversion='adtools build 8.3.0' --host=ppc-amigaos --target=ppc-amigaos --disable-nls --prefix=/gcc --with-gmp=/var/lib/jenkins/workspace/native-gcc-8/native-build/root-cross --with-mpfr=/var/lib/jenkins/workspace/native-gcc-8/native-build/root-cross --with-mpc=/var/lib/jenkins/workspace/native-gcc-8/native-build/root-cross --enable-languages=c,c++ --enable-haifa --enable-sjlj-exceptions --disable-libstdcxx-pch --disable-tls --enable-threads=amigaos --enable-lto
Thread model: amigaos
gcc version 8.3.0 (adtools build 8.3.0)
On using the above compiler version and "trying" to compile with -flto in place, unfortunately makes ./configure not find any suitable compilers at all.
The problem seems to be the in-configure check for endianess, since, if i skip that check and simply set my endian to big, it works.
See also this thread on the forums:
https://forums.scummvm.org/viewtopic.php?f=1&t=14806&p=86938&hilit=configure+flto#p86938
Could this be fixed/supported in configure, if possible, please?
Change History (12)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
This is with a checkout from today and from right about now (5 minutes ago)
Your linked change is also merged in (just checked configure)
comment:4 by , 6 years ago
Sure
Configure run on Thu May 16 21:16:19 2019
Invocation command line was:
./configure --enable-static
Saved environment variables:
AR="" AS="" ASFLAGS="" CPPFLAGS="" CXX="" CXXFLAGS="-std=c++11" DWP="" LD="ld" LDFLAGS="-athread=native -Wl,-no-keep-memory -flto -L/sdk/local/newlib/lib"
PKG_CONFIG_LIBDIR="/sdk/local/newlib/lib/pkgconfig/" RANLIB="" SDL_CONFIG="" STRIP="" WINDRES="" WINDRESFLAGS=""
testing compiler: g++
failure testing compiler: g++
testing compiler: c++
failure testing compiler: c++
comment:5 by , 6 years ago
Not much to show there, sorry.
But i also have a file called tmp_cxx_compiler.cpp in place, which doesn't get deleted due to the failing configure bit.
class Foo { int a; }; int main(int argc, char **argv) { Foo *a = new Foo(); delete a; return 0; }
comment:6 by , 6 years ago
What happens when you try compiling that file?
g++ -std=c++11 -athread=native -Wl,-no-keep-memory -flto -L/sdk/local/newlib/lib ./tmp_cxx_compiler.cpp -o ./tmp_cxx_compiler
comment:7 by , 6 years ago
g++ -std=c++11 -athread=native -Wl,-no-keep-memory -flto -L/sdk/local/newlib/lib tmp_cxx_compiler.cpp -o tmp_cxx_compiler
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: -f may not be used without -shared
Compiling with -shared in place makes it build.
g++ -std=c++11 -athread=native -Wl,-no-keep-memory -flto -shared -L/sdk/local/newlib/lib tmp_cxx_compiler.cpp -o tmp_cxx_compiler
But i don't really understand why. I (try) to compile everything static.
Output file is 123.040 bytes, if that helps
comment:10 by , 5 years ago
See this thread for reference: https://forums.scummvm.org/viewtopic.php?f=1&t=14806
and also this bug, which seems to be related if not a duplicate: https://bugs.scummvm.org/ticket/10695
comment:11 by , 4 years ago
Summary: | COMPILER: Configuring with -flto errors out on finding a suitable compiler (AmigaOS4) → BACKENDS: AMIGAOS: Configuring with -flto errors out on finding a suitable compiler (AmigaOS4) |
---|
comment:12 by , 2 years ago
Owner: | set to |
---|---|
Resolution: | → outdated |
Status: | new → closed |
Fixed in the meantime by probably a new gcc package release
Which revision of ScummVM are you using? This was supposed to be fixed by https://github.com/scummvm/scummvm/commit/3a25a3c926243c7e93857f9edcb1b84d45b8caa0 (it is for me).