From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 72E5A3858D1E for ; Fri, 30 Dec 2022 15:48:30 +0000 (GMT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A67272031A for ; Fri, 30 Dec 2022 15:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1672415309; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=xqxDDttBxSE5xjMUlSxcMIHi6FuRnQUzkHUA0kLfxRg=; b=rIcw8VEG8t+FFBCj+UVgxMtWcOAdYRIUZpNvpw/FRIYV9/LQgkq57oSc29nypF2VHOWzSn 5yZatzXATC3aBLWXx8Su7SlCr2yLH9Qd4AjlEN4hzmQ5WNxxyvKvQ+QBMklvy/Y30UIbGn Or1ychRwe6QGQMo8cKcdMOYAlkrAaOs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1672415309; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=xqxDDttBxSE5xjMUlSxcMIHi6FuRnQUzkHUA0kLfxRg=; b=qlrSCRq42zbL50kajWd4+5mVDnrvaRa9NpM5Bo7o3j71/CuS5fyhl7RzB4QVkPc7V7vZIH D0pKadT2du6BKSBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 915FC13638 for ; Fri, 30 Dec 2022 15:48:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gTBUIk0Ir2M6QwAAMHmgww (envelope-from ) for ; Fri, 30 Dec 2022 15:48:29 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.reverse/step-indirect-call-thunk.exp with -fcf-protection Date: Fri, 30 Dec 2022 16:48:29 +0100 Message-Id: <20221230154829.4165-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Ubuntu 22.04.1 x86_64, I run into: ... gdb.reverse/step-indirect-call-thunk.c: In function 'inc':^M gdb.reverse/step-indirect-call-thunk.c:22:1: error: '-mindirect-branch' and \ '-fcf-protection' are not compatible^M 22 | { /* inc.1 */^M | ^^M ... Fix this by forcing -fcf-protection=none, if supported. Tested on x86_64-linux. --- .../gdb.reverse/step-indirect-call-thunk.exp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp b/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp index 3f1f5381f09..1234a042645 100644 --- a/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp +++ b/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp @@ -20,9 +20,18 @@ if { ![supports_reverse] } { standard_testfile -set cflags "-mindirect-branch=thunk -mfunction-return=thunk" -if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ - [list debug "additional_flags=$cflags"]] } { +set cflags {} +lappend cflags debug +lappend cflags additional_flags=-mindirect-branch=thunk +lappend cflags additional_flags=-mfunction-return=thunk + +set fcf_protection_none additional_flags=-fcf-protection=none +if { [gdb_can_simple_compile fcf-protection-none {int main () { return 0; }} \ + executable $fcf_protection_none] } { + lappend cflags $fcf_protection_none +} + +if { [prepare_for_testing "failed to prepare" $testfile $srcfile $cflags] } { return -1 } base-commit: b1b0f69cb4a2ccd421419f9703edfcc5c3032dc0 -- 2.35.3