Index: llvm/tools/llvm-config/llvm-config.cpp
--- llvm/tools/llvm-config/llvm-config.cpp.orig
+++ llvm/tools/llvm-config/llvm-config.cpp
@@ -410,6 +410,12 @@ int main(int argc, char **argv) {
     StaticExt = "a";
     StaticDir = SharedDir = ActiveLibDir;
     StaticPrefix = SharedPrefix = "lib";
+  } else if (HostTriple.isOSOpenBSD()) {
+    SharedExt = "so";
+    SharedVersionedExt = ".so" ;
+    StaticExt = "a";
+    StaticDir = SharedDir = ActiveLibDir;
+    StaticPrefix = SharedPrefix = "lib";
   } else {
     // default to the unix values:
     SharedExt = "so";
@@ -437,7 +443,12 @@ int main(int argc, char **argv) {
     std::string path((SharedDir + DirSep + DyLibName).str());
     if (DirSep == "\\")
       llvm::replace(path, '/', '\\');
-    DyLibExists = sys::fs::exists(path);
+    // path does not include major.minor
+    if (HostTriple.isOSOpenBSD()) {
+      DyLibExists = true;
+    } else {
+      DyLibExists = sys::fs::exists(path);
+    }
     if (!DyLibExists) {
       // The shared library does not exist: don't error unless the user
       // explicitly passes --link-shared.
