Commit 264dd2eb57

Marc Tiehuis <marctiehuis@gmail.com>
2017-10-22 00:24:15
Set FreeBSD ELF OS/ABI when targeting
Closes #553.
1 parent e2b9c15
Changed files (1)
src/link.cpp
@@ -150,6 +150,10 @@ static const char *getLDMOption(const ZigTarget *t) {
             if (t->env_type == ZigLLVM_GNUX32) {
                 return "elf32_x86_64";
             }
+            // Any target elf will use the freebsd osabi if suffixed with "_fbsd".
+            if (t->os == OsFreeBSD) {
+                return "elf_x86_64_fbsd";
+            }
             return "elf_x86_64";
         default:
             zig_unreachable();