From owner-dev-commits-src-all@freebsd.org Fri Jun 4 00:29:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DB4A643CBB; Fri, 4 Jun 2021 00:29:01 +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 4Fx3Xs1Gv4z3H1V; Fri, 4 Jun 2021 00:29:01 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 14004137D1; Fri, 4 Jun 2021 00:29:01 +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 1540T02r093767; Fri, 4 Jun 2021 00:29:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1540T0v5093766; Fri, 4 Jun 2021 00:29:00 GMT (envelope-from git) Date: Fri, 4 Jun 2021 00:29:00 GMT Message-Id: <202106040029.1540T0v5093766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: 5e478926f04a - stable/12 - aic7xxx: Fix re-building firmware with -fno-common MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5e478926f04a8ad0c2401744bcb477e363ea97f9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2021 00:29:01 -0000 The branch stable/12 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=5e478926f04a8ad0c2401744bcb477e363ea97f9 commit 5e478926f04a8ad0c2401744bcb477e363ea97f9 Author: Jessica Clarke AuthorDate: 2021-05-28 18:07:17 +0000 Commit: Jessica Clarke CommitDate: 2021-06-04 00:28:45 +0000 aic7xxx: Fix re-building firmware with -fno-common The generated C output for aicasm_scan.l defines yylineno already, so references to it from other files should use an extern declaration. The STAILQ_HEAD use in aicasm_symbol.h also provided an identifier, causing it to both define the struct type and define a variable of that struct type, causing any C file including the header to define the same variable. This variable is not used (and confusingly clashes with a field name just below) and was likely caused by confusion when switching between defining fields using similar type macros and defining the type itself. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30525 (cherry picked from commit 5e912f5fec025766521f535d1237330ede7f18e2) --- sys/dev/aic7xxx/aicasm/aicasm_gram.y | 2 +- sys/dev/aic7xxx/aicasm/aicasm_symbol.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/aic7xxx/aicasm/aicasm_gram.y b/sys/dev/aic7xxx/aicasm/aicasm_gram.y index c479c8fdf2db..d32793f4c12b 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_gram.y +++ b/sys/dev/aic7xxx/aicasm/aicasm_gram.y @@ -59,7 +59,7 @@ #include "aicasm_symbol.h" #include "aicasm_insformat.h" -int yylineno; +extern int yylineno; char *yyfilename; char stock_prefix[] = "aic_"; char *prefix = stock_prefix; diff --git a/sys/dev/aic7xxx/aicasm/aicasm_symbol.h b/sys/dev/aic7xxx/aicasm/aicasm_symbol.h index 616dfd28fdeb..a15fa12176d1 100644 --- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.h +++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.h @@ -110,7 +110,7 @@ struct macro_arg { regex_t arg_regex; char *replacement_text; }; -STAILQ_HEAD(macro_arg_list, macro_arg) args; +STAILQ_HEAD(macro_arg_list, macro_arg); struct macro_info { struct macro_arg_list args;