Bug 10061 - gcc5.4 buildroot toolchain for powerpc libsanitizer failure
Summary: gcc5.4 buildroot toolchain for powerpc libsanitizer failure
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-13 03:39 UTC by Matt Weber
Modified: 2017-07-15 09:32 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Weber 2017-07-13 03:39:11 UTC
I'm building the following Buildroot Custom toolchain config and
noticing a libsanitizer failure. 


../../../../libsanitizer/asan/asan_linux.cc: In function âbool
__asan::AsanInterceptsSignal(int)â:
../../../../libsanitizer/asan/asan_linux.cc:222:20: error: âSIGSEGVâ
was not declared in this scope
   return signum == SIGSEGV && common_flags()->handle_segv;
                    ^
make[6]: *** [asan_linux.lo] Error 1
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-target-libsanitizer] Error 2
make[2]: *** [all] Error 2
make[1]: *** [/accts/mlweber1/target/build/host-gcc-final-5.4.0/.stamp_built]
Error 2
make: *** [_all] Error 2

Config to reproduce:
BR2_powerpc=y
BR2_powerpc_e500mc=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.12.37"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y
BR2_GCC_VERSION_5_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_GCC_ENABLE_LTO=y

The resolution looks to be  https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg159613.html

I'll get a patch tested and I can confirm so far that the issue goes away in GCC6 but GCC5.4 has the bug.
Comment 1 Matt Weber 2017-07-13 03:40:26 UTC
Confirmed, that patch does resolve the issue.
Comment 2 Thomas Petazzoni 2017-07-15 09:32:06 UTC
Fixed by your own patch, applied as of commit https://git.buildroot.org/buildroot/commit/?id=5c90f6a7b68ebdc43ea72b763ec98a0a300c57a1.