Re: Warning: Obscure preprocessor/configure/include file problem (with solution)
> we have an obscure problem in our setup if we use
> "-W,-rpath=/usr/i386-gnu/lib" in our i386-gnu-gcc wrapper script:
I don't think you ever want to do that. That sets the DT_RPATH encoded in
the binaries. You want -rpath-link, which affects only ld's behavior at
link time. (And I assume that's "-Wl,..." not "-W,..." in actuality.)
> ./configure will test for the preprocessor, first it tries "i386-gnu-gcc -E".
> But because this has output on stderr, namely:
> gcc: -rpath=/usr/i386-gnu/lib: linker input file unused since linking not done
I have never seen a problem like this. My specs file has the -rpath-link
in the *lib section, so it's never consulted when not linking.
> The solution is, if we can't suppress the output, to either specify an
> environment variable CPP before calling configure, or to check this special
> case in the wrapper, or to move the rpath from the wrapper to the specs
The only downside of having it in the specs file is the need for specific
cross-compile directory names to be substituted into the specs file.