Commit 95d7307
committed
gh-115028: Add support for relocatable installations using $ORIGIN in RPATH
This patch adds a new configure option --with-relative-rpath that, when
enabled, adds $ORIGIN-based RPATHs to binaries when building Python on Linux.
This makes Python installations relocatable so they can be moved to different
directories without breaking dynamic library dependencies.
Three new variables are introduced to set RPATHs for different components:
- PY_RPATH_EXEC: For the Python interpreter binary
- PY_RPATH_LIB: For the shared libpython library
- PY_RPATH_MOD: For Python extension modules
This is a step toward solving the relocatability issues discussed in
packaging forums and helps ena1 parent 7c3692f commit 95d7307
4 files changed
Lines changed: 88 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
915 | 918 | | |
916 | 919 | | |
917 | 920 | | |
918 | | - | |
| 921 | + | |
| 922 | + | |
919 | 923 | | |
920 | 924 | | |
921 | 925 | | |
| |||
945 | 949 | | |
946 | 950 | | |
947 | 951 | | |
948 | | - | |
| 952 | + | |
949 | 953 | | |
950 | 954 | | |
951 | 955 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3356 | 3356 | | |
3357 | 3357 | | |
3358 | 3358 | | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
3359 | 3391 | | |
3360 | 3392 | | |
3361 | 3393 | | |
| |||
0 commit comments