All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] perf build: Add EXTRA_LDFLAGS option to makefile
@ 2016-02-09 13:33 Zubair Lutfullah Kakakhel
  2016-02-11 22:17 ` Arnaldo Carvalho de Melo
  2016-02-16  7:52 ` [tip:perf/core] " tip-bot for Zubair Lutfullah Kakakhel
  0 siblings, 2 replies; 3+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-02-09 13:33 UTC (permalink / raw)
  To: peterz, mingo, acme; +Cc: linux-kernel, Zubair.Kakakhel

To compile for little-endian systems, you need to pass -EL to CC
and LD.

EXTRA_CFLAGS works to pass -EL to CC.
Add EXTRA_LDFLAGS to pass -EL to LD.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>

---
There might be a better way to add EXTRA_LDFLAGS to the makefile?

Can compile for little endian now using
make ARCH=mips CROSS_COMPILE=mips-mti-linux-gnu- EXTRA_CFLAGS=-EL
EXTRA_LDFLAGS=-EL

Based on v4.5-rc3
---
 tools/perf/Makefile.perf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 5d34815..617acc1 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -136,6 +136,8 @@ $(call allow-override,CC,$(CROSS_COMPILE)gcc)
 $(call allow-override,AR,$(CROSS_COMPILE)ar)
 $(call allow-override,LD,$(CROSS_COMPILE)ld)
 
+LD += $(EXTRA_LDFLAGS)
+
 PKG_CONFIG = $(CROSS_COMPILE)pkg-config
 
 RM      = rm -f
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC] perf build: Add EXTRA_LDFLAGS option to makefile
  2016-02-09 13:33 [RFC] perf build: Add EXTRA_LDFLAGS option to makefile Zubair Lutfullah Kakakhel
@ 2016-02-11 22:17 ` Arnaldo Carvalho de Melo
  2016-02-16  7:52 ` [tip:perf/core] " tip-bot for Zubair Lutfullah Kakakhel
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-02-11 22:17 UTC (permalink / raw)
  To: Zubair Lutfullah Kakakhel; +Cc: peterz, mingo, linux-kernel

Em Tue, Feb 09, 2016 at 01:33:38PM +0000, Zubair Lutfullah Kakakhel escreveu:
> To compile for little-endian systems, you need to pass -EL to CC
> and LD.
> 
> EXTRA_CFLAGS works to pass -EL to CC.
> Add EXTRA_LDFLAGS to pass -EL to LD.
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>

Looks ok, applied, thanks,

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf build: Add EXTRA_LDFLAGS option to makefile
  2016-02-09 13:33 [RFC] perf build: Add EXTRA_LDFLAGS option to makefile Zubair Lutfullah Kakakhel
  2016-02-11 22:17 ` Arnaldo Carvalho de Melo
@ 2016-02-16  7:52 ` tip-bot for Zubair Lutfullah Kakakhel
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Zubair Lutfullah Kakakhel @ 2016-02-16  7:52 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, mingo, acme, Zubair.Kakakhel, linux-kernel, peterz, hpa

Commit-ID:  37b4e2020a5f4dbecf22ee3efe92de6dbea1c5f0
Gitweb:     http://git.kernel.org/tip/37b4e2020a5f4dbecf22ee3efe92de6dbea1c5f0
Author:     Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
AuthorDate: Tue, 9 Feb 2016 13:33:38 +0000
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 12 Feb 2016 11:30:20 -0300

perf build: Add EXTRA_LDFLAGS option to makefile

To compile for little-endian systems, you need to pass -EL to CC and LD.

EXTRA_CFLAGS works to pass -EL to CC.
Add EXTRA_LDFLAGS to pass -EL to LD.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1455024818-15842-1-git-send-email-Zubair.Kakakhel@imgtec.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index d404117..4a4fad4 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -139,6 +139,8 @@ $(call allow-override,CC,$(CROSS_COMPILE)gcc)
 $(call allow-override,AR,$(CROSS_COMPILE)ar)
 $(call allow-override,LD,$(CROSS_COMPILE)ld)
 
+LD += $(EXTRA_LDFLAGS)
+
 PKG_CONFIG = $(CROSS_COMPILE)pkg-config
 
 RM      = rm -f

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-16  7:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 13:33 [RFC] perf build: Add EXTRA_LDFLAGS option to makefile Zubair Lutfullah Kakakhel
2016-02-11 22:17 ` Arnaldo Carvalho de Melo
2016-02-16  7:52 ` [tip:perf/core] " tip-bot for Zubair Lutfullah Kakakhel

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.