authorgravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-07-25 12:16:03+02:00
committergravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-07-29 00:19:40+02:00
log63d56c532d4485ff03f59ae0e79043e23bcc63d9
tree34bb9ce35c2cabaaa7e2ec17757622b951b81a2b
parent9e11f67f0d921ed1280dc39e991163053be8a9ee
signaturelock-open Commit is signed but in an unrecognized format.

src/target.cpp: UEFI improvements


1 files changed, 3 insertions(+), 3 deletions(-)

src/target.cpp+3-3
...@@ -989,7 +989,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {...@@ -989,7 +989,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
989}989}
990990
991bool target_allows_addr_zero(const ZigTarget *target) {991bool target_allows_addr_zero(const ZigTarget *target) {
992 return target->os == OsFreestanding;992 return target->os == OsFreestanding || target->os == OsUefi;
993}993}
994994
995const char *target_o_file_ext(const ZigTarget *target) {995const char *target_o_file_ext(const ZigTarget *target) {
...@@ -1414,12 +1414,12 @@ bool target_supports_fpic(const ZigTarget *target) {...@@ -1414,12 +1414,12 @@ bool target_supports_fpic(const ZigTarget *target) {
1414}1414}
14151415
1416bool target_supports_stack_probing(const ZigTarget *target) {1416bool target_supports_stack_probing(const ZigTarget *target) {
1417 return target->os != OsWindows && (target->arch == ZigLLVM_x86 || target->arch == ZigLLVM_x86_64);1417 return target->os != OsWindows && target->os != OsUefi && (target->arch == ZigLLVM_x86 || target->arch == ZigLLVM_x86_64);
1418}1418}
14191419
1420bool target_requires_pic(const ZigTarget *target, bool linking_libc) {1420bool target_requires_pic(const ZigTarget *target, bool linking_libc) {
1421 // This function returns whether non-pic code is completely invalid on the given target.1421 // This function returns whether non-pic code is completely invalid on the given target.
1422 return target->os == OsWindows || target_os_requires_libc(target->os) ||1422 return target->os == OsWindows || target->os == OsUefi || target_os_requires_libc(target->os) ||
1423 (linking_libc && target_is_glibc(target));1423 (linking_libc && target_is_glibc(target));
1424}1424}
14251425