* [Buildroot] [PATCH next] squid: fix build failure on nios2
@ 2018-08-31 14:17 Giulio Benetti
2018-08-31 14:23 ` Giulio Benetti
0 siblings, 1 reply; 3+ messages in thread
From: Giulio Benetti @ 2018-08-31 14:17 UTC (permalink / raw)
To: buildroot
libstdc++ can have ATOMIC_INT_LOCK_FREE < 2, this way exception_ptr.h
containing current_exception() function won't be included causing build
failure.
Add a patch to replace current_exception() with uncaught_exception()
function. current_exception() is only used to check if there is a pending
exception, uncaught_exception() does the same and does not rely on
ATOMIC_INT_LOCK_FREE >= 2.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
...place-current_exception-with-uncaugh.patch | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
diff --git a/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch b/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
new file mode 100644
index 0000000000..acd18a6f4f
--- /dev/null
+++ b/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
@@ -0,0 +1,32 @@
+From 14666035700bbabe699bdae4164d292cb04ca556 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@micronovasrl.com>
+Date: Fri, 31 Aug 2018 15:54:21 +0200
+Subject: [PATCH] TextException: replace current_exception() with
+ uncaught_exception()
+
+If libstdc++ has ATOMIC_INT_LOCK_FREE < 2 current_exception() is not supported.
+
+Since current_exception() is needed only to check if there are pending
+exceptions, let's use uncaught_exception() instead.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
+---
+ src/base/TextException.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/base/TextException.cc b/src/base/TextException.cc
+index f197e237a..773778b71 100644
+--- a/src/base/TextException.cc
++++ b/src/base/TextException.cc
+@@ -61,7 +61,7 @@ TextException::what() const throw()
+ std::ostream &
+ CurrentException(std::ostream &os)
+ {
+- if (std::current_exception()) {
++ if (std::uncaught_exception()) {
+ try {
+ throw; // re-throw to recognize the exception type
+ }
+--
+2.17.1
+
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH next] squid: fix build failure on nios2
2018-08-31 14:17 [Buildroot] [PATCH next] squid: fix build failure on nios2 Giulio Benetti
@ 2018-08-31 14:23 ` Giulio Benetti
2018-08-31 16:36 ` Giulio Benetti
0 siblings, 1 reply; 3+ messages in thread
From: Giulio Benetti @ 2018-08-31 14:23 UTC (permalink / raw)
To: buildroot
Hello,
Il 31/08/2018 16:17, Giulio Benetti ha scritto:
> libstdc++ can have ATOMIC_INT_LOCK_FREE < 2, this way exception_ptr.h
> containing current_exception() function won't be included causing build
> failure.
>
> Add a patch to replace current_exception() with uncaught_exception()
> function. current_exception() is only used to check if there is a pending
> exception, uncaught_exception() does the same and does not rely on
> ATOMIC_INT_LOCK_FREE >= 2.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
> ...place-current_exception-with-uncaugh.patch | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
>
> diff --git a/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch b/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
> new file mode 100644
> index 0000000000..acd18a6f4f
> --- /dev/null
> +++ b/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
> @@ -0,0 +1,32 @@
> +From 14666035700bbabe699bdae4164d292cb04ca556 Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@micronovasrl.com>
> +Date: Fri, 31 Aug 2018 15:54:21 +0200
> +Subject: [PATCH] TextException: replace current_exception() with
> + uncaught_exception()
> +
> +If libstdc++ has ATOMIC_INT_LOCK_FREE < 2 current_exception() is not supported.
> +
> +Since current_exception() is needed only to check if there are pending
> +exceptions, let's use uncaught_exception() instead.
> +
Sorry I've forgot to add:
"
Fixes:
http://autobuild.buildroot.net/results/273/273556771e957f109a1fbf446a5193aac49b72af/
http://autobuild.buildroot.net/results/9d2/9d2cde8494f69fedf0afc460d8e540d769a79212/
http://autobuild.buildroot.net/results/a71/a71db790ae3a3ea1836760edad504a92ea005cf7/
"
And failure happens with arm / arm926ej-s too, not only nios2.
I wait for any comments before resending patch as v2.
Thank you all
Giulio Benetti
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH next] squid: fix build failure on nios2
2018-08-31 14:23 ` Giulio Benetti
@ 2018-08-31 16:36 ` Giulio Benetti
0 siblings, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2018-08-31 16:36 UTC (permalink / raw)
To: buildroot
Hello,
Il 31/08/2018 16:23, Giulio Benetti ha scritto:
> Hello,
>
> Il 31/08/2018 16:17, Giulio Benetti ha scritto:
>> libstdc++ can have ATOMIC_INT_LOCK_FREE < 2, this way exception_ptr.h
>> containing current_exception() function won't be included causing build
>> failure.
>>
>> Add a patch to replace current_exception() with uncaught_exception()
>> function. current_exception() is only used to check if there is a pending
>> exception, uncaught_exception() does the same and does not rely on
>> ATOMIC_INT_LOCK_FREE >= 2.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>> ---
>> ? ...place-current_exception-with-uncaugh.patch | 32 +++++++++++++++++++
>> ? 1 file changed, 32 insertions(+)
>> ? create mode 100644
>> package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
>>
>>
>> diff --git
>> a/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
>> b/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
>>
>> new file mode 100644
>> index 0000000000..acd18a6f4f
>> --- /dev/null
>> +++
>> b/package/squid/0003-TextException-replace-current_exception-with-uncaugh.patch
>>
>> @@ -0,0 +1,32 @@
>> +From 14666035700bbabe699bdae4164d292cb04ca556 Mon Sep 17 00:00:00 2001
>> +From: Giulio Benetti <giulio.benetti@micronovasrl.com>
>> +Date: Fri, 31 Aug 2018 15:54:21 +0200
>> +Subject: [PATCH] TextException: replace current_exception() with
>> + uncaught_exception()
>> +
>> +If libstdc++ has ATOMIC_INT_LOCK_FREE < 2 current_exception() is not
>> supported.
>> +
>> +Since current_exception() is needed only to check if there are pending
>> +exceptions, let's use uncaught_exception() instead.
>> +
>
> Sorry I've forgot to add:
> "
> Fixes:
> http://autobuild.buildroot.net/results/273/273556771e957f109a1fbf446a5193aac49b72af/
>
> http://autobuild.buildroot.net/results/9d2/9d2cde8494f69fedf0afc460d8e540d769a79212/
>
> http://autobuild.buildroot.net/results/a71/a71db790ae3a3ea1836760edad504a92ea005cf7/
>
> "
>
> And failure happens with arm / arm926ej-s too, not only nios2.
>
> I wait for any comments before resending patch as v2.
>
> Thank you all
> Giulio Benetti
Sorry for the mess,
I've opened a PR too late @squid here:
https://github.com/squid-cache/squid/pull/280
We're discussing on how to workaround this build failure.
I realized now I had to open the PR and waiting it to be accepted before
submitting here.
Still lot of learning, sorry again.
Giulio Benetti
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-31 16:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 14:17 [Buildroot] [PATCH next] squid: fix build failure on nios2 Giulio Benetti
2018-08-31 14:23 ` Giulio Benetti
2018-08-31 16:36 ` Giulio Benetti
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.