From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 39E411F8C6 for ; Sat, 11 Sep 2021 20:20:55 +0000 (UTC) Received: from localhost ([::1]:56390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mP9Ub-0001AC-J1 for normalperson@yhbt.net; Sat, 11 Sep 2021 16:20:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mP9Tz-0000hk-2B for bug-gnulib@gnu.org; Sat, 11 Sep 2021 16:20:15 -0400 Received: from mail.inka.de ([2a04:c9c7:0:1073:217:a4ff:fe3b:e77c]:55552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mP9Tv-0005OK-0U for bug-gnulib@gnu.org; Sat, 11 Sep 2021 16:20:12 -0400 Received: from mips.inka.de (naddy@[127.0.0.1]) by mail.inka.de with uucp (rmailwrap 0.5) id 1mP9Tp-008SUt-9F; Sat, 11 Sep 2021 22:20:05 +0200 Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.16.1/8.16.1) with ESMTP id 18BKJofY027022 for ; Sat, 11 Sep 2021 22:19:50 +0200 (CEST) (envelope-from naddy@lorvorc.mips.inka.de) Received: (from naddy@localhost) by lorvorc.mips.inka.de (8.16.1/8.16.1/Submit) id 18BKJoJh027021 for bug-gnulib@gnu.org; Sat, 11 Sep 2021 22:19:50 +0200 (CEST) (envelope-from naddy) Date: Sat, 11 Sep 2021 22:19:50 +0200 From: Christian Weisgerber To: bug-gnulib@gnu.org Subject: sigsegv.c: add OpenBSD/powerpc64 support Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: none client-ip=2a04:c9c7:0:1073:217:a4ff:fe3b:e77c; envelope-from=naddy@mips.inka.de; helo=mail.inka.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" gnulib's sigsegv.c has support for OpenBSD on a number of architectures. Currently, it treats powerpc64 the same as powerpc, but that is not correct and will not compile. Here's a patch to add powerp64 support: diff b6bae60d83eda6b168368fa40f42ade9dfc86df0 /home/naddy/tmp/gnulib blob - 998c82768cb6f7aa0a418551645c9910851ff9c8 file + lib/sigsegv.c --- lib/sigsegv.c +++ lib/sigsegv.c @@ -511,8 +511,15 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; # define SIGSEGV_FAULT_STACKPOINTER scp->sc_regs[29] -# elif defined __powerpc__ || defined __powerpc64__ +# elif defined __powerpc64__ +/* See the definition of 'struct sigcontext' in + openbsd-src/sys/arch/powerpc64/include/signal.h. */ + +# define SIGSEGV_FAULT_STACKPOINTER scp->sc_sp + +# elif defined __powerpc__ + /* See the definition of 'struct sigcontext' and 'struct trapframe' in openbsd-src/sys/arch/powerpc/include/signal.h. */ -- Christian "naddy" Weisgerber naddy@mips.inka.de