This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Compiling GCC with -rpath


I'm trying to compile GCC (c,c++,java) with -rpath and -L flags to link
against the proper runtime libraries.  My thought was to set
CFLAGS="-L${LIB_DIR}/lib -Wl,-rpath,${LIB_DIR}/lib"

ldd shows me that these flags create executables that are linking
against the proper libraries and they work well.  However, I noticed my
gcj is incorrectly linked against /lib libraries.  I figured this was
because it was c++ code, so CFLAGS wouldn't apply.  No problem, just set
CPPFLAGS="-L${LIB_DIR}/lib -Wl,-rpath,${LIB_DIR}/lib".

However, a lot of the compile lines include both CFLAGS and CPPFLAGS and
the make dies if the flags are included twice.  How can I have these
flags applied against each dynamically linked executable only once?

Thanks!  Mike.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]