Skip to contentSkip to conversation

package/ace: fix build failure due to gcc bug 101915

PATCH Applied Giulio Benetti 3 participants 3 messages Aug 14, 2022 – Sep 15, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/ace: fix build failure due to gcc bug 101915

The ace package exhibits gcc bug 101915 when built for the Microblaze architecture with optimization enabled, which causes a build failure.

As done for other packages in Buildroot work around this gcc bug by setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_101915=y.

Fixes:
http://autobuild.buildroot.net/results/f8f/f8f8de99abe92175954c370ad99fee43942bcdcc/

---
 package/ace/ace.mk | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
package/ace/ace.mk +10 -1
index 7299f0d40c..6f381d5da5 100644
@@ -17,9 +17,18 @@ ACE_CPE_ID_PRODUCT = adaptive_communication_environment
 # Only compiling ACE libraries (no TAO)
 ACE_LIBARIES = ace ACEXML Kokyu netsvcs protocols/ace
 
+ACE_CPPFLAGS = $(TARGET_CPPFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101915),y)
+ACE_CPPFLAGS += -O0
+endif
+
+# ace requires -std=c++11
+ACE_CPPFLAGS += -std=c++11
+
 ACE_MAKE_OPTS = \
 	ACE_ROOT="$(@D)" \
-	DEFFLAGS="$(TARGET_CPPFLAGS) -std=c++11"
+	DEFFLAGS="$(ACE_CPPFLAGS)"
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 ACE_LIBARIES += ace/SSL
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Giulio, All,

On 2022-08-14 05:32 +0200, Giulio Benetti spake thusly:

Quoted 20 lines

The ace package exhibits gcc bug 101915 when built for the Microblaze architecture with optimization enabled, which causes a build failure.

As done for other packages in Buildroot work around this gcc bug by setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_101915=y.

Fixes:
http://autobuild.buildroot.net/results/f8f/f8f8de99abe92175954c370ad99fee43942bcdcc/

---
 package/ace/ace.mk | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
package/ace/ace.mk +0 -0
index 7299f0d40c..6f381d5da5 100644
@@ -17,9 +17,18 @@ ACE_CPE_ID_PRODUCT = adaptive_communication_environment
 # Only compiling ACE libraries (no TAO)

package/ace/ace.mk ACE_CPE_ID_PRODUCT = adaptive_communication_environment · line 27

Quoted 10 lines
package/ace/ace.mk +8 -0
 ACE_LIBARIES = ace ACEXML Kokyu netsvcs protocols/ace
 
+ACE_CPPFLAGS = $(TARGET_CPPFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101915),y)
+ACE_CPPFLAGS += -O0
+endif
+
+# ace requires -std=c++11
+ACE_CPPFLAGS += -std=c++11

There's no reason to have this unconditional append-assignment, so I moved is to the initial assignment, above.

package/ace/ace.mk ACE_CPE_ID_PRODUCT = adaptive_communication_environment · line 31

Quoted 4 lines
package/ace/ace.mk +1 -1
 ACE_MAKE_OPTS = \
 	ACE_ROOT="$(@D)" \
-	DEFFLAGS="$(TARGET_CPPFLAGS) -std=c++11"
+	DEFFLAGS="$(ACE_CPPFLAGS)"

So, I was very surprised to see C++ flags to be passed via CPPFLAGS. CPPFLAGS contain the C and C++ pre-processor flags, not the C++ flags, so it looks fishy...

And indeed, ACE's GNUmakefile states that DEFFLAGS are the C++ pre-processor flags.

But we're lucky that the C++ pre=processor flags are appended to the compile command, so it turns out to be OK.

However, this is very misleading.

So, I've pushed out a follow-up change that adds a little comment to avoid further head-scratchig in the future...

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 9 lines
package/ace/ace.mk +0 -0
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 ACE_LIBARIES += ace/SSL
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Giulio Benetti
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

The ace package exhibits gcc bug 101915 when built for the Microblaze architecture with optimization enabled, which causes a build failure.

Quoted 7 lines

As done for other packages in Buildroot work around this gcc bug by setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_101915=y.

Fixes:
http://autobuild.buildroot.net/results/f8f/f8f8de99abe92175954c370ad99fee43942bcdcc/

Committed to 2022.05.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot