2023-08-16 22:26:55 +00:00
|
|
|
Taken from ports LLVM.
|
|
|
|
|
|
|
|
Index: driver/targetmachine.cpp
|
|
|
|
--- driver/targetmachine.cpp.orig
|
|
|
|
+++ driver/targetmachine.cpp
|
2023-08-18 18:38:43 +00:00
|
|
|
@@ -457,6 +457,8 @@ createTargetMachine(const std::string targetTriple, co
|
2023-08-16 22:26:55 +00:00
|
|
|
// these OSes.
|
|
|
|
// On Android, PIC is default as well.
|
|
|
|
relocModel = llvm::Reloc::PIC_;
|
|
|
|
+ } else if (triple.isOSOpenBSD()) {
|
|
|
|
+ relocModel = llvm::Reloc::PIC_;
|
|
|
|
} else {
|
|
|
|
// ARM for other than Darwin or Android defaults to static
|
|
|
|
switch (triple.getArch()) {
|