diff options
-rw-r--r-- | var/spack/repos/builtin/packages/freeglut/common-gcc10.patch | 11 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/freeglut/package.py | 9 |
2 files changed, 8 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/freeglut/common-gcc10.patch b/var/spack/repos/builtin/packages/freeglut/common-gcc10.patch deleted file mode 100644 index bae4632601..0000000000 --- a/var/spack/repos/builtin/packages/freeglut/common-gcc10.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt 2019-09-25 15:43:34.000000000 -0500 -+++ b/CMakeLists.txt 2020-01-31 09:26:24.104743210 -0600 -@@ -302,7 +302,7 @@ - ENDIF() - - IF(CMAKE_COMPILER_IS_GNUCC) -- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") -+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fcommon") - IF(NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND)) - # not setting -ansi as EGL/KHR headers doesn't support it - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic") diff --git a/var/spack/repos/builtin/packages/freeglut/package.py b/var/spack/repos/builtin/packages/freeglut/package.py index aa6d8509d6..4685f7f746 100644 --- a/var/spack/repos/builtin/packages/freeglut/package.py +++ b/var/spack/repos/builtin/packages/freeglut/package.py @@ -26,7 +26,14 @@ class Freeglut(CMakePackage, SourceforgePackage): depends_on('xrandr') depends_on('inputproto') - patch('common-gcc10.patch', when="@3.2.1: %gcc@10.0:") + # freeglut fails to build with -fno-common (default with newer compilers) + # see https://bugs.gentoo.org/705840 and https://github.com/dcnieho/FreeGLUT/pull/76 + patch('https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/freeglut/files/freeglut-3.2.1-gcc10-fno-common.patch?id=f9102571b69d9fc05471a592fda252681fdfdef1', + sha256='898e8fb314cbe728d791e9ea69829313143cda039c008f0ca06c1b5730922aa7', + when="@3.2.1: %gcc@10.0:") + patch('https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/freeglut/files/freeglut-3.2.1-gcc10-fno-common.patch?id=f9102571b69d9fc05471a592fda252681fdfdef1', + sha256='898e8fb314cbe728d791e9ea69829313143cda039c008f0ca06c1b5730922aa7', + when="@3.2.1: %clang@11.0:") def cmake_args(self): return [ |