Skip to contentSkip to conversation

package/trace-cmd: fix build for Sparc64

PATCH Applied Giulio Benetti 3 participants 4 messages Sep 12, 2021 – Oct 4, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/trace-cmd: fix build for Sparc64

Trace-cmd needs -fPIC for Sparc64 platform otherwise it fails on linking, so add -fPIC to CFLAGS when building for such platform.

---
 package/trace-cmd/trace-cmd.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/trace-cmd/trace-cmd.mk +5 -0
index cd3fcb9755..bc431e5dd2 100644
@@ -31,6 +31,11 @@ endif
 # redefining it on the command line causes build problems.
 TRACE_CMD_CFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS))
 
+# Sparc64 needs -fPIC
+ifeq ($(BR2_sparc64),y)
+TRACE_CMD_CFLAGS += -fPIC
+endif
+
 # trace-cmd use CPPFLAGS to add some extra flags.
 # But like for CFLAGS, $(TARGET_CPPFLAGS) contains _LARGEFILE64_SOURCE
 # that causes build problems.
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 3 lines · Giulio Benetti

Trace-cmd needs -fPIC for Sparc64 platform otherwise it fails on linking, so add -fPIC to CFLAGS when building for such platform.

Fixes:
http://autobuild.buildroot.net/results/c59/c596f6308b7f4d44d9ba009ed0c395396fc72f47/

I've forgotten this ^^^, can you please add/reword it while applying patch? Otherwise let me know and I'll send a v2.

Thank you
Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 12 lines
---
  package/trace-cmd/trace-cmd.mk | 5 +++++
  1 file changed, 5 insertions(+)
package/trace-cmd/trace-cmd.mk +0 -0
index cd3fcb9755..bc431e5dd2 100644
@@ -31,6 +31,11 @@ endif
  # redefining it on the command line causes build problems.

package/trace-cmd/trace-cmd.mk endif · line 41

Quoted 10 lines
package/trace-cmd/trace-cmd.mk +5 -0
  TRACE_CMD_CFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS))
 
+# Sparc64 needs -fPIC
+ifeq ($(BR2_sparc64),y)
+TRACE_CMD_CFLAGS += -fPIC
+endif
+
  # trace-cmd use CPPFLAGS to add some extra flags.
  # But like for CFLAGS, $(TARGET_CPPFLAGS) contains _LARGEFILE64_SOURCE
  # that causes build problems.

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

#2 lore raw
In reply to Giulio Benetti

Giulio, All,

On 2021-09-13 01:08 +0200, Giulio Benetti spake thusly:

Quoted 4 lines

Trace-cmd needs -fPIC for Sparc64 platform otherwise it fails on linking, so add -fPIC to CFLAGS when building for such platform.

Applied to master with the autobuiild reference added to the commit log, thanks.

Regards,
Yann E. MORIN.

Quoted 27 lines
---
 package/trace-cmd/trace-cmd.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/trace-cmd/trace-cmd.mk +5 -0
index cd3fcb9755..bc431e5dd2 100644
@@ -31,6 +31,11 @@ endif
 # redefining it on the command line causes build problems.
 TRACE_CMD_CFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS))
 
+# Sparc64 needs -fPIC
+ifeq ($(BR2_sparc64),y)
+TRACE_CMD_CFLAGS += -fPIC
+endif
+
 # trace-cmd use CPPFLAGS to add some extra flags.
 # But like for CFLAGS, $(TARGET_CPPFLAGS) contains _LARGEFILE64_SOURCE
 # that causes build problems.
Signature · 6 lines
2.25.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
#3 lore raw
In reply to Giulio Benetti
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Trace-cmd needs -fPIC for Sparc64 platform otherwise it fails on linking, so add -fPIC to CFLAGS when building for such platform.

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

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