summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Rosen2016-08-11 12:39:50 -0400
committerIdo Rosen2016-08-11 12:39:50 -0400
commitbf10af799bdc46fa0cdc885b48068646b9c411ba (patch)
tree99f70cbdcf663c703979c50656e4f21213dd7000
parent7317d20565bc3cdebe034eb275452c0ffa4d000d (diff)
downloadaur-bf10af799bdc46fa0cdc885b48068646b9c411ba.tar.gz
Add workaround to GCC bug #72785.
There is a bug in GCC 6.1.1 (currently in Arch) related to link errors with ____ilog2_NaN. Explained further at this URL: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 Solarflare has provided a workaround, added as a patch.
-rw-r--r--PKGBUILD7
-rw-r--r--openonload-201606-bug63982-ilog2.patch31
2 files changed, 36 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b413dbe99d1..3b1b29d1bb1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,7 +19,7 @@
pkgname='openonload'
pkgdesc="A high performance network stack from Solarflare."
pkgver='201606'
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://www.openonload.org/'
license=('custom')
@@ -31,12 +31,14 @@ source=("http://www.openonload.org/download/openonload-${pkgver//\./-}.tgz"
'openonload.service'
'openonload-201310-cpp11-space-literal-fix.patch'
'openonload-201606-archlinux.patch'
+ 'openonload-201606-bug63982-ilog2.patch'
)
sha512sums=('23207e9c701ccf85cdc70229390dfdf5b351d362509a1fd8d8666231f1061fe4054a95dc1d4968ce8c43be490abaf405f252f07a07eec72771b015cf9ff01b16'
'ac464250f2fb96d13e8ae129bac80c03f8cca62e450fdd765f24ccd064e28e9942e4a16ebc693e75c71fc1eb86c3a1b08337b2e39c6c618e129d8ec87d872bdb'
'b7e4529e37c64f99c660ca9b58f388cdd8f0d2f250ba875eb210f4909bb1f1c985a065aae64c048ca6f824adc6e3176c6eae1f582c049631326db73e939edd7b'
'a1d23b60b699c04caee93eb18d855dbe2e65d2115f10eb3771d1a2f04eea8d3b8042550152a5f96140aca759db10c3fbebdde85dbebcf46505c15f2ba7934bdb'
- 'c368ce3ed7987d1b374f1e671eb21bc80af4b927e4db4a229712f334ee4843f5921fb64c7ac83df214a9cc37134f8a3360273e9ba9496ff56c329476d26d050a')
+ 'c368ce3ed7987d1b374f1e671eb21bc80af4b927e4db4a229712f334ee4843f5921fb64c7ac83df214a9cc37134f8a3360273e9ba9496ff56c329476d26d050a'
+ '8f8e331de9d5d98ae9d6a3592bea5ad26af06eef5c798890b63c1f02bf326fd73aac3e4cdba34069d9b21504236d05c709f76e2f6c092fed4d78fd68353a395e')
install="openonload.install"
@@ -51,6 +53,7 @@ prepare() {
patch -p1 < "${srcdir}/openonload-201310-cpp11-space-literal-fix.patch"
patch -p1 < "${srcdir}/openonload-201606-archlinux.patch"
+ patch -p1 < "${srcdir}/openonload-201606-bug63982-ilog2.patch"
}
build() {
diff --git a/openonload-201606-bug63982-ilog2.patch b/openonload-201606-bug63982-ilog2.patch
new file mode 100644
index 00000000000..dc6414d51ee
--- /dev/null
+++ b/openonload-201606-bug63982-ilog2.patch
@@ -0,0 +1,31 @@
+diff --git a/src/lib/efrm/vi_resource_alloc.c b/src/lib/efrm/vi_resource_alloc.c
+--- a/src/lib/efrm/vi_resource_alloc.c
++++ b/src/lib/efrm/vi_resource_alloc.c
+@@ -1432,6 +1432,15 @@
+
+ qso->q_len_entries = n_q_entries;
+ qso->q_len_bytes = efrm_vi_q_bytes(virs, q_type, n_q_entries);
++
++ /* This value should always be positive, but if we don't check for this
++ * explicitly, some compilers will assume that undefined logarithms
++ * can be taken in get_order() and will generate code that won't link.
++ * See bug63982. */
++ EFRM_ASSERT(qso->q_len_bytes > 0);
++ if (qso->q_len_bytes <= 0)
++ return -EINVAL;
++
+ qso->q_len_page_order = get_order(qso->q_len_bytes);
+ return 0;
+ }
+--- a/src/include/onload/version.h
++++ b/src/include/onload/version.h
+@@ -29,7 +29,7 @@
+
+
+ #ifndef ONLOAD_VERSION
+-# define ONLOAD_VERSION "201606"
++# define ONLOAD_VERSION "201606-patch63982"
+ #endif
+
+ #define ONLOAD_PRODUCT "OpenOnload"
+