diff options
author | Sergey Kosukhin <skosukhin@gmail.com> | 2017-11-23 16:04:41 +0100 |
---|---|---|
committer | Christoph Junghans <christoph.junghans@gmail.com> | 2017-11-23 08:04:41 -0700 |
commit | 7f0659f03271872359c4db3c39d4c6ae05f0867a (patch) | |
tree | a9dbb980ae64b78bc9bdd36e9ce7c1e7143826e8 | |
parent | cd7d812be9c692285c42522abd0597b402760b61 (diff) | |
download | spack-7f0659f03271872359c4db3c39d4c6ae05f0867a.tar.gz spack-7f0659f03271872359c4db3c39d4c6ae05f0867a.tar.bz2 spack-7f0659f03271872359c4db3c39d4c6ae05f0867a.tar.xz spack-7f0659f03271872359c4db3c39d4c6ae05f0867a.zip |
New version and patch for 'sqlite'. (#6303)
-rw-r--r-- | var/spack/repos/builtin/packages/sqlite/package.py | 9 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/sqlite/remove_overflow_builtins.patch | 48 |
2 files changed, 57 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/sqlite/package.py b/var/spack/repos/builtin/packages/sqlite/package.py index de949df998..5c1b825650 100644 --- a/var/spack/repos/builtin/packages/sqlite/package.py +++ b/var/spack/repos/builtin/packages/sqlite/package.py @@ -33,6 +33,8 @@ class Sqlite(AutotoolsPackage): """ homepage = "www.sqlite.org" + version('3.21.0', '7913de4c3126ba3c24689cb7a199ea31', + url='https://www.sqlite.org/2017/sqlite-autoconf-3210000.tar.gz') version('3.20.0', 'e262a28b73cc330e7e83520c8ce14e4d', url='https://www.sqlite.org/2017/sqlite-autoconf-3200000.tar.gz') version('3.18.0', 'a6687a8ae1f66abc8df739aeadecfd0c', @@ -50,6 +52,13 @@ class Sqlite(AutotoolsPackage): # following patch undefines the macro in shell.c patch('sqlite_b0.patch', when='@3.18.0') + # Starting version 3.17.0, SQLite uses compiler built-ins + # __builtin_sub_overflow(), __builtin_add_overflow(), and + # __builtin_mul_overflow(), which are not supported by Intel compiler. + # Starting version 3.21.0 SQLite doesn't use the built-ins if Intel + # compiler is used. + patch('remove_overflow_builtins.patch', when='@3.17.0:3.20%intel') + def get_arch(self): arch = architecture.Arch() arch.platform = architecture.platform() diff --git a/var/spack/repos/builtin/packages/sqlite/remove_overflow_builtins.patch b/var/spack/repos/builtin/packages/sqlite/remove_overflow_builtins.patch new file mode 100644 index 0000000000..a0a5d2e3da --- /dev/null +++ b/var/spack/repos/builtin/packages/sqlite/remove_overflow_builtins.patch @@ -0,0 +1,48 @@ +diff --git a/sqlite3.c b/sqlite3.c +index 4ec1271..8615169 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -29466,9 +29466,6 @@ SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){ + ** overflow, leave *pA unchanged and return 1. + */ + SQLITE_PRIVATE int sqlite3AddInt64(i64 *pA, i64 iB){ +-#if GCC_VERSION>=5004000 +- return __builtin_add_overflow(*pA, iB, pA); +-#else + i64 iA = *pA; + testcase( iA==0 ); testcase( iA==1 ); + testcase( iB==-1 ); testcase( iB==0 ); +@@ -29483,12 +29480,8 @@ SQLITE_PRIVATE int sqlite3AddInt64(i64 *pA, i64 iB){ + } + *pA += iB; + return 0; +-#endif + } + SQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){ +-#if GCC_VERSION>=5004000 +- return __builtin_sub_overflow(*pA, iB, pA); +-#else + testcase( iB==SMALLEST_INT64+1 ); + if( iB==SMALLEST_INT64 ){ + testcase( (*pA)==(-1) ); testcase( (*pA)==0 ); +@@ -29498,12 +29491,8 @@ SQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){ + }else{ + return sqlite3AddInt64(pA, -iB); + } +-#endif + } + SQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){ +-#if GCC_VERSION>=5004000 +- return __builtin_mul_overflow(*pA, iB, pA); +-#else + i64 iA = *pA; + if( iB>0 ){ + if( iA>LARGEST_INT64/iB ) return 1; +@@ -29519,7 +29508,6 @@ SQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){ + } + *pA = iA*iB; + return 0; +-#endif + } + + /* |