From nobody Thu Apr 28 11:24:40 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C6371199E3BC; Thu, 28 Apr 2022 11:24:40 +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 4KptZ051Pyz3Pxb; Thu, 28 Apr 2022 11:24:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651145080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjXDgNYUG0OXW/FE97bd1e13e+ztAnWAv1/Wd9/o6Lg=; b=eh8WQXjA4t0lGG/ZG22RnJrf3BVm7xtbz38lGuSMKCOjUUJWYDQwwF/S+5e+fK8J52bEGd V1Ldf6hCn3eMNdida7BfZBTtl6dTNSRYxfPvTDV0nN8yMesNKOXZrP3AjFXh9Oj0OroQb5 WoBNIeS+PdJFRKKgC4j2DKERl7KecQ/d13ZtfoMeLlEJgaJlsHDrq7JrLH7TimDacol+bC 1DyOn6l8hque76Ptx4TukNoibRT/dttQJEjNBiChevu1QE36fKaufKyJhPr3R5RRbXIBB8 MF4VhCeyCYYMywHzhhEwDJt7QsAVBD4qcof1o6rzID9T7EzY2zDr8jDBKz3JZQ== 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 8D32617BA5; Thu, 28 Apr 2022 11:24:40 +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 23SBOeaM044792; Thu, 28 Apr 2022 11:24:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23SBOeI2044791; Thu, 28 Apr 2022 11:24:40 GMT (envelope-from git) Date: Thu, 28 Apr 2022 11:24:40 GMT Message-Id: <202204281124.23SBOeI2044791@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: adc6bf772068 - main - x11/nvidia-driver (legacy versions): unbreak the build on fresh -CURRENT List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: adc6bf772068a1adc8aec74074988ebab048d769 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651145080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjXDgNYUG0OXW/FE97bd1e13e+ztAnWAv1/Wd9/o6Lg=; b=cVmPXiyiAyhvw2KkCGFtdgegIrso2cX8gzlFQHetkTJLNtMjinFluiEGvLH5kDsY9sVbXD 5TMNwGnkv5Bskw1tNrkg/LkV5FtRiaFj1h/H2GxT9tkmE1A1X9ouqrQI2jKTnkmG4YBLZr EG2haYkmKwF+0KWY5nrIzja+q/MNAR+VEsxqHQz7Q3GzqJU+g0K6wfoFL+goA4BENug0GK N/86wJNzvTYleJtdsnCZt4p2DsnRcKiSefULYTM6bBhgUBHb2x1k8mdV6ih+kgMhH1RBVy Wn14+LkIWXaM85nD+1wIj8WyuNExi/HExzKIqDu7PLchtPgP0d6cgMOSJaovMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651145080; a=rsa-sha256; cv=none; b=MzcgB+/sEfmzyKjrMMOExLle4eE9YhUywUND8Po7DssvsSMIKRwBFRRi47Cwl7W/22DeOK +AI7VUocJUVEJRLEMu1ojANdxztePt1YGeNMP6D4hMClwA5+dKENVA882rh5YsaBysrnLf 45F+la5UIpoyJ4gt5/2/4uEm8V0+1zEY/cjBdzJJxYb2YWtnfKznw8b4D+WHmirEukqatS E447LkqwUc45fKLmoa1Eg0k5CZl8Pi0dQ/LSUdkVgdiJIOF9SUhVsTvPgO6yxD1Ux3I29f K+Ba5ZcYIqrhMhxweFP9cfjEOtYSA9SoE99IBCET05o1h2+rTeN7BXP+ivinxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=adc6bf772068a1adc8aec74074988ebab048d769 commit adc6bf772068a1adc8aec74074988ebab048d769 Author: Alexey Dokuchaev AuthorDate: 2022-04-28 11:23:46 +0000 Commit: Alexey Dokuchaev CommitDate: 2022-04-28 11:23:46 +0000 x11/nvidia-driver (legacy versions): unbreak the build on fresh -CURRENT Recently, FreeBSD had started to enforce -Werror,-Wunused-but-set-variable for kernel code, which affects 3rd-party modules such as nVidia drivers. Newer versions of the driver are ready for that, but legacy one were not. Reported by: pkg-fallout PR: 263418 --- x11/nvidia-driver/Makefile | 5 +++++ .../files/extra-patch-src-nvidia_ctl.c.in | 23 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile index 790cb87bed84..4962687b0e93 100644 --- a/x11/nvidia-driver/Makefile +++ b/x11/nvidia-driver/Makefile @@ -226,6 +226,11 @@ post-patch: .SILENT gsed ${REINPLACE_ARGS} -E "s,/etc/egl/egl_external_platform\.d.{$$padding},${EGL_JSON_PATH}\x00," \ ${WRKSRC}/obj/libEGL_nvidia.so.0 .endif +# Unbreak the build against -Werror,-Wunused-but-set-variable CFLAGS +.if ${NVVERSION} < 450.51 + ${REINPLACE_CMD} -e '/void nvidia_dev_dtor/,+8s,.*status.*,,' \ + ${WRKSRC}/src/${NVSRC}/nvidia_dev.c +.endif # Finally, process OPTIONS .if ${PORT_OPTIONS:MFREEBSD_AGP} ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \ diff --git a/x11/nvidia-driver/files/extra-patch-src-nvidia_ctl.c.in b/x11/nvidia-driver/files/extra-patch-src-nvidia_ctl.c.in index a187792bd1cd..83d57711b948 100644 --- a/x11/nvidia-driver/files/extra-patch-src-nvidia_ctl.c.in +++ b/x11/nvidia-driver/files/extra-patch-src-nvidia_ctl.c.in @@ -13,6 +13,21 @@ static d_open_t nvidia_ctl_open; static void nvidia_ctl_dtor(void *arg); static d_ioctl_t nvidia_ctl_ioctl; +@@ -65,13 +71,12 @@ static int nvidia_ctl_open( + + void nvidia_ctl_dtor(void *arg) + { +- int status; + struct nvidia_filep *filep = arg; + struct nvidia_event *et; + nv_state_t *nv = filep->nv; + + nv_lock_api(nv); +- status = nvidia_close_ctl(nv, filep); ++ nvidia_close_ctl(nv, filep); + nv_unlock_api(nv); + + while ((et = STAILQ_FIRST(&filep->event_queue))) { @@ -138,6 +144,18 @@ static int nvidia_ctl_poll( int nvidia_ctl_attach(void) @@ -43,10 +58,13 @@ } nvidia_count++; -@@ -153,13 +175,28 @@ int nvidia_ctl_attach(void) +@@ -153,13 +175,25 @@ int nvidia_ctl_attach(void) int nvidia_ctl_detach(void) { +- struct nvidia_softc *sc; +- +- sc = &nvidia_ctl_sc; +#ifdef NV_SUPPORT_LINUX_COMPAT + struct linux_device_handler nvidia_ctl_linux_handler = { + .bsd_driver_name = __DECONST(char *, nvidia_driver_name), @@ -58,9 +76,6 @@ + .linux_char_device = 1 + }; +#endif - struct nvidia_softc *sc; - - sc = &nvidia_ctl_sc; nvidia_count--; - if (nvidia_count == 0)