Fossil SCM
Append -ldl only when needed on the target platform; OpenBSD resolves it from the standard libc.
Commit
7cdb522b42aad6a16207d884d5331cd754d1978dc7b2300934e492e1f07dd53d
Parent
9951fd7b40f314d…
1 file changed
+3
-1
M
auto.def
+3
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -510,10 +510,12 @@ | ||
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | # Finally, append -ldl to make sure it's the last in the list. |
| 513 | 513 | # The library order matters in case of static linking. |
| 514 | 514 | if {[check-function-in-lib dlopen dl]} { |
| 515 | - define-append LIBS -ldl | |
| 515 | + # Some platforms (*BSD) have the dl functions already in libc and no libdl. | |
| 516 | + # In such case we can link directly without -ldl. | |
| 517 | + define-append LIBS [get-define lib_dlopen] | |
| 516 | 518 | } |
| 517 | 519 | |
| 518 | 520 | make-template Makefile.in |
| 519 | 521 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 520 | 522 |
| --- auto.def | |
| +++ auto.def | |
| @@ -510,10 +510,12 @@ | |
| 510 | } |
| 511 | |
| 512 | # Finally, append -ldl to make sure it's the last in the list. |
| 513 | # The library order matters in case of static linking. |
| 514 | if {[check-function-in-lib dlopen dl]} { |
| 515 | define-append LIBS -ldl |
| 516 | } |
| 517 | |
| 518 | make-template Makefile.in |
| 519 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 520 |
| --- auto.def | |
| +++ auto.def | |
| @@ -510,10 +510,12 @@ | |
| 510 | } |
| 511 | |
| 512 | # Finally, append -ldl to make sure it's the last in the list. |
| 513 | # The library order matters in case of static linking. |
| 514 | if {[check-function-in-lib dlopen dl]} { |
| 515 | # Some platforms (*BSD) have the dl functions already in libc and no libdl. |
| 516 | # In such case we can link directly without -ldl. |
| 517 | define-append LIBS [get-define lib_dlopen] |
| 518 | } |
| 519 | |
| 520 | make-template Makefile.in |
| 521 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 522 |