gcc: fix several issues (#16599)
- GCC has moved to Git - The develop/master version requires flex - Add myself as a maintainer - Set the library path in the zstd patch
This commit is contained in:
parent
a44f487a1d
commit
15112f9dba
@ -19,11 +19,13 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
|
|||||||
|
|
||||||
homepage = 'https://gcc.gnu.org'
|
homepage = 'https://gcc.gnu.org'
|
||||||
gnu_mirror_path = 'gcc/gcc-9.2.0/gcc-9.2.0.tar.xz'
|
gnu_mirror_path = 'gcc/gcc-9.2.0/gcc-9.2.0.tar.xz'
|
||||||
svn = 'svn://gcc.gnu.org/svn/gcc/'
|
git = 'git://gcc.gnu.org/git/gcc.git'
|
||||||
list_url = 'http://ftp.gnu.org/gnu/gcc/'
|
list_url = 'http://ftp.gnu.org/gnu/gcc/'
|
||||||
list_depth = 1
|
list_depth = 1
|
||||||
|
|
||||||
version('develop', svn=svn + 'trunk')
|
maintainers = ['michaelkuhn']
|
||||||
|
|
||||||
|
version('master', branch='master')
|
||||||
|
|
||||||
version('10.1.0', sha256='b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2')
|
version('10.1.0', sha256='b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2')
|
||||||
|
|
||||||
@ -90,6 +92,8 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
|
|||||||
default=False,
|
default=False,
|
||||||
description='Target nvptx offloading to NVIDIA GPUs')
|
description='Target nvptx offloading to NVIDIA GPUs')
|
||||||
|
|
||||||
|
depends_on('flex', type='build', when='@master')
|
||||||
|
|
||||||
# https://gcc.gnu.org/install/prerequisites.html
|
# https://gcc.gnu.org/install/prerequisites.html
|
||||||
depends_on('gmp@4.3.2:')
|
depends_on('gmp@4.3.2:')
|
||||||
# GCC 7.3 does not compile with newer releases on some platforms, see
|
# GCC 7.3 does not compile with newer releases on some platforms, see
|
||||||
@ -117,14 +121,12 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
|
|||||||
# The server is sometimes a bit slow to respond
|
# The server is sometimes a bit slow to respond
|
||||||
timeout = {'timeout': 60}
|
timeout = {'timeout': 60}
|
||||||
|
|
||||||
resource(
|
resource(name='newlib',
|
||||||
name='newlib',
|
|
||||||
url='ftp://sourceware.org/pub/newlib/newlib-3.0.0.20180831.tar.gz',
|
url='ftp://sourceware.org/pub/newlib/newlib-3.0.0.20180831.tar.gz',
|
||||||
sha256='3ad3664f227357df15ff34e954bfd9f501009a647667cd307bf0658aefd6eb5b',
|
sha256='3ad3664f227357df15ff34e954bfd9f501009a647667cd307bf0658aefd6eb5b',
|
||||||
destination='newlibsource',
|
destination='newlibsource',
|
||||||
when='+nvptx',
|
when='+nvptx',
|
||||||
fetch_options=timeout
|
fetch_options=timeout)
|
||||||
)
|
|
||||||
|
|
||||||
# nvptx-tools does not seem to work as a dependency,
|
# nvptx-tools does not seem to work as a dependency,
|
||||||
# but does fine when the source is inside the gcc build directory
|
# but does fine when the source is inside the gcc build directory
|
||||||
@ -267,7 +269,7 @@ def url_for_version(self, version):
|
|||||||
# mirrors are tried. It takes care of modifying the suffix of gnu
|
# mirrors are tried. It takes care of modifying the suffix of gnu
|
||||||
# mirror path so that Spack will also look for the correct file in
|
# mirror path so that Spack will also look for the correct file in
|
||||||
# the mirrors
|
# the mirrors
|
||||||
if (version < Version('6.4.0')and version != Version('5.5.0')) \
|
if (version < Version('6.4.0') and version != Version('5.5.0')) \
|
||||||
or version == Version('7.1.0'):
|
or version == Version('7.1.0'):
|
||||||
self.gnu_mirror_path = self.gnu_mirror_path.replace('xz', 'bz2')
|
self.gnu_mirror_path = self.gnu_mirror_path.replace('xz', 'bz2')
|
||||||
return super(Gcc, self).url_for_version(version)
|
return super(Gcc, self).url_for_version(version)
|
||||||
|
@ -1,23 +1,43 @@
|
|||||||
--- a/gcc/Makefile.in 2020-05-08 11:50:17.962838228 +0200
|
--- a/gcc/Makefile.in
|
||||||
+++ b/gcc/Makefile.in 2020-05-08 11:50:58.220960817 +0200
|
+++ b/gcc/Makefile.in
|
||||||
@@ -1075,6 +1075,11 @@
|
@@ -1075,7 +1075,8 @@ GNATMAKE = @GNATMAKE@
|
||||||
# Libs needed (at present) just for jcf-dump.
|
# Libs needed (at present) just for jcf-dump.
|
||||||
LDEXP_LIB = @LDEXP_LIB@
|
LDEXP_LIB = @LDEXP_LIB@
|
||||||
|
|
||||||
+ifneq (@ZSTD_INCLUDE@,)
|
-ZSTD_LIB = @ZSTD_LIB@
|
||||||
+ZSTD_INCLUDE = -I@ZSTD_INCLUDE@
|
+ZSTD_INC = @ZSTD_CPPFLAGS@
|
||||||
+else
|
+ZSTD_LIB = @ZSTD_LDFLAGS@ @ZSTD_LIB@
|
||||||
+ZSTD_INCLUDE =
|
|
||||||
+endif
|
|
||||||
ZSTD_LIB = @ZSTD_LIB@
|
|
||||||
|
|
||||||
# Likewise, for use in the tools that must run on this machine
|
# Likewise, for use in the tools that must run on this machine
|
||||||
@@ -2275,7 +2280,7 @@
|
# even if we are cross-building GCC.
|
||||||
|
@@ -2275,7 +2276,7 @@ CFLAGS-version.o += -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
|
||||||
version.o: $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
|
version.o: $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
|
||||||
|
|
||||||
# lto-compress.o needs $(ZLIBINC) added to the include flags.
|
# lto-compress.o needs $(ZLIBINC) added to the include flags.
|
||||||
-CFLAGS-lto-compress.o += $(ZLIBINC)
|
-CFLAGS-lto-compress.o += $(ZLIBINC)
|
||||||
+CFLAGS-lto-compress.o += $(ZLIBINC) $(ZSTD_INCLUDE)
|
+CFLAGS-lto-compress.o += $(ZLIBINC) $(ZSTD_INC)
|
||||||
|
|
||||||
CFLAGS-lto-streamer-in.o += -DTARGET_MACHINE=\"$(target_noncanonical)\"
|
CFLAGS-lto-streamer-in.o += -DTARGET_MACHINE=\"$(target_noncanonical)\"
|
||||||
|
|
||||||
|
--- a/gcc/configure
|
||||||
|
+++ b/gcc/configure
|
||||||
|
@@ -786,6 +786,8 @@ LTLIBICONV
|
||||||
|
LIBICONV
|
||||||
|
ZSTD_LIB
|
||||||
|
ZSTD_INCLUDE
|
||||||
|
+ZSTD_LDFLAGS
|
||||||
|
+ZSTD_CPPFLAGS
|
||||||
|
DL_LIB
|
||||||
|
LDEXP_LIB
|
||||||
|
EXTRA_GCC_LIBS
|
||||||
|
--- a/gcc/configure.ac
|
||||||
|
+++ b/gcc/configure.ac
|
||||||
|
@@ -1339,6 +1339,8 @@ AC_SUBST(ZSTD_INCLUDE)
|
||||||
|
AC_SUBST(ZSTD_LIB)
|
||||||
|
ZSTD_CPPFLAGS=
|
||||||
|
ZSTD_LDFLAGS=
|
||||||
|
+AC_SUBST(ZSTD_CPPFLAGS)
|
||||||
|
+AC_SUBST(ZSTD_LDFLAGS)
|
||||||
|
AC_ARG_WITH(zstd,
|
||||||
|
[AS_HELP_STRING([--with-zstd=PATH],
|
||||||
|
[specify prefix directory for installed zstd library.
|
||||||
|
Loading…
Reference in New Issue
Block a user