From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19843 invoked by alias); 12 Apr 2016 12:59:47 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 19755 invoked by uid 89); 12 Apr 2016 12:59:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1602 X-HELO: smtprelay.synopsys.com Received: from us01smtprelay-2.synopsys.com (HELO smtprelay.synopsys.com) (198.182.47.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 12 Apr 2016 12:59:36 +0000 Received: from us02secmta2.synopsys.com (us02secmta2.synopsys.com [10.12.235.98]) by smtprelay.synopsys.com (Postfix) with ESMTP id 8CF6C24E13FD for ; Tue, 12 Apr 2016 05:59:34 -0700 (PDT) Received: from us02secmta2.internal.synopsys.com (us02secmta2.internal.synopsys.com [127.0.0.1]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id 80D2055F13 for ; Tue, 12 Apr 2016 05:59:34 -0700 (PDT) Received: from mailhost.synopsys.com (unknown [10.13.184.66]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id 62E0E55F02 for ; Tue, 12 Apr 2016 05:59:34 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 500EAD4C for ; Tue, 12 Apr 2016 05:59:34 -0700 (PDT) Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id 4A639D49 for ; Tue, 12 Apr 2016 05:59:34 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 12 Apr 2016 05:59:34 -0700 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 12 Apr 2016 18:29:31 +0530 Received: from nl20droid1.internal.synopsys.com (10.100.24.228) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 12 Apr 2016 18:29:31 +0530 From: Claudiu Zissulescu To: CC: Subject: [PATCH] [ARC] Fix setting private flags when parsing .cpu. Date: Tue, 12 Apr 2016 12:59:00 -0000 Message-ID: <1460465889-30399-1-git-send-email-claziss@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2016-04/txt/msg00179.txt.bz2 The .cpu pseudo-op sets the current ARC architecture which we assemble for. However, we do not properly set the private flags, hence, this patch. OK to apply? Claudiu gas/ 2016-04-12 Claudiu Zissulescu * config/tc-arc.c (mach_type_specified_p): Change type to bfd_boolean. (arc_option): Set private flags when parsing cpu pseudo-op. (md_parse_option): Set mach_type_specified_p to TRUE. --- gas/config/tc-arc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index 7486924..17e0b9a 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -396,8 +396,8 @@ static unsigned arc_features; /* The default architecture. */ static int arc_mach_type; -/* Non-zero if the cpu type has been explicitly specified. */ -static int mach_type_specified_p = 0; +/* TRUE if the cpu type has been explicitly specified. */ +static bfd_boolean mach_type_specified_p = FALSE; /* The hash table of instruction opcodes. */ static struct hash_control *arc_opcode_hash; @@ -902,6 +902,9 @@ arc_option (int ignore ATTRIBUTE_UNUSED) if (!bfd_set_arch_mach (stdoutput, bfd_arch_arc, mach)) as_fatal (_("could not set architecture and machine")); + + /* Set elf header flags. */ + bfd_set_private_flags (stdoutput, arc_eflag); } else if (arc_mach_type != mach) @@ -3156,7 +3159,7 @@ md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED) case OPTION_MCPU: { arc_select_cpu (arg); - mach_type_specified_p = 1; + mach_type_specified_p = TRUE; break; } -- 1.9.1