* [i2c-tools][PATCH] honor CROSS_COMPILE
@ 2011-01-07 19:01 Nishanth Menon
[not found] ` <1294426874-24973-1-git-send-email-nm-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Nishanth Menon @ 2011-01-07 19:01 UTC (permalink / raw)
To: linux-i2c; +Cc: Nishanth Menon
Honor CROSS_COMPILE for builds. useful for folks using
building for platforms like ARM using cross compiler
toolchain. CC could be reused as well, but usage of
CROSS_COMPILE seems more similar to what we have
for u-boot, kernel etc..
Signed-off-by: Nishanth Menon <nm-l0cyMroinI0@public.gmane.org>
---
against svn:
r5894 | khali | 2010-12-12 07:22:29 -0600 (Sun, 12 Dec 2010) | 3 lines
Make value arrays const for block write functions. Patch from Roman
Fietze.
Makefile | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index b98a4c3..49e07fe 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,20 @@ INSTALL_DIR := $(INSTALL) -m 755 -d
INSTALL_PROGRAM := $(INSTALL) -m 755
RM := rm -f
+# Acknowledge if CROSS_COMPILE is used
+ifeq ($(CROSS_COMPILE),)
CC ?= gcc
+else
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+CC = $(CROSS_COMPILE)gcc
+AR = $(CROSS_COMPILE)ar
+NM = $(CROSS_COMPILE)nm
+LDR = $(CROSS_COMPILE)ldr
+STRIP = $(CROSS_COMPILE)strip
+OBJCOPY = $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CROSS_COMPILE)objdump
+endif
CFLAGS ?= -O2
# When debugging, use the following instead
--
1.6.3.3
^ permalink raw reply related [flat|nested] 9+ messages in thread[parent not found: <1294426874-24973-1-git-send-email-nm-l0cyMroinI0@public.gmane.org>]
* Re: [i2c-tools][PATCH] honor CROSS_COMPILE [not found] ` <1294426874-24973-1-git-send-email-nm-l0cyMroinI0@public.gmane.org> @ 2011-01-08 19:23 ` Wolfram Sang [not found] ` <20110108192345.GB4045-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2011-01-08 19:23 UTC (permalink / raw) To: Nishanth Menon; +Cc: linux-i2c [-- Attachment #1: Type: text/plain, Size: 692 bytes --] > Honor CROSS_COMPILE for builds. useful for folks using > building for platforms like ARM using cross compiler > toolchain. CC could be reused as well, but usage of > CROSS_COMPILE seems more similar to what we have > for u-boot, kernel etc.. Then again, the vast majority of userspace-projects do not use CROSS_COMPILE. Build systems like ptxdist and buildroot have done fine with overriding CC so far. I don't see much gain in that addition. But thanks for the contribution anyway :) Kind regards, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20110108192345.GB4045-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: [i2c-tools][PATCH] honor CROSS_COMPILE [not found] ` <20110108192345.GB4045-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2011-01-08 20:32 ` Nishanth Menon [not found] ` <4D28C9D5.8050401-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Nishanth Menon @ 2011-01-08 20:32 UTC (permalink / raw) To: Wolfram Sang; +Cc: linux-i2c Wolfram Sang wrote, on 01/08/2011 01:23 PM: > Then again, the vast majority of userspace-projects do not use CROSS_COMPILE. > Build systems like ptxdist and buildroot have done fine with overriding CC so > far. I don't see much gain in that addition. > The same is true for CROSS_COMPILE as well.. since the patch does still allow CC to be over-ridden (as was the previous behavior), why not add CROSS_COMPILE as well considering folks who could be cross compiling just i2ctools without using buildroot and the likes? -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <4D28C9D5.8050401-l0cyMroinI0@public.gmane.org>]
* Re: [i2c-tools][PATCH] honor CROSS_COMPILE [not found] ` <4D28C9D5.8050401-l0cyMroinI0@public.gmane.org> @ 2011-01-08 21:01 ` Wolfram Sang [not found] ` <20110108210130.GC4045-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2011-01-08 21:01 UTC (permalink / raw) To: Nishanth Menon; +Cc: linux-i2c [-- Attachment #1: Type: text/plain, Size: 1090 bytes --] On Sat, Jan 08, 2011 at 02:32:21PM -0600, Nishanth Menon wrote: > Wolfram Sang wrote, on 01/08/2011 01:23 PM: > >Then again, the vast majority of userspace-projects do not use CROSS_COMPILE. > >Build systems like ptxdist and buildroot have done fine with overriding CC so > >far. I don't see much gain in that addition. > > > The same is true for CROSS_COMPILE as well.. since the patch does > still allow CC to be over-ridden (as was the previous behavior), why > not add CROSS_COMPILE as well considering folks who could be cross > compiling just i2ctools without using buildroot and the likes? You can override CC even without a build-system :) I would sum it up like this: On the positive side you could call it "more flexible", on the negative side you could call it "redundant". I wouldn't pick it up, but I surely have no strong feelings about it. It is up to Jean, after all. Kind regards, Wolfram -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20110108210130.GC4045-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* Re: [i2c-tools][PATCH] honor CROSS_COMPILE [not found] ` <20110108210130.GC4045-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2011-01-10 14:26 ` Jean Delvare [not found] ` <20110110152608.536de8e7-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Jean Delvare @ 2011-01-10 14:26 UTC (permalink / raw) To: Wolfram Sang; +Cc: Nishanth Menon, linux-i2c On Sat, 8 Jan 2011 22:01:30 +0100, Wolfram Sang wrote: > On Sat, Jan 08, 2011 at 02:32:21PM -0600, Nishanth Menon wrote: > > Wolfram Sang wrote, on 01/08/2011 01:23 PM: > > >Then again, the vast majority of userspace-projects do not use CROSS_COMPILE. > > >Build systems like ptxdist and buildroot have done fine with overriding CC so > > >far. I don't see much gain in that addition. > > > > > The same is true for CROSS_COMPILE as well.. since the patch does > > still allow CC to be over-ridden (as was the previous behavior), why > > not add CROSS_COMPILE as well considering folks who could be cross > > compiling just i2ctools without using buildroot and the likes? > > You can override CC even without a build-system :) I would sum it up like this: > On the positive side you could call it "more flexible", on the negative side > you could call it "redundant". I wouldn't pick it up, but I surely have no > strong feelings about it. It is up to Jean, after all. I don't have a strong opinion on this either. But I don't get the point of setting values for AS, LD, AR etc. when they don't seem to be used anywhere. And STRIP is set too, but "strip" hard-coded in tools/Module.mk, so I fail to see how that would work. What am I missing? -- Jean Delvare ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20110110152608.536de8e7-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: [i2c-tools][PATCH] honor CROSS_COMPILE [not found] ` <20110110152608.536de8e7-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> @ 2011-01-10 14:27 ` Nishanth Menon [not found] ` <4D2B1768.5030303-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Nishanth Menon @ 2011-01-10 14:27 UTC (permalink / raw) To: Jean Delvare; +Cc: Wolfram Sang, linux-i2c Jean Delvare had written, on 01/10/2011 08:26 AM, the following: > On Sat, 8 Jan 2011 22:01:30 +0100, Wolfram Sang wrote: >> On Sat, Jan 08, 2011 at 02:32:21PM -0600, Nishanth Menon wrote: >>> Wolfram Sang wrote, on 01/08/2011 01:23 PM: >>>> Then again, the vast majority of userspace-projects do not use CROSS_COMPILE. >>>> Build systems like ptxdist and buildroot have done fine with overriding CC so >>>> far. I don't see much gain in that addition. >>>> >>> The same is true for CROSS_COMPILE as well.. since the patch does >>> still allow CC to be over-ridden (as was the previous behavior), why >>> not add CROSS_COMPILE as well considering folks who could be cross >>> compiling just i2ctools without using buildroot and the likes? >> You can override CC even without a build-system :) I would sum it up like this: >> On the positive side you could call it "more flexible", on the negative side >> you could call it "redundant". I wouldn't pick it up, but I surely have no >> strong feelings about it. It is up to Jean, after all. > > I don't have a strong opinion on this either. But I don't get the point > of setting values for AS, LD, AR etc. when they don't seem to be used > anywhere. And STRIP is set too, but "strip" hard-coded in > tools/Module.mk, so I fail to see how that would work. What am I > missing? I think I should have done just CC alone. I missed the strip one. but are we interested in having CROSS_COMPILE? if yes, I can cleanup the patch and resubmit. -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <4D2B1768.5030303-l0cyMroinI0@public.gmane.org>]
* Re: [i2c-tools][PATCH] honor CROSS_COMPILE [not found] ` <4D2B1768.5030303-l0cyMroinI0@public.gmane.org> @ 2011-01-10 14:44 ` Jean Delvare [not found] ` <20110110154435.640c528b-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Jean Delvare @ 2011-01-10 14:44 UTC (permalink / raw) To: Nishanth Menon; +Cc: Wolfram Sang, linux-i2c On Mon, 10 Jan 2011 08:27:52 -0600, Nishanth Menon wrote: > Jean Delvare had written, on 01/10/2011 08:26 AM, the following: > > I don't have a strong opinion on this either. But I don't get the point > > of setting values for AS, LD, AR etc. when they don't seem to be used > > anywhere. And STRIP is set too, but "strip" hard-coded in > > tools/Module.mk, so I fail to see how that would work. What am I > > missing? > I think I should have done just CC alone. I missed the strip one. but > are we interested in having CROSS_COMPILE? if yes, I can cleanup the > patch and resubmit. Well, you proposed it, so you should know if you are interested ;) What's certain is that I won't apply the patch as is, so it indeed needs to be cleaned up and resubmitted if you want me to apply it. -- Jean Delvare ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20110110154435.640c528b-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>]
* Re: [i2c-tools][PATCH] honor CROSS_COMPILE [not found] ` <20110110154435.640c528b-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> @ 2011-01-10 14:46 ` Nishanth Menon [not found] ` <4D2B1BDD.9070601-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Nishanth Menon @ 2011-01-10 14:46 UTC (permalink / raw) To: Jean Delvare; +Cc: Wolfram Sang, linux-i2c Jean Delvare had written, on 01/10/2011 08:44 AM, the following: > On Mon, 10 Jan 2011 08:27:52 -0600, Nishanth Menon wrote: >> Jean Delvare had written, on 01/10/2011 08:26 AM, the following: >>> I don't have a strong opinion on this either. But I don't get the point >>> of setting values for AS, LD, AR etc. when they don't seem to be used >>> anywhere. And STRIP is set too, but "strip" hard-coded in >>> tools/Module.mk, so I fail to see how that would work. What am I >>> missing? >> I think I should have done just CC alone. I missed the strip one. but >> are we interested in having CROSS_COMPILE? if yes, I can cleanup the >> patch and resubmit. > > Well, you proposed it, so you should know if you are interested ;) > > What's certain is that I won't apply the patch as is, so it indeed > needs to be cleaned up and resubmitted if you want me to apply it. > Touché ;). will resubmit it :) thanks for the pointers in strip. I will try to ensure that we have just the ones we need. -- Regards, Nishanth Menon ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <4D2B1BDD.9070601-l0cyMroinI0@public.gmane.org>]
* Re: [i2c-tools][PATCH] honor CROSS_COMPILE [not found] ` <4D2B1BDD.9070601-l0cyMroinI0@public.gmane.org> @ 2011-12-04 19:49 ` Jean Delvare 0 siblings, 0 replies; 9+ messages in thread From: Jean Delvare @ 2011-12-04 19:49 UTC (permalink / raw) To: Nishanth Menon; +Cc: Wolfram Sang, linux-i2c On Mon, 10 Jan 2011 08:46:53 -0600, Nishanth Menon wrote: > Jean Delvare had written, on 01/10/2011 08:44 AM, the following: > > On Mon, 10 Jan 2011 08:27:52 -0600, Nishanth Menon wrote: > >> I think I should have done just CC alone. I missed the strip one. but > >> are we interested in having CROSS_COMPILE? if yes, I can cleanup the > >> patch and resubmit. > > > > Well, you proposed it, so you should know if you are interested ;) > > > > What's certain is that I won't apply the patch as is, so it indeed > > needs to be cleaned up and resubmitted if you want me to apply it. > > > Touché ;). will resubmit it :) thanks for the pointers in strip. I will > try to ensure that we have just the ones we need. You did not resubmit anything, and you just missed the train. If you want your patch in i2c-tools 3.1.1, please consider resubmitting with the required changes applied. -- Jean Delvare ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-12-04 19:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 19:01 [i2c-tools][PATCH] honor CROSS_COMPILE Nishanth Menon
[not found] ` <1294426874-24973-1-git-send-email-nm-l0cyMroinI0@public.gmane.org>
2011-01-08 19:23 ` Wolfram Sang
[not found] ` <20110108192345.GB4045-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-01-08 20:32 ` Nishanth Menon
[not found] ` <4D28C9D5.8050401-l0cyMroinI0@public.gmane.org>
2011-01-08 21:01 ` Wolfram Sang
[not found] ` <20110108210130.GC4045-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-01-10 14:26 ` Jean Delvare
[not found] ` <20110110152608.536de8e7-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-01-10 14:27 ` Nishanth Menon
[not found] ` <4D2B1768.5030303-l0cyMroinI0@public.gmane.org>
2011-01-10 14:44 ` Jean Delvare
[not found] ` <20110110154435.640c528b-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-01-10 14:46 ` Nishanth Menon
[not found] ` <4D2B1BDD.9070601-l0cyMroinI0@public.gmane.org>
2011-12-04 19:49 ` Jean Delvare
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).