Summary: | lang/gcc5: set rpath by default via the gcc, g++, gfortran,... drivers | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Roger Leigh <rleigh> |
Component: | Individual Port(s) | Assignee: | Gerald Pfeifer <gerald> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Some People | CC: | rene |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Roger Leigh
2015-05-13 14:49:48 UTC
For ports employing USE_GCC this works fine due to the following code in Mk/bsd.gcc.mk: _GCC_RUNTIME:= ${LOCALBASE}/lib/gcc${V} CFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} CXXFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} LDFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} -L${_GCC_RUNTIME} You can do the equivalent of this for your own builds. I assume, though, that what you are really asking for is for the lang/gcc* ports to add this fully automatically. Yes, exactly. While Mk/bsd.gcc.mk can set this correctly and automatically when building ports, this fails to work when building anything which isn't a port, such as building my own software during development and for testing and debugging--any invocation of the compiler outside a port build can therefore result in subtly broken builds. If there was an error at build time, then I could live with it, but the subtlety of how exception handling is broken is not--it took some time to figure out what was going on. I think it would be reasonable for the compiler to always use a suitable libgcc so that such errors can not occur. Kind regards, Roger PR 223279 also would have benefited (been avoid) by this. I think is PR has become obsolete now that the port expired, please re-open if not. |