| 1 | Use RUNPATH instead of RPATH so that end users can override the library
|
| 2 | search path (and the 'validate-runpath' phase can do its work).
|
| 3 |
|
| 4 | diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn
|
| 5 | |
| 6 | |
| 7 | @@ -101,7 +101,14 @@
|
| 8 | ]
|
| 9 | }
|
| 10 |
|
| 11 | - if (!is_android && current_os != "aix") {
|
| 12 | + if (is_linux) {
|
| 13 | + ldflags += [
|
| 14 | + # Set DT_RUNPATH instead of DT_RPATH which is important because the
|
| 15 | + # former can be overridden at runtime, and Guix has support for
|
| 16 | + # verifying that nothing is missing.
|
| 17 | + "-Wl,--enable-new-dtags",
|
| 18 | + ]
|
| 19 | + } else if (!is_android && current_os != "aix") {
|
| 20 | ldflags += [
|
| 21 | # TODO(GYP): Do we need a check on the binutils version here?
|
| 22 | #
|