Trinity fuzzer tool discussions
 help / color / mirror / Atom feed
* [PATCH 1/4] Add support for cross building using CROSS_COMPILE
@ 2013-06-01 11:46 Michael Ellerman
  2013-06-01 11:46 ` [PATCH 2/4] Ignore vim swap files Michael Ellerman
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Michael Ellerman @ 2013-06-01 11:46 UTC (permalink / raw)
  To: trinity

Similarly to the kernel.  CROSS_COMPILE is optional, when specified it's
a prefix, eg. myarch-linux-gnu-

We still allow overriding CC, separately, or in addition to setting
CROSS_COMPILE.

There is also support for cross configuring, because at the moment all
the configure tests only need to build, they're not run.
---
 Makefile     |    3 +++
 configure.sh |    2 ++
 2 files changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index 2dbaa65..f5a35b6 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,9 @@ VERSION=1.2pre
 INSTALL_PREFIX ?= $(DESTDIR)
 INSTALL_PREFIX ?= $(HOME)
 
+CC := $(CROSS_COMPILE)$(CC)
+LD := $(CROSS_COMPILE)$(LD)
+
 CFLAGS = -Wall -W -g -O2 -I. -Iinclude/ -Wimplicit -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
 #CFLAGS += $(shell if $(CC) -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-m32"; fi)
 CFLAGS += -Wdeclaration-after-statement
diff --git a/configure.sh b/configure.sh
index 4be1e59..a02db7f 100755
--- a/configure.sh
+++ b/configure.sh
@@ -10,6 +10,8 @@ MISSING_DEFS=0
 
 [ -z "$CC" ] && CC=cc
 
+CC=${CROSS_COMPILE}${CC}
+
 echo "/* This file is auto-generated by configure.sh */" > config.h
 
 TMP=$(mktemp)
-- 
1.7.10.4

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

end of thread, other threads:[~2013-06-07  6:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-01 11:46 [PATCH 1/4] Add support for cross building using CROSS_COMPILE Michael Ellerman
2013-06-01 11:46 ` [PATCH 2/4] Ignore vim swap files Michael Ellerman
2013-06-01 11:46 ` [PATCH 3/4] Fix compile error in net/bpf.c for non x86 Michael Ellerman
2013-06-01 11:46 ` [PATCH 4/4] Sanity check the syscall number in print_syscall_name() Michael Ellerman
2013-06-07  5:04 ` [PATCH 1/4] Add support for cross building using CROSS_COMPILE Michael Ellerman
2013-06-07  5:30   ` Dave Jones
2013-06-07  6:44     ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox