From nobody Sun Feb 20 12:31:05 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E12FD19DB035; Sun, 20 Feb 2022 12:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K1lCZ3mM3z4nxh; Sun, 20 Feb 2022 12:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645360266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d/oRqKz/zTM2pBrIFbZd9ybnxJrfMJGtIrMO/S1FN6w=; b=DhrK55RFMCRIegtuAmpFLk/6manYuUAAhEeLFLYidC8hDmi8RMKT7Nm8bB5dJJY+xdoszq enVD4nlKUWTo4GIEKFgiWNjU1cCYXv3tQCu12nUzfE3rBwSJpqeW9aHYahbdJmuKFzTgwI ALLbrDz6rfWOyFe16/pCMV/OJh9S5LHiiRwsaXBb9FCrvizwtzrWa1KDR87VZtKfFNjhY8 9OWg2KZsCg834Bt1IwWQKLSSn+CjIjJWbbt5czbLRUun6f25JA8n1eQl896iaYAwUGfmu9 lll4irYdJgMCXxohrnmxvb/2G5LMEEXN187alUBSShS29AmDhOpFs2RWHwb5ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D177E1CA8F; Sun, 20 Feb 2022 12:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21KCV55d050866; Sun, 20 Feb 2022 12:31:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21KCV5DY050865; Sun, 20 Feb 2022 12:31:05 GMT (envelope-from git) Date: Sun, 20 Feb 2022 12:31:05 GMT Message-Id: <202202201231.21KCV5DY050865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: b2127b6f1ae2 - stable/13 - Install unwind.h into /usr/include List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b2127b6f1ae2b92eba1892e6f5257e3f6795fed5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645360266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d/oRqKz/zTM2pBrIFbZd9ybnxJrfMJGtIrMO/S1FN6w=; b=qmfZAaUEYWX1dzNqtquiDquK4+4UB65qlgfPW+ZUoNBR5nV7lAV6bnhw18TmAWzLynZeRF aNdXYGwZ0MjDGoBmTGUK1hKLBZLmZckueX1QqoEcLO4q/OS6gDvXmOuoZVt2WO/pba/kN7 FVb+1Oh5YdXfIPQj/1E94gjVJwEHV2PZ8uGLJdGkppY23JHNanIF9uKTw4ReJzBzAsAQop sapQv/3rqDEjtMRt1Peck+WiANTmt8LC2tMZRS+bXjPSfSL0bAaGoun3+4gPtAp+IbX5Ax 7/W3QBDZuf5Jl21batoQo+M+E3vUL9zgLBIAHm1iQruSuOqKlfeobI0f4dDcLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645360266; a=rsa-sha256; cv=none; b=jaS2s3KCsbZnPz17YScN6qmhm/uXPLzjY4cAppCPvEm8bNZsl+ESKUHOufNFYAqRw3lkmm UmSPaJpO7dqaMBgDLNGu1NLdiFlkjB64WAaWXdJK4MoauvEBhvjTpLQg1BEM1gJ2IBqlim Hw50JNDGZMDUA6nQSxZebK2iKNz37q4oysT9LEoYlAqTicX2u+qXT8JKqQPkjv9ujb5i7r FFNZewu5Pflcitm02wHhSj76+6WNMhb+1SY66mYBSq4qTJ10vUeJCBBrB9ChFfC+hsNcqo VI8tk/C7wXDLnJJLSGXNswdiZ3laxSDKxVItxRXUfRRMXQwkXAsHWokSXFDHsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b2127b6f1ae2b92eba1892e6f5257e3f6795fed5 commit b2127b6f1ae2b92eba1892e6f5257e3f6795fed5 Author: John Baldwin AuthorDate: 2022-02-10 17:57:49 +0000 Commit: Dimitry Andric CommitDate: 2022-02-20 12:29:44 +0000 Install unwind.h into /usr/include Install headers from LLVM's libunwind in place of the headers from libcxxrt and allow C applications to use the library. As part of this, remove include/unwind.h and switch libthr over to using the installed unwind.h. Reviewed by: dim, emaste MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D34065 (cherry picked from commit c00d345665366a89aaba7244d6f078dc756f4c53) --- ObsoleteFiles.inc | 5 + include/unwind.h | 160 ------------------------------- lib/libc++/Makefile | 3 - lib/libgcc_eh/Makefile | 4 + lib/libgcc_eh/Makefile.inc | 1 - lib/libthr/Makefile | 1 - tools/build/mk/OptionalObsoleteFiles.inc | 3 - 7 files changed, 9 insertions(+), 168 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index d57309df174b..aa2923bb1b12 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20220220: unwind.h moved to /usr/include +OLD_FILES+=usr/include/c++/v1/unwind-arm.h +OLD_FILES+=usr/include/c++/v1/unwind-itanium.h +OLD_FILES+=usr/include/c++/v1/unwind.h + # 20211221 efi_set_variables_supported.3 should be efi_variables_supported.3 OLD_FILES+=usr/share/man/man3/efi_set_variables_supported.3.gz diff --git a/include/unwind.h b/include/unwind.h deleted file mode 100644 index a872c0a094ba..000000000000 --- a/include/unwind.h +++ /dev/null @@ -1,160 +0,0 @@ -/* $FreeBSD$ */ - -/*- - libunwind - a platform-independent unwind library - - SPDX-License-Identifier: ISC - - Copyright (C) 2003 Hewlett-Packard Co - Contributed by David Mosberger-Tang - -This file is part of libunwind. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _UNWIND_H -#define _UNWIND_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Minimal interface as per C++ ABI draft standard: - - http://www.codesourcery.com/cxx-abi/abi-eh.html */ - -typedef enum - { - _URC_NO_REASON = 0, - _URC_FOREIGN_EXCEPTION_CAUGHT = 1, - _URC_FATAL_PHASE2_ERROR = 2, - _URC_FATAL_PHASE1_ERROR = 3, - _URC_NORMAL_STOP = 4, - _URC_END_OF_STACK = 5, - _URC_HANDLER_FOUND = 6, - _URC_INSTALL_CONTEXT = 7, - _URC_CONTINUE_UNWIND = 8 - } -_Unwind_Reason_Code; - -typedef int _Unwind_Action; - -#define _UA_SEARCH_PHASE 1 -#define _UA_CLEANUP_PHASE 2 -#define _UA_HANDLER_FRAME 4 -#define _UA_FORCE_UNWIND 8 - -struct _Unwind_Context; /* opaque data-structure */ -struct _Unwind_Exception; /* forward-declaration */ - -typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code, - struct _Unwind_Exception *); - -typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action, - __uint64_t, - struct _Unwind_Exception *, - struct _Unwind_Context *, - void *); - -/* The C++ ABI requires exception_class, private_1, and private_2 to - be of type uint64 and the entire structure to be - double-word-aligned, but that seems a bit overly IA-64-specific. - Using "unsigned long" instead should give us the desired effect on - IA-64, while being more general. */ -struct _Unwind_Exception - { - __uint64_t exception_class; - _Unwind_Exception_Cleanup_Fn exception_cleanup; - unsigned long private_1; - unsigned long private_2; - }; - -extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); -extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, - _Unwind_Stop_Fn, void *); -extern void _Unwind_Resume (struct _Unwind_Exception *); -extern void _Unwind_DeleteException (struct _Unwind_Exception *); -extern unsigned long _Unwind_GetGR (struct _Unwind_Context *, int); -extern void _Unwind_SetGR (struct _Unwind_Context *, int, unsigned long); -extern unsigned long _Unwind_GetIP (struct _Unwind_Context *); -extern unsigned long _Unwind_GetIPInfo (struct _Unwind_Context *, int *); -extern void _Unwind_SetIP (struct _Unwind_Context *, unsigned long); -extern unsigned long _Unwind_GetLanguageSpecificData (struct _Unwind_Context*); -extern unsigned long _Unwind_GetRegionStart (struct _Unwind_Context *); - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - -/* Callback for _Unwind_Backtrace(). The backtrace stops immediately - if the callback returns any value other than _URC_NO_REASON. */ -typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (struct _Unwind_Context *, - void *); - -/* See http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00082.html for why - _UA_END_OF_STACK exists. */ -# define _UA_END_OF_STACK 16 - -/* If the unwind was initiated due to a forced unwind, resume that - operation, else re-raise the exception. This is used by - __cxa_rethrow(). */ -extern _Unwind_Reason_Code - _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *); - -/* See http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00154.html for why - _Unwind_GetBSP() exists. */ -extern unsigned long _Unwind_GetBSP (struct _Unwind_Context *); - -/* Return the "canonical frame address" for the given context. - This is used by NPTL... */ -extern uintptr_t _Unwind_GetCFA (struct _Unwind_Context *); - -/* Return the base-address for data references. */ -extern unsigned long _Unwind_GetDataRelBase (struct _Unwind_Context *); - -/* Return the base-address for text references. */ -extern unsigned long _Unwind_GetTextRelBase (struct _Unwind_Context *); - -/* Call _Unwind_Trace_Fn once for each stack-frame, without doing any - cleanup. The first frame for which the callback is invoked is the - one for the caller of _Unwind_Backtrace(). _Unwind_Backtrace() - returns _URC_END_OF_STACK when the backtrace stopped due to - reaching the end of the call-chain or _URC_FATAL_PHASE1_ERROR if it - stops for any other reason. */ -extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *); - -/* Find the start-address of the procedure containing the specified IP - or NULL if it cannot be found (e.g., because the function has no - unwind info). Note: there is not necessarily a one-to-one - correspondence between source-level functions and procedures: some - functions don't have unwind-info and others are split into multiple - procedures. */ -extern void *_Unwind_FindEnclosingFunction (void *); - -/* See also Linux Standard Base Spec: - http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/libgcc-s.html */ - -#endif /* _GNU_SOURCE || _BSD_SOURCE */ - -#ifdef __cplusplus -}; -#endif - -#endif /* _UNWIND_H */ diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index 2bc1bf40eccd..6c00aa398ee0 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -237,9 +237,6 @@ STD+= ${HDRDIR}/${hdr} STD+= ${.CURDIR}/__config_site RT_HEADERS+= cxxabi.h -RT_HEADERS+= unwind-arm.h -RT_HEADERS+= unwind-itanium.h -RT_HEADERS+= unwind.h .for hdr in ${RT_HEADERS} STD+= ${_LIBCXXRTDIR}/${hdr} .endfor diff --git a/lib/libgcc_eh/Makefile b/lib/libgcc_eh/Makefile index ecffbf9cfd6a..6f2deda1adf0 100644 --- a/lib/libgcc_eh/Makefile +++ b/lib/libgcc_eh/Makefile @@ -11,6 +11,10 @@ WARNS?= 2 SRCS_EXC+= int_util.c .include "Makefile.inc" +INCS+= ${UNWINDINCDIR}/__libunwind_config.h +INCS+= ${UNWINDINCDIR}/libunwind.h +INCS+= ${UNWINDINCDIR}/unwind.h + .if ${.MAKE.LEVEL} > 0 # avoid circular dependencies GENDIRDEPS_FILTER+= Nlib/msun diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc index 4fe1eff406e1..20535a5d0bbc 100644 --- a/lib/libgcc_eh/Makefile.inc +++ b/lib/libgcc_eh/Makefile.inc @@ -26,7 +26,6 @@ CXXFLAGS.${file}+= -fno-exceptions -funwind-tables .endfor CFLAGS+= -I${UNWINDINCDIR} -CFLAGS+= -I${.CURDIR} CFLAGS+= -D_LIBUNWIND_IS_NATIVE_ONLY CFLAGS+= -D_LIBUNWIND_USE_FRAME_HEADER_CACHE CXXFLAGS+= -fno-rtti diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 1a5dfa18dca7..fab83d98ebe0 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -19,7 +19,6 @@ CFLAGS+=-DPTHREAD_KERNEL CFLAGS+=-I${SRCTOP}/lib/libc/include CFLAGS+=-I${SRCTOP}/lib/libc/${MACHINE_CPUARCH} CFLAGS+=-I${.CURDIR}/thread -CFLAGS+=-I${SRCTOP}/include CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include CFLAGS+=-I${.CURDIR}/sys CFLAGS+=-I${SRCTOP}/libexec/rtld-elf diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 21336b55fb89..70b7574040e0 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -4189,9 +4189,6 @@ OLD_FILES+=usr/include/c++/v1/typeindex OLD_FILES+=usr/include/c++/v1/typeinfo OLD_FILES+=usr/include/c++/v1/unordered_map OLD_FILES+=usr/include/c++/v1/unordered_set -OLD_FILES+=usr/include/c++/v1/unwind-arm.h -OLD_FILES+=usr/include/c++/v1/unwind-itanium.h -OLD_FILES+=usr/include/c++/v1/unwind.h OLD_FILES+=usr/include/c++/v1/utility OLD_FILES+=usr/include/c++/v1/valarray OLD_FILES+=usr/include/c++/v1/variant