build/x86: also test the stack protector on x86 secondary arch

on x86, gcc emits a local reference to __stack_chk_fail_local
which can only be provided by a static library. as we don't have
a libroot_nonshared, we use libgcc from gcc, in which libssp_nonshared
was merged, from version 8.3.0_2019_05_24-11.

Change-Id: I22bf26dec5c1fe69a3915a923bd716a494f846ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4564
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Jérôme Duval
2021-10-14 19:42:07 +00:00
parent b009ef381b
commit f89943d822
2 changed files with 10 additions and 4 deletions
@@ -2739,6 +2739,8 @@ void srand48() {}
void srand48_r() {}
void srandom() {}
void srandom_r() {}
void __stack_chk_fail() {}
void __stack_chk_fail_local() {}
void sscanf() {}
void statvfs() {}
void stime() {}
+8 -4
View File
@@ -30,10 +30,14 @@ SimpleTest get_cpu_num_test :
CCFLAGS += -fstack-protector ;
SimpleTest stack_protector_test :
stack_protector_test.c
;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
SimpleTest [ MultiArchDefaultGristFiles stack_protector_test ] :
stack_protector_test.c
;
}
}
# Tell Jam where to find these sources