Fossil SCM
Comment improvements to [6f9d265234 | the recent change] in auto.def.
Commit
53caec9524d73e098b73de18b7ec20e9b1d718d016620689ea79366fd7514201
Parent
c9b6be2f62e02ac…
1 file changed
+4
-3
M
auto.def
+4
-3
| --- auto.def | ||
| +++ auto.def | ||
| @@ -610,19 +610,20 @@ | ||
| 610 | 610 | # GCC with -fsanitize=undefined. |
| 611 | 611 | cc-check-function-in-lib __ubsan_handle_add_overflow ubsan |
| 612 | 612 | } |
| 613 | 613 | } |
| 614 | 614 | |
| 615 | -# Finally, append -ldl to make sure it's the last in the list. | |
| 616 | -# The library order matters in case of static linking. | |
| 615 | +# Finally, append libraries that must be last. This matters more on some | |
| 616 | +# OSes than others, but is most broadly required for static linking. | |
| 617 | 617 | if {[check-function-in-lib dlopen dl]} { |
| 618 | 618 | # Some platforms (*BSD) have the dl functions already in libc and no libdl. |
| 619 | 619 | # In such case we can link directly without -ldl. |
| 620 | 620 | define-append LIBS [get-define lib_dlopen] |
| 621 | 621 | } |
| 622 | - | |
| 623 | 622 | if {[opt-bool static]} { |
| 623 | + # Linux can only infer the dependency on pthread from OpenSSL when | |
| 624 | + # doing dynamic linkage. | |
| 624 | 625 | define-append EXTRA_LDFLAGS -lpthread |
| 625 | 626 | } |
| 626 | 627 | |
| 627 | 628 | |
| 628 | 629 | make-template Makefile.in |
| 629 | 630 |
| --- auto.def | |
| +++ auto.def | |
| @@ -610,19 +610,20 @@ | |
| 610 | # GCC with -fsanitize=undefined. |
| 611 | cc-check-function-in-lib __ubsan_handle_add_overflow ubsan |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | # Finally, append -ldl to make sure it's the last in the list. |
| 616 | # The library order matters in case of static linking. |
| 617 | if {[check-function-in-lib dlopen dl]} { |
| 618 | # Some platforms (*BSD) have the dl functions already in libc and no libdl. |
| 619 | # In such case we can link directly without -ldl. |
| 620 | define-append LIBS [get-define lib_dlopen] |
| 621 | } |
| 622 | |
| 623 | if {[opt-bool static]} { |
| 624 | define-append EXTRA_LDFLAGS -lpthread |
| 625 | } |
| 626 | |
| 627 | |
| 628 | make-template Makefile.in |
| 629 |
| --- auto.def | |
| +++ auto.def | |
| @@ -610,19 +610,20 @@ | |
| 610 | # GCC with -fsanitize=undefined. |
| 611 | cc-check-function-in-lib __ubsan_handle_add_overflow ubsan |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | # Finally, append libraries that must be last. This matters more on some |
| 616 | # OSes than others, but is most broadly required for static linking. |
| 617 | if {[check-function-in-lib dlopen dl]} { |
| 618 | # Some platforms (*BSD) have the dl functions already in libc and no libdl. |
| 619 | # In such case we can link directly without -ldl. |
| 620 | define-append LIBS [get-define lib_dlopen] |
| 621 | } |
| 622 | if {[opt-bool static]} { |
| 623 | # Linux can only infer the dependency on pthread from OpenSSL when |
| 624 | # doing dynamic linkage. |
| 625 | define-append EXTRA_LDFLAGS -lpthread |
| 626 | } |
| 627 | |
| 628 | |
| 629 | make-template Makefile.in |
| 630 |