Alex Marshall
Alex Marshall

Reputation: 10322

Override the compiler prefix generated by autotools

I have a suite of small programs and libraries that run on several embedded systems running different platforms that our company uses. One of the platforms uses a gcc 2.95.3 compiler with gcc being ppc_405-gcc, which obviously doesn't match the conventional modern naming scheme for gcc cross compilers (e.g. i686-pc-linux-gnu). I want to use autotools to create a new program to target these PowerPC boards running an old version of BusyBox linux running a 2.4 series kernel. The flags I use are : --build=i686-pc-linux-gnu --host=powerpc-none-linux --target=powerpc-none-linux and when Autotools runs it searches for powerpc-none-linux-g++ et al. Is there any way to override the tool prefix so that it searches for ppc_405-gcc et al ?

Upvotes: 0

Views: 643

Answers (1)

ldav1s
ldav1s

Reputation: 16315

You can just tell it:

./configure CC=ppc_405-gcc CXX=ppc_405-g++ LD=ppc_405-ld STRIP=ppc_405-strip ...

Upvotes: 2

Related Questions