Yes, you can use LibreSSL on Linux, in proprietary software, and it can be statically linked. Here's a breakdown of each question:
Use in Linux: LibreSSL has been made portable, which means it can be built and used on various Unix-like operating systems, including Linux. There are portable versions available for download that can be compiled on Linux systems.
Use in Proprietary Software: LibreSSL is open-source and primarily released under an ISC-style license, which is a permissive, BSD-like license. This means you can use it in proprietary software without the requirement to release your proprietary software's source code. However, you should comply with the terms of the license, which typically include requirements like preserving the copyright notice and disclaimer.
Static Linking: You can statically link the LibreSSL library with your proprietary software. Static linking bundles the library code directly into your application's binary, which can simplify distribution at the cost of having a larger binary size and potentially making updates to the library more cumbersome.
Selecting Particular Modules: As for selectively including specific modules of LibreSSL, it depends on how the library is structured and whether it supports such granularity. Many cryptographic libraries are designed with some level of modularity, allowing you to compile only the components you need. However, this is often limited by the interdependencies between various parts of the library. You would need to consult the LibreSSL build documentation or development team to determine the feasibility of this.
When including only the parts you need for static linkage, the process usually involves modifying the build configuration. You may disable features or modules you don't need before compiling the library. This can result in a smaller static binary, but in practice, the extent to which you can do this depends on the internal structure of the library and how tightly coupled its components are.
Keep in mind that even with permissive licenses and the ability to statically link or include only parts of a library, it's critical to consult the specific library's license and possibly seek legal advice to ensure full compliance with all terms and conditions.