From owner-dev-commits-ports-all@freebsd.org Sat Oct 2 11:19:11 2021 Return-Path: Delivered-To: dev-commits-ports-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 93A45679BD0; Sat, 2 Oct 2021 11:19:11 +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 4HM4Hg3hTtz3jrk; Sat, 2 Oct 2021 11:19:11 +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 5087F1258E; Sat, 2 Oct 2021 11:19:11 +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 192BJBTS070724; Sat, 2 Oct 2021 11:19:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 192BJBah070723; Sat, 2 Oct 2021 11:19:11 GMT (envelope-from git) Date: Sat, 2 Oct 2021 11:19:11 GMT Message-Id: <202110021119.192BJBah070723@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: 7075120b4d50 - main - irc/bitchx: fix non-static inline functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7075120b4d50ebba264775ce8a5bcbcafd1d99a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2021 11:19:11 -0000 The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=7075120b4d50ebba264775ce8a5bcbcafd1d99a2 commit 7075120b4d50ebba264775ce8a5bcbcafd1d99a2 Author: Dimitry Andric AuthorDate: 2021-09-12 20:13:36 +0000 Commit: Dimitry Andric CommitDate: 2021-10-02 11:08:57 +0000 irc/bitchx: fix non-static inline functions During an exp-run for llvm 13 (see bug 258209), it turned out that both chinese/bitchx and irc/bitchx fail to build with clang 13 [1]: ... cc -fstack-protector-strong -L/usr/lib -o BitchX alias.o alist.o array.o art.o banlist.o bot_link.o cdcc.o cdns.o chelp.o commands.o commands2.o compat.o cset.o ctcp.o dcc.o debug.o encrypt.o exec.o files.o flood.o fset.o functions.o funny.o glob.o hash.o hebrew.o help.o history.o hook.o if.o ignore.o input.o irc.o ircaux.o ircsig.o keys.o lastlog.o list.o log.o mail.o misc.o modules.o names.o network.o newio.o notice.o notify.o numbers.o output.o parse.o queue.o readlog.o reg.o screen.o server.o stack.o status.o struct.o tcl_public.o term.o timer.o translat.o user.o userlist.o vars.o who.o whowas.o window.o words.o -ldl -ltinfo -lssl -lcrypto -lm -lcrypt ld: error: undefined symbol: operator >>> referenced by alias.c >>> alias.o:(zzlex) cc: error: linker command failed with exit code 1 (use -v to see invocation) This is because several functions in source/expr2.c are marked __inline, without either static or extern keyword. The compiler then has to assume the function is also externally available. Fix this by marking the affected functions static. PR: 258464 Approved by: fernape (maintainer) MFH: 2021Q4 --- irc/bitchx/files/patch-source_expr2.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/irc/bitchx/files/patch-source_expr2.c b/irc/bitchx/files/patch-source_expr2.c new file mode 100644 index 000000000000..08df39bb0083 --- /dev/null +++ b/irc/bitchx/files/patch-source_expr2.c @@ -0,0 +1,29 @@ +--- source/expr2.c.orig 2008-02-25 09:49:14 UTC ++++ source/expr2.c +@@ -1192,7 +1192,7 @@ int lexerr (expr_info *c, char *format, ...) + * case 'operand' is set to 1. When an operand is lexed, then the next token + * is expected to be a binary operator, so 'operand' is set to 0. + */ +-__inline int check_implied_arg (expr_info *c) ++__inline static int check_implied_arg (expr_info *c) + { + if (c->operand == 2) + { +@@ -1205,7 +1205,7 @@ __inline int check_implied_arg (expr_info *c) + return c->operand; + } + +-__inline TOKEN operator (expr_info *c, char *x, int y, TOKEN z) ++__inline static TOKEN operator (expr_info *c, char *x, int y, TOKEN z) + { + check_implied_arg(c); + if (c->operand) +@@ -1216,7 +1216,7 @@ __inline TOKEN operator (expr_info *c, char *x, int y + return z; + } + +-__inline TOKEN unary (expr_info *c, char *x, int y, TOKEN z) ++__inline static TOKEN unary (expr_info *c, char *x, int y, TOKEN z) + { + if (!c->operand) + return lexerr(c, "An operator (%s) was found where "