diff mbox series

package/trace-cmd: fix build for Sparc64

Message ID 20210912230856.1125573-1-giulio.benetti@benettiengineering.com
State Accepted
Headers show
Series package/trace-cmd: fix build for Sparc64 | expand

Commit Message

Giulio Benetti Sept. 12, 2021, 11:08 p.m. UTC
Trace-cmd needs -fPIC for Sparc64 platform otherwise it fails on linking,
so add -fPIC to CFLAGS when building for such platform.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/trace-cmd/trace-cmd.mk | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Giulio Benetti Sept. 12, 2021, 11:55 p.m. UTC | #1
On 9/13/21 1:08 AM, Giulio Benetti wrote:
> 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
Yann E. MORIN Sept. 18, 2021, 8:41 p.m. UTC | #2
Giulio, All,

On 2021-09-13 01:08 +0200, Giulio Benetti spake thusly:
> Trace-cmd needs -fPIC for Sparc64 platform otherwise it fails on linking,
> so add -fPIC to CFLAGS when building for such platform.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

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

Regards,
Yann E. MORIN.

> ---
>  package/trace-cmd/trace-cmd.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/trace-cmd/trace-cmd.mk b/package/trace-cmd/trace-cmd.mk
> index cd3fcb9755..bc431e5dd2 100644
> --- a/package/trace-cmd/trace-cmd.mk
> +++ b/package/trace-cmd/trace-cmd.mk
> @@ -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.
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Peter Korsgaard Oct. 4, 2021, 11 a.m. UTC | #3
>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

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

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.
diff mbox series

Patch

diff --git a/package/trace-cmd/trace-cmd.mk b/package/trace-cmd/trace-cmd.mk
index cd3fcb9755..bc431e5dd2 100644
--- a/package/trace-cmd/trace-cmd.mk
+++ b/package/trace-cmd/trace-cmd.mk
@@ -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.