[redirecting to ports@, where this belongs]

On 2013-05-06 08:19, sig6247 wrote:
...
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"173.14.35\" 
-D__KERNEL__ -DNVRM -UDEBUG -U_DEBUG -DNDEBUG -O -Werror -D_KERNEL -DKLD_MODULE -nostdinc 
 -I/wrkdirs/usr/ports/x11/nvidia-driver-173/work/NVIDIA-FreeBSD-x86-173.14.35/src -I. -I@ 
-I@/contrib/altq -fno-common   -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float 
-ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector 
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  
-Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare 
-Wno-error-empty-body  -Wno-error-parentheses-equality -c nvidia_os.c
nvidia_os.c:28:23: error: function declared with regparm(0) attribute was 
previously declared without the regparm attribute
RM_STATUS NV_API_CALL os_alloc_contig_pages(
                       ^
/wrkdirs/usr/ports/x11/nvidia-driver-173/work/NVIDIA-FreeBSD-x86-173.14.35/src/nv-freebsd.h:145:11:
 note: previous declaration is here
RM_STATUS os_alloc_contig_pages(void **, U032);
           ^

Please try the attached patch.  I am not sure if there are more driver
versions that include these inconsisent prototypes, but if anybody is
aware of them, we can adjust the ${NVVERSION} check a little.

-Dimitry
Index: x11/nvidia-driver/Makefile
===================================================================
--- x11/nvidia-driver/Makefile	(revision 317139)
+++ x11/nvidia-driver/Makefile	(working copy)
@@ -70,6 +70,10 @@
 EXTRA_PATCHES+=	${FILESDIR}/security-patch-CVE-2012-4225
 .endif
 
+.if ${NVVERSION} == 1731435
+EXTRA_PATCHES+=	${FILESDIR}/build-patch-nv_api_call
+.endif
+
 OPTIONS_DEFINE=	FREEBSD_AGP ACPI_PM LINUX DOCS
 OPTIONS_DEFAULT=	LINUX
 
Index: x11/nvidia-driver/files/build-patch-nv_api_call
===================================================================
--- x11/nvidia-driver/files/build-patch-nv_api_call	(revision 0)
+++ x11/nvidia-driver/files/build-patch-nv_api_call	(working copy)
@@ -0,0 +1,13 @@
+--- src/nv-freebsd.h.orig	2013-05-06 13:13:49.000000000 +0200
++++ src/nv-freebsd.h	2013-05-06 13:16:38.000000000 +0200
+@@ -142,8 +142,8 @@
+ 
+ MALLOC_DECLARE(M_NVIDIA);
+ 
+-RM_STATUS os_alloc_contig_pages(void **, U032);
+-void os_free_contig_pages(void *, U032);
++RM_STATUS NV_API_CALL os_alloc_contig_pages(void **, U032);
++void NV_API_CALL os_free_contig_pages(void *, U032);
+ 
+ /*
+  * Enable/Disable support for FreeBSD's AGP GART driver. Please note that
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to