mipsel: build: Fix -z execstack link error

master
klzgrad 2025-04-04 10:22:21 +08:00
parent d292a42e4c
commit b861b53110
1 changed files with 12 additions and 4 deletions

View File

@ -499,10 +499,18 @@ config("compiler") {
cflags += [ "-pipe" ]
}
ldflags += [
"-Wl,-z,noexecstack",
"-Wl,-z,relro",
]
if (current_cpu != "mipsel" && current_cpu != "mips64el") {
ldflags += [
"-Wl,-z,noexecstack",
"-Wl,-z,relro",
]
} else {
ldflags += [
# https://github.com/llvm/llvm-project/pull/124068
"-Wl,-z,execstack",
"-Wl,-z,relro",
]
}
if (!is_component_build) {
ldflags += [ "-Wl,-z,now" ]