From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1298) id 658D13858D39; Thu, 29 Sep 2022 14:40:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 658D13858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664462457; bh=7qphW2Ne/f/BpUGX/Lh4HDwG3vDSZIvW9ydLNqLFL+Q=; h=From:To:Subject:Date:From; b=I01Cxv2CGiVzndk+sOPAy1M1QOiZNLYnFi+tIMLZ4PoFc4NskeaC6yLYDaJHuiOR4 Qv6B2l0XrGRBmz3TmKWQEOFcXxUogkdJAQTvRtGtj2vY0OOKa+UvRJRFLcpMms5vH7 7Whet3zQ7OVD/A+Lpvw+HBcHBbEexYhyQlHNXjoM= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Olivier Hainque To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2958] Robustify DWARF2_UNWIND_INFO handling in vx-common.h X-Act-Checkin: gcc X-Git-Author: Olivier Hainque X-Git-Refname: refs/heads/master X-Git-Oldrev: 8ace67ddb97698709a622b2f8ba2718524aa5eeb X-Git-Newrev: 2813f529ab8df6daef739d996688caab615eb1a9 Message-Id: <20220929144057.658D13858D39@sourceware.org> Date: Thu, 29 Sep 2022 14:40:57 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2813f529ab8df6daef739d996688caab615eb1a9 commit r13-2958-g2813f529ab8df6daef739d996688caab615eb1a9 Author: Olivier Hainque Date: Thu Mar 10 10:46:19 2022 +0000 Robustify DWARF2_UNWIND_INFO handling in vx-common.h This adjusts vx-common.h to #define DWARF2_UNWIND_INFO to 0 when ARM_UNWIND_INFO is set, preventing defaults.h from possibly setting DWARF2_UNWIND_INFO to 1 (as well) on its own afterwards if the macro isn't defined. 2022-09-29 Olivier Hainque gcc/ * config/vx-common.h (DWARF2_UNWIND_INFO): #define to 0 when ARM_UNWIND_INFO is set. Diff: --- gcc/config/vx-common.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/config/vx-common.h b/gcc/config/vx-common.h index bc27684375a..bf5823af6bf 100644 --- a/gcc/config/vx-common.h +++ b/gcc/config/vx-common.h @@ -74,7 +74,8 @@ along with GCC; see the file COPYING3. If not see /* ---------------------- Debug and unwind info formats ------------------ */ /* Dwarf2 unwind info is supported, unless overriden by a request for a target - specific format. + specific format. Always #define DWARF2_UNWIND_INFO to prevent defaults.h + from picking a possibly different value. Taking care of this here allows using DWARF2_UNWIND_INFO in #if conditions from the common config/vxworks.h files, included before the cpu @@ -84,8 +85,10 @@ along with GCC; see the file COPYING3. If not see #if point. Since /vxworks.h. is typically included after config/vxworks.h, #if expressions in the latter can't rely on possible redefinitions in the former. */ -#if !ARM_UNWIND_INFO #undef DWARF2_UNWIND_INFO +#if ARM_UNWIND_INFO +#define DWARF2_UNWIND_INFO 0 +#else #define DWARF2_UNWIND_INFO 1 #endif