fix swiftshader symbols in libEGL/libGLESv2 with gcc

This commit is contained in:
Tom spot Callaway 2021-02-25 14:58:16 -05:00
parent 691a3b764a
commit 6a13047b90
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,26 @@
diff -up chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn.gcc-swiftshader-visibility chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn
--- chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn.gcc-swiftshader-visibility 2021-02-25 16:31:51.929335783 +0000
+++ chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn 2021-02-25 16:31:51.929335783 +0000
@@ -42,7 +42,8 @@ config("swiftshader_libEGL_private_confi
} else if (is_clang) {
defines += [ "EGLAPI=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ]
} else {
- defines += [ "EGLAPI= " ]
+ cflags += [ "-fvisibility=protected" ]
+ defines += [ "EGLAPI=__attribute__((visibility(\"protected\")))" ]
}
}
}
diff -up chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn.gcc-swiftshader-visibility chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn
--- chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn.gcc-swiftshader-visibility 2021-02-25 18:16:28.576901417 +0000
+++ chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn 2021-02-25 18:17:50.356567690 +0000
@@ -57,7 +57,8 @@ config("swiftshader_libGLESv2_private_co
} else if (is_clang) {
defines += [ "GL_APICALL=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ]
} else {
- defines += [ "GL_APICALL= " ]
+ cflags += [ "-fvisibility=protected" ]
+ defines += [ "GL_APICALL=__attribute__((visibility(\"protected\")))" ]
}
}
}

View File

@ -216,7 +216,7 @@ Name: chromium%{chromium_channel}%{nsuffix}
Name: chromium%{chromium_channel}
%endif
Version: %{majorversion}.0.4324.182
Release: 1%{?dist}
Release: 2%{?dist}
%if %{?freeworld}
%if %{?shared}
# chromium-libs-media-freeworld
@ -313,6 +313,8 @@ Patch74: chromium-88-StringPool-include.patch
# Fix sandbox code to properly handle the new way that glibc handles fstat in Fedora 34+
# Thanks to Kevin Kofler for the fix.
Patch75: chromium-88.0.4324.96-fstatfix.patch
# Fix symbol visibility with gcc on swiftshader's libEGL
Patch76: chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch
# Use lstdc++ on EPEL7 only
Patch101: chromium-75.0.3770.100-epel7-stdc++.patch
@ -938,6 +940,7 @@ udev.
%patch73 -p1 -b .ityp-include
%patch74 -p1 -b .StringPool-include
%patch75 -p1 -b .fstatfix
%patch76 -p1 -b .gcc-swiftshader-visibility
# Fedora branded user agent
%if 0%{?fedora}
@ -1984,6 +1987,9 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%changelog
* Thu Feb 25 2021 Tom Callaway <spot@fedoraproject.org> - 88.0.4234.182-2
- fix swiftshader symbols in libEGL/libGLESv2 with gcc
* Wed Feb 17 2021 Tom Callaway <spot@fedoraproject.org> - 88.0.4234.182-1
- update to 88.0.4234.182