Opened 2 years ago

Last modified 3 months ago

#10962 new defect

BACKENDS: AMIGAOS: Configuring with -flto errors out on finding a suitable compiler (AmigaOS4)

Reported by: raziel- Owned by:
Priority: normal Component: Common
Version: Keywords:
Cc: Game:


AmigaOS4 - BE - PPC - SDL
gcc -v
Using built-in specs.
Target: ppc-amigaos
Configured with: /var/lib/jenkins/workspace/native-gcc-8/gcc/repo/configure --with-bugurl= --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:

Could this be fixed/supported in configure, if possible, please?

Change History (11)

comment:1 by bgK, 2 years ago

Which revision of ScummVM are you using? This was supposed to be fixed by (it is for me).

comment:2 by raziel-, 2 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:3 by bgK, 2 years ago

Could you please attach your config.log with LDFLAGS="-flto"?

Last edited 2 years ago by bgK (previous) (diff)

comment:4 by raziel-, 2 years ago


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 raziel-, 2 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 bgK, 2 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 raziel-, 2 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:8 by raziel-, 2 years ago

I think i should work aorund that by adding -shared to my LDFLAGS?

comment:9 by raziel-, 2 years ago

Nope, adding -shared to the LDFlags doesn't help, still errors out

comment:10 by raziel-, 22 months ago

See this thread for reference:
and also this bug, which seems to be related if not a duplicate:

comment:11 by sev-, 3 months 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)
Note: See TracTickets for help on using tickets.