From 2d697d7cb54da464fad351af9b9d029eb32f247d Mon Sep 17 00:00:00 2001 From: yangcheng1203 Date: Fri, 30 Jul 2021 14:47:03 +0800 Subject: [PATCH] Fix-link-failure-with-gcc-10 --- backport-Fix-link-failure-with-gcc-10.patch | 28 +++++++++++++++++++++ xorg-x11-drv-ati.spec | 7 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 backport-Fix-link-failure-with-gcc-10.patch diff --git a/backport-Fix-link-failure-with-gcc-10.patch b/backport-Fix-link-failure-with-gcc-10.patch new file mode 100644 index 0000000..7f58fc9 --- /dev/null +++ b/backport-Fix-link-failure-with-gcc-10.patch @@ -0,0 +1,28 @@ +From edcbe5f52ddfceee3d66d69bbcebbceac06b6d0d Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 4 Feb 2020 16:38:06 -0500 +Subject: [PATCH xf86-video-amdgpu] Fix link failure with gcc 10 + +Without the 'extern' this looks like a definition not just a +declaration, in every file that includes the header. gcc 10 is stricter +about this kind of multiple definition. +--- + src/drmmode_display.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/drmmode_display.h b/src/drmmode_display.h +index 96eaef0..8cd8a0a 100644 +--- a/src/drmmode_display.h ++++ b/src/drmmode_display.h +@@ -262,7 +262,7 @@ Bool drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type, + uint64_t *ust, uint32_t *result_seq); + + +-miPointerSpriteFuncRec drmmode_sprite_funcs; ++extern miPointerSpriteFuncRec drmmode_sprite_funcs; + + + #endif +-- +1.8.3.1 + diff --git a/xorg-x11-drv-ati.spec b/xorg-x11-drv-ati.spec index e11bb16..cf793f3 100644 --- a/xorg-x11-drv-ati.spec +++ b/xorg-x11-drv-ati.spec @@ -4,12 +4,14 @@ Name: xorg-x11-drv-ati Version: 19.1.0 -Release: 2 +Release: 3 Summary: Xorg X11 ati video driver License: MIT URL: https://www.x.org Source0: https://www.x.org/pub/individual/driver/xf86-video-ati-%{version}.tar.bz2 +Patch6000: backport-Fix-link-failure-with-gcc-10.patch + BuildRequires: pkgconfig(gbm) >= 10.6 libdrm-devel kernel-headers BuildRequires: automake autoconf libtool pkgconfig xorg-x11-util-macros BuildRequires: libudev-devel xorg-x11-glamor-devel xorg-x11-server-devel @@ -49,6 +51,9 @@ make check %{_mandir}/man4/*.4* %changelog +* Fri Jul 30 2021 yangcheng - 19.1.0-3 +- Fix compilation failure caused by gcc + * Fri Mar 13 2020 openEuler Buildteam - 19.1.0-2 - Type:enhancement - Id:NA