commit 77189ae580bdeb87aa62ecf9ab947ecdbce47235
Author: Jan Rękorajski <[email protected]>
Date:   Sun Apr 19 13:42:18 2015 +0200

    - fix building with linux 4.0
    - rel 5

 linux-4.0.patch              | 71 ++++++++++++++++++++++++++++++++++++++++++++
 xorg-driver-video-fglrx.spec |  4 ++-
 2 files changed, 74 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-fglrx.spec b/xorg-driver-video-fglrx.spec
index 4f6913c..8ad2f86 100644
--- a/xorg-driver-video-fglrx.spec
+++ b/xorg-driver-video-fglrx.spec
@@ -31,7 +31,7 @@ exit 1
 %define                betaver         1.0
 #define                rel             0.beta%{betaver}.3
 
-%define                rel             4
+%define                rel             5
 %define                pname           xorg-driver-video-fglrx
 Summary:       Linux Drivers for AMD/ATI graphics accelerators
 Summary(pl.UTF-8):     Sterowniki do akceleratorów graficznych AMD/ATI
@@ -61,6 +61,7 @@ Patch5:               %{pname}-GPL-only.patch
 Patch6:                %{pname}-intel_iommu.patch
 Patch7:                linux-3.17.patch
 Patch8:                linux-3.19.patch
+Patch9:                linux-4.0.patch
 URL:           http://ati.amd.com/support/drivers/linux/linux-radeon.html
 %{?with_kernel:%{expand:%buildrequires_kernel 
kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
 BuildRequires: rpmbuild(macros) >= 1.701
@@ -232,6 +233,7 @@ EOF
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p2
 
 install -d common{%{_prefix}/{%{_lib},bin,sbin},/etc}
 cp -a %{x11ver}%{arch_sufix}/usr/X11R6/%{_lib}/* common%{_libdir}
diff --git a/linux-4.0.patch b/linux-4.0.patch
new file mode 100644
index 0000000..f645595
--- /dev/null
+++ b/linux-4.0.patch
@@ -0,0 +1,71 @@
+diff -ur 
xorg-driver-video-fglrx-14.12.orig/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c
 
xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- 
xorg-driver-video-fglrx-14.12.orig/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c
    2015-04-19 13:36:55.029786519 +0200
++++ 
xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/firegl_public.c
 2015-04-19 13:40:08.266446369 +0200
+@@ -4468,8 +4468,13 @@
+ 
+     if (cpu_has_pge)
+     {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++        cr4 = __read_cr4();
++        __write_cr4(cr4 & ~X86_CR4_PGE);
++#else
+         cr4 = read_cr4();
+         write_cr4(cr4 & ~X86_CR4_PGE);
++#endif
+     }
+      __flush_tlb();
+ 
+@@ -4482,7 +4487,11 @@
+     write_cr0(cr0 & 0xbfffffff);
+     if (cpu_has_pge)
+     {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++        __write_cr4(cr4);
++#else
+         write_cr4(cr4);
++#endif
+     }
+     local_irq_restore(flags);
+ 
+@@ -4509,8 +4518,13 @@
+ 
+     if (cpu_has_pge)
+     {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++        cr4 = __read_cr4();
++        __write_cr4(cr4 & ~X86_CR4_PGE);
++#else
+         cr4 = read_cr4();
+         write_cr4(cr4 & ~X86_CR4_PGE);
++#endif
+     }
+      __flush_tlb();
+   
+@@ -4522,7 +4536,11 @@
+     write_cr0(cr0 & 0xbfffffff);
+     if (cpu_has_pge)
+     {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++        __write_cr4(cr4);
++#else
+         write_cr4(cr4);
++#endif
+     }
+     local_irq_restore(flags);
+ 
+Only in 
xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod:
 firegl_public.c~
+diff -ur 
xorg-driver-video-fglrx-14.12.orig/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/kcl_str.c
 
xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/kcl_str.c
+--- 
xorg-driver-video-fglrx-14.12.orig/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/kcl_str.c
  2014-11-28 21:02:10.000000000 +0100
++++ 
xorg-driver-video-fglrx-14.12/fglrx-14.501.1003/common/lib/modules/fglrx/build_mod/kcl_str.c
       2015-04-19 13:40:41.303111870 +0200
+@@ -169,7 +169,11 @@
+                                   const char* s2,
+                                   KCL_TYPE_SizeSigned count)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++    return strncasecmp(s1, s2, count);
++#else
+     return strnicmp(s1, s2, count);
++#endif
+ }
+ 
+ /** \brief Locate character in string
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-fglrx.git/commitdiff/77189ae580bdeb87aa62ecf9ab947ecdbce47235

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to