Fossil SCM
Make sure -ldl is appended after -lcrypto; Fixes link errors with static build.
Commit
efbc319c32a38fab4df9bcce655bca77123ff7ea8ead6d52e006f1bf84c067ba
Parent
9830d7cbedf0e37…
1 file changed
+6
-1
M
auto.def
+6
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -495,11 +495,10 @@ | ||
| 495 | 495 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 496 | 496 | if {![cc-check-functions getpassphrase]} { |
| 497 | 497 | # Haiku needs this |
| 498 | 498 | cc-check-function-in-lib getpass bsd |
| 499 | 499 | } |
| 500 | -cc-check-function-in-lib dlopen dl | |
| 501 | 500 | cc-check-function-in-lib sin m |
| 502 | 501 | |
| 503 | 502 | # Check for the FuseFS library |
| 504 | 503 | if {[opt-bool fusefs]} { |
| 505 | 504 | if {[cc-check-function-in-lib fuse_mount fuse]} { |
| @@ -507,8 +506,14 @@ | ||
| 507 | 506 | define FOSSIL_HAVE_FUSEFS 1 |
| 508 | 507 | define-append LIBS -lfuse |
| 509 | 508 | msg-result "FuseFS support enabled" |
| 510 | 509 | } |
| 511 | 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 | +} | |
| 512 | 517 | |
| 513 | 518 | make-template Makefile.in |
| 514 | 519 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 515 | 520 |
| --- auto.def | |
| +++ auto.def | |
| @@ -495,11 +495,10 @@ | |
| 495 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 496 | if {![cc-check-functions getpassphrase]} { |
| 497 | # Haiku needs this |
| 498 | cc-check-function-in-lib getpass bsd |
| 499 | } |
| 500 | cc-check-function-in-lib dlopen dl |
| 501 | cc-check-function-in-lib sin m |
| 502 | |
| 503 | # Check for the FuseFS library |
| 504 | if {[opt-bool fusefs]} { |
| 505 | if {[cc-check-function-in-lib fuse_mount fuse]} { |
| @@ -507,8 +506,14 @@ | |
| 507 | define FOSSIL_HAVE_FUSEFS 1 |
| 508 | define-append LIBS -lfuse |
| 509 | msg-result "FuseFS support enabled" |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | make-template Makefile.in |
| 514 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 515 |
| --- auto.def | |
| +++ auto.def | |
| @@ -495,11 +495,10 @@ | |
| 495 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 496 | if {![cc-check-functions getpassphrase]} { |
| 497 | # Haiku needs this |
| 498 | cc-check-function-in-lib getpass bsd |
| 499 | } |
| 500 | cc-check-function-in-lib sin m |
| 501 | |
| 502 | # Check for the FuseFS library |
| 503 | if {[opt-bool fusefs]} { |
| 504 | if {[cc-check-function-in-lib fuse_mount fuse]} { |
| @@ -507,8 +506,14 @@ | |
| 506 | define FOSSIL_HAVE_FUSEFS 1 |
| 507 | define-append LIBS -lfuse |
| 508 | msg-result "FuseFS support enabled" |
| 509 | } |
| 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 |