I have installed GCC to a custom prefix. When it is invoked, it complains that it cannot find some of its internal binaries.

My computer's "official" GCC keeps them here:


This directory is not present in PATH.

make install created a similar hierarchy under my prefix, and the appropriate files were installed there. I could add it to PATH, but this was apparently not necessary for the official GCC to run. I would like to avoid cluttering PATH if I can.

I looked for an option to specify this directory in the configure script, but found none. There is also no mention of libexec in the GCC manual.

How does the official GCC know where its internal binaries live, and how can I give this information to my trunk build of GCC?

1 Answer 1


You can ask gcc where it will look for those binaries: (this works on FC16's gcc-4.6.3 and CentOS 5.3 gcc-4.1.3, so it should work with your 4.2)

gcc -print-search-dirs

You can set your search path via GCC_EXEC_PREFIX environment variable.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .