Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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:

/usr/libexec/gcc/i686-apple-darwin10/4.2.1

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?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.