diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-05-21 09:42:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-21 09:42:07 +0100 |
| commit | acb04160c531f3e79d09d477ccb960f0ac70c216 (patch) | |
| tree | 4aa550e5d1932d448d082b1011642d6aca3f9e9f /src/linker.cpp | |
| parent | 5af9e37e08017abf179f47934c701bb34804b11a (diff) | |
| parent | c090a28b9d390ccd5352af2b2443491be806e464 (diff) | |
Merge pull request #5190 from Feoramund/fix-freebsd-3rd-linking
Add `/usr/local/lib` to FreeBSD linker path
Diffstat (limited to 'src/linker.cpp')
| -rw-r--r-- | src/linker.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linker.cpp b/src/linker.cpp index 087bb49f1..41d4a13a1 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -801,6 +801,9 @@ try_cross_linking:; // This points the linker to where the entry point is link_settings = gb_string_appendc(link_settings, "-e _main "); } + } else if (build_context.metrics.os == TargetOs_freebsd) { + // FreeBSD pkg installs third-party shared libraries in /usr/local/lib. + platform_lib_str = gb_string_appendc(platform_lib_str, "-Wl,-L/usr/local/lib "); } else if (build_context.metrics.os == TargetOs_openbsd) { // OpenBSD ports install shared libraries in /usr/local/lib. Also, we must explicitly link libpthread. platform_lib_str = gb_string_appendc(platform_lib_str, "-lpthread -Wl,-L/usr/local/lib "); |