Page MenuHomePhabricator

[compiler-rt] fix OpenBSD and Solaris build with sigaltstack interception
ClosedPublic

Authored by sugak on Feb 4 2020, 9:57 AM.

Details

Summary

sigaltstack interception is implemented D73816. This updated OpenBSD and Solaris bits to fix the build errors.

Diff Detail

Event Timeline

sugak created this revision.Feb 4 2020, 9:57 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 4 2020, 9:57 AM
Herald added subscribers: llvm-commits, Restricted Project, dberris. · View Herald Transcript
sugak edited the summary of this revision. (Show Details)Feb 4 2020, 9:58 AM

Hi @mgorny and @krytarowski! This is my best effort fixing build errors caused by D73816. I don't have a good way to build and test it on NetBSD and would need your help with this.

eugenis added a subscriber: eugenis.Feb 4 2020, 1:13 PM

I've been told that freebsd is also broken.

sugak updated this revision to Diff 242422.Feb 4 2020, 1:43 PM
sugak retitled this revision from [compiler-rt] fix NetBSD build with sigaltstack interception to [compiler-rt] fix NetBSD and FreeBSD build with sigaltstack interception.

include likely fixes for FreeBSD and OpenBSD.

krytarowski resigned from this revision.Feb 4 2020, 2:34 PM

NetBSD fix landed here:

commit b79b7674eb470963d0b558022a843c55b0b0ffe0
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Tue Feb 4 23:30:05 2020 +0100

    [compiler-rt] [netbsd] Fix build after "implement sigaltstack interception"
    
    Fallout after: https://reviews.llvm.org/D73816

For the other OSs that were added later I cannot tell neither test anything so I resign as a reviewer.

sugak added a comment.Feb 4 2020, 3:09 PM

Looks like FreeBSD was also fixed in:

commit 8a1f4feb1b749529ef2349bb7879a38b8d31f5f5
Author: Dimitry Andric <dimitry@andric.com>
Date:   Tue Feb 4 22:50:05 2020 +0100

    [compiler-rt] Fix sanitizer_common build for FreeBSD

    This was broken by 28c91219c7e2, which added `struct_stack_t_sz` only to
    sanitizer_platform_limits_posix.{cpp,h}.

@eugenis what do you suggest we do with the remaining changes that affect solaris and OpenBSD?

sugak updated this revision to Diff 242439.Feb 4 2020, 3:10 PM
sugak retitled this revision from [compiler-rt] fix NetBSD and FreeBSD build with sigaltstack interception to [compiler-rt] fix OpenBSD and Solaris build with sigaltstack interception.
sugak edited the summary of this revision. (Show Details)
sugak edited reviewers, added: eugenis; removed: mgorny, krytarowski.
sugak set the repository for this revision to rG LLVM Github Monorepo.

Rebase

eugenis accepted this revision.Feb 4 2020, 3:17 PM

I always get confused with *bsd targets being under "posix" in most places, getting lumped together with linux in some other files, but having their own platform_limits.

I'm not going to test it, but this change is more likely to make things better than the opposite. May as well land it.

LGTM

This revision is now accepted and ready to land.Feb 4 2020, 3:17 PM
sugak added a comment.Feb 4 2020, 3:41 PM

@eugenis: good! Please push this for me. Thank you!

This revision was automatically updated to reflect the committed changes.