Fossil SCM

Append -ldl only when needed on the target platform; OpenBSD resolves it from the standard libc.

ashepilko 2018-07-13 10:04 trunk
Commit 7cdb522b42aad6a16207d884d5331cd754d1978dc7b2300934e492e1f07dd53d
1 file changed +3 -1
+3 -1
--- auto.def
+++ auto.def
@@ -510,10 +510,12 @@
510510
}
511511
512512
# Finally, append -ldl to make sure it's the last in the list.
513513
# The library order matters in case of static linking.
514514
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]
516518
}
517519
518520
make-template Makefile.in
519521
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
520522
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button