Skip to contentSkip to conversation

fxload: do not pass -g on Microblaze

PATCH New Thomas Petazzoni 2 participants 3 messages May 15, 2017 – May 16, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fxload: do not pass -g on Microblaze

gcc on Microblaze is affected by PR63261, which causes a build failure when optimization *and* debugging symbols are enabled. As a work-around, do not build fxload with debugging symbols.

Fixes:

http://autobuild.buildroot.net/results/24640a042d84f45339246c0a18e10905494b2199/

---
A possible alternate solution is to disable fxload on Microblaze entirely. If you prefer this option, let me know, and I'll send a different patch.

---
 package/fxload/fxload.mk | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
package/fxload/fxload.mk +11 -1
index 94b11d0..04adbad 100644
@@ -9,8 +9,18 @@ FXLOAD_SITE = http://downloads.sourceforge.net/project/linux-hotplug/fxload/$(FX
 FXLOAD_LICENSE = GPL-2.0+
 FXLOAD_LICENSE_FILES = COPYING
 
+# Gcc on Microblaze is affected by PR63261, which causes a build
+# failure when -g is passed.
+ifeq ($(BR2_microblaze),y)
+FXLOAD_CFLAGS = $(filter-out $(TARGET_DEBUGGING),$(TARGET_CFLAGS))
+else
+FXLOAD_CFLAGS = $(TARGET_CFLAGS)
+endif
+
 define FXLOAD_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		CFLAGS="$(FXLOAD_CFLAGS)" \
+		-C $(@D) all
 endef
 
 define FXLOAD_INSTALL_TARGET_CMDS
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 fxload: do not pass -g on Microblaze

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

gcc on Microblaze is affected by PR63261, which causes a build failure when optimization *and* debugging symbols are enabled. As a work-around, do not build fxload with debugging symbols.

Fixes:

Quoted 7 lines

http://autobuild.buildroot.net/results/24640a042d84f45339246c0a18e10905494b2199/

---
A possible alternate solution is to disable fxload on Microblaze entirely. If you prefer this option, let me know, and I'll send a different patch.

I wouldn't mind just disabling fxload. I personally haven't seen any hw with the cypress 8051's needing fxload in the last 10 years or so, and there are no reverse dependencies.

I see that the bug is very old :/ I wonder why we don't have a lot of other fallout from it - Is fxload really the only package passing -g or is the fxload source code so special that the bug only triggers there?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 fxload: do not pass -g on Microblaze

Hello,

Quoted 7 lines · Peter Korsgaard
Quoted 3 lines

A possible alternate solution is to disable fxload on Microblaze entirely. If you prefer this option, let me know, and I'll send a different patch.

I wouldn't mind just disabling fxload. I personally haven't seen any hw with the cypress 8051's needing fxload in the last 10 years or so, and there are no reverse dependencies.

OK, I'll send a patch disabling fxload entirely then.

Quoted 3 lines

I see that the bug is very old :/ I wonder why we don't have a lot of other fallout from it - Is fxload really the only package passing -g or is the fxload source code so special that the bug only triggers there?

We don't seem to see it with other packages, so there must be something special in fxload's code that triggers the bug. But I must say I haven't looked too deeply, fixing Microblaze gcc issues is not really my top priority.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com