* [U-Boot] [PATCH 0/3] Adopt u-boot build to OS X
@ 2013-06-30 11:15 Andreas Bießmann
2013-06-30 11:15 ` [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on " Andreas Bießmann
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Andreas Bießmann @ 2013-06-30 11:15 UTC (permalink / raw)
To: u-boot
Latest changes to mkimage, Makefile and added proftool broke compilation on OS
X. This series makes u-boot build clean again with some little adoptions.
Patch 'lib/rsa/rsa-sig.c: compile on OS X' supersedes
http://patchwork.ozlabs.org/patch/255283/
Andreas Bie?mann (3):
lib/rsa/rsa-sig.c: compile on OS X
tools/proftool: add missing definition
Makefile: fix readelf usage
Makefile | 2 +-
lib/rsa/rsa-sign.c | 1 -
tools/proftool.c | 5 +++++
3 files changed, 6 insertions(+), 2 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 14+ messages in thread* [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on OS X 2013-06-30 11:15 [U-Boot] [PATCH 0/3] Adopt u-boot build to OS X Andreas Bießmann @ 2013-06-30 11:15 ` Andreas Bießmann 2013-07-01 18:58 ` Lubomir Popov 2013-07-03 14:15 ` Simon Glass 2013-06-30 11:15 ` [U-Boot] [PATCH 2/3] tools/proftool: add missing definition Andreas Bießmann 2013-06-30 11:15 ` [U-Boot] [PATCH 3/3] Makefile: fix readelf usage Andreas Bießmann 2 siblings, 2 replies; 14+ messages in thread From: Andreas Bießmann @ 2013-06-30 11:15 UTC (permalink / raw) To: u-boot Interfaces exposed by error.h seems not to be used in rsa-sig.c, remove it. This also fixes an compile error on OS X: ---8<--- u-boot/lib/rsa/rsa-sign.c:23:19: error: error.h: No such file or directory --->8--- Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> --- Supersedes http://patchwork.ozlabs.org/patch/255283/ lib/rsa/rsa-sign.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index a75ae24..e30d8ca 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -20,7 +20,6 @@ #include "mkimage.h" #include <stdio.h> #include <string.h> -#include <error.h> #include <image.h> #include <time.h> #include <openssl/rsa.h> -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on OS X 2013-06-30 11:15 ` [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on " Andreas Bießmann @ 2013-07-01 18:58 ` Lubomir Popov 2013-07-03 14:15 ` Simon Glass 1 sibling, 0 replies; 14+ messages in thread From: Lubomir Popov @ 2013-07-01 18:58 UTC (permalink / raw) To: u-boot Hi Andreas, > Interfaces exposed by error.h seems not to be used in rsa-sig.c, remove it. > This also fixes an compile error on OS X: > > ---8<--- > u-boot/lib/rsa/rsa-sign.c:23:19: error: error.h: No such file or directory > --->8--- > > Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> > --- Entire series Tested-by: Lubomir Popov <lpopov@mm-sol.com> on MacOS X 10.8.3 with the following tools used for building U-Boot for one ARM (OMAP) board: arm-none-eabi-gcc (GCC) 4.7.2 GNU ld (GNU Binutils) 2.23.1 Best regards, Lubo ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on OS X 2013-06-30 11:15 ` [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on " Andreas Bießmann 2013-07-01 18:58 ` Lubomir Popov @ 2013-07-03 14:15 ` Simon Glass 1 sibling, 0 replies; 14+ messages in thread From: Simon Glass @ 2013-07-03 14:15 UTC (permalink / raw) To: u-boot On Sun, Jun 30, 2013 at 8:15 PM, Andreas Bie?mann < andreas.devel@googlemail.com> wrote: > Interfaces exposed by error.h seems not to be used in rsa-sig.c, remove it. > This also fixes an compile error on OS X: > > ---8<--- > u-boot/lib/rsa/rsa-sign.c:23:19: error: error.h: No such file or directory > --->8--- > > Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> > Reviewed-by: Simon Glass <sjg@chromium.org? Thanks for sorting this out. Might even break out my Mac to try it :-) > --- > Supersedes http://patchwork.ozlabs.org/patch/255283/ > > lib/rsa/rsa-sign.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c > index a75ae24..e30d8ca 100644 > --- a/lib/rsa/rsa-sign.c > +++ b/lib/rsa/rsa-sign.c > @@ -20,7 +20,6 @@ > #include "mkimage.h" > #include <stdio.h> > #include <string.h> > -#include <error.h> > #include <image.h> > #include <time.h> > #include <openssl/rsa.h> > -- > 1.8.3.1 > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 2/3] tools/proftool: add missing definition 2013-06-30 11:15 [U-Boot] [PATCH 0/3] Adopt u-boot build to OS X Andreas Bießmann 2013-06-30 11:15 ` [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on " Andreas Bießmann @ 2013-06-30 11:15 ` Andreas Bießmann 2013-07-01 18:45 ` Jeroen Hofstee 2013-07-01 18:59 ` Lubomir Popov 2013-06-30 11:15 ` [U-Boot] [PATCH 3/3] Makefile: fix readelf usage Andreas Bießmann 2 siblings, 2 replies; 14+ messages in thread From: Andreas Bießmann @ 2013-06-30 11:15 UTC (permalink / raw) To: u-boot BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a simple define for them. Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> --- tools/proftool.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/proftool.c b/tools/proftool.c index a48ed28..d910b50 100644 --- a/tools/proftool.c +++ b/tools/proftool.c @@ -35,6 +35,11 @@ #define MAX_LINE_LEN 500 +#ifndef REG_NOERROR +/* BSD regex.h do not expose REG_NOERROR */ +# define REG_NOERROR 0 +#endif + enum { FUNCF_TRACE = 1 << 0, /* Include this function in trace */ }; -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 2/3] tools/proftool: add missing definition 2013-06-30 11:15 ` [U-Boot] [PATCH 2/3] tools/proftool: add missing definition Andreas Bießmann @ 2013-07-01 18:45 ` Jeroen Hofstee 2013-07-01 20:12 ` Jeroen Hofstee 2013-07-01 18:59 ` Lubomir Popov 1 sibling, 1 reply; 14+ messages in thread From: Jeroen Hofstee @ 2013-07-01 18:45 UTC (permalink / raw) To: u-boot Hello Andreas, On 06/30/2013 01:15 PM, Andreas Bie?mann wrote: > BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a simple > define for them. > > Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> > --- > > +#ifndef REG_NOERROR > +/* BSD regex.h do not expose REG_NOERROR */ > +# define REG_NOERROR 0 > +#endif > + I think a neater solutions is to actually remove the REG_NOERROR. From man regexec, GNU 2011-09-27: "regexec() returns zero for a successful match or REG_NOMATCH for failure.". Opengroup specs will mention the same. REG_NOERROR is not mentioned at all. e.g.: if (err) { regex_report_error(&item->regex, err, "match", item->name); break; } should do the job in a portable way (and reads a bit better, as well). But this is only a cosmetic comment, the patch by itself should do the job. Regards, Jeroen p.s. Strictly speaking it is dead code actually... ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 2/3] tools/proftool: add missing definition 2013-07-01 18:45 ` Jeroen Hofstee @ 2013-07-01 20:12 ` Jeroen Hofstee 2013-07-02 6:39 ` Andreas Bießmann 0 siblings, 1 reply; 14+ messages in thread From: Jeroen Hofstee @ 2013-07-01 20:12 UTC (permalink / raw) To: u-boot Hello Andreas, On 07/01/2013 08:45 PM, Jeroen Hofstee wrote: > Hello Andreas, > > On 06/30/2013 01:15 PM, Andreas Bie?mann wrote: >> BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a >> simple >> define for them. >> >> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> >> --- >> +#ifndef REG_NOERROR >> +/* BSD regex.h do not expose REG_NOERROR */ >> +# define REG_NOERROR 0 >> +#endif >> + > I think a neater solutions is to actually remove the REG_NOERROR. > From man regexec, GNU 2011-09-27: "regexec() returns zero for a > successful match or REG_NOMATCH for failure.". Opengroup specs > will mention the same. REG_NOERROR is not mentioned at all. > > e.g.: > > if (err) { > regex_report_error(&item->regex, err, "match", > item->name); > break; > } > > should do the job in a portable way (and reads a bit better, > as well). But this is only a cosmetic comment, the patch by > itself should do the job. > Just realized this is more then cosmetic. Also GNU will not have REG_NOERROR defined since it is an enum, so it will always take the #ifndef REG_NOERROR road, which boils down to !! 0. So this needs a new version instead of hiding how this works. Regards, Jeroe p.s. Simon, Andreas sorry for spamming, selected the wrong email... ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 2/3] tools/proftool: add missing definition 2013-07-01 20:12 ` Jeroen Hofstee @ 2013-07-02 6:39 ` Andreas Bießmann 0 siblings, 0 replies; 14+ messages in thread From: Andreas Bießmann @ 2013-07-02 6:39 UTC (permalink / raw) To: u-boot Hi Jeroen, On 01.07.13 22:12, Jeroen Hofstee wrote: > Hello Andreas, > > On 07/01/2013 08:45 PM, Jeroen Hofstee wrote: >> Hello Andreas, >> >> On 06/30/2013 01:15 PM, Andreas Bie?mann wrote: >>> BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a >>> simple >>> define for them. >>> >>> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> >>> --- >>> +#ifndef REG_NOERROR >>> +/* BSD regex.h do not expose REG_NOERROR */ >>> +# define REG_NOERROR 0 >>> +#endif >>> + >> I think a neater solutions is to actually remove the REG_NOERROR. >> From man regexec, GNU 2011-09-27: "regexec() returns zero for a >> successful match or REG_NOMATCH for failure.". Opengroup specs >> will mention the same. REG_NOERROR is not mentioned at all. >> >> e.g.: >> >> if (err) { >> regex_report_error(&item->regex, err, "match", >> item->name); >> break; >> } >> >> should do the job in a portable way (and reads a bit better, >> as well). But this is only a cosmetic comment, the patch by >> itself should do the job. >> > Just realized this is more then cosmetic. Also GNU will not have > REG_NOERROR defined since it is an enum, so it will always > take the #ifndef REG_NOERROR road, which boils down to !! 0. > > So this needs a new version instead of hiding how this works. you are right, v2 is on the way ... > p.s. Simon, Andreas sorry for spamming, selected the wrong email... Ouch, sorry! Just realized that I took the wrong mail too. Best regards Andreas Bie?mann ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 2/3] tools/proftool: add missing definition 2013-06-30 11:15 ` [U-Boot] [PATCH 2/3] tools/proftool: add missing definition Andreas Bießmann 2013-07-01 18:45 ` Jeroen Hofstee @ 2013-07-01 18:59 ` Lubomir Popov 1 sibling, 0 replies; 14+ messages in thread From: Lubomir Popov @ 2013-07-01 18:59 UTC (permalink / raw) To: u-boot > BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a simple > define for them. > > Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> > --- Tested-by: Lubomir Popov <lpopov@mm-sol.com> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 3/3] Makefile: fix readelf usage 2013-06-30 11:15 [U-Boot] [PATCH 0/3] Adopt u-boot build to OS X Andreas Bießmann 2013-06-30 11:15 ` [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on " Andreas Bießmann 2013-06-30 11:15 ` [U-Boot] [PATCH 2/3] tools/proftool: add missing definition Andreas Bießmann @ 2013-06-30 11:15 ` Andreas Bießmann 2013-07-01 19:00 ` Lubomir Popov 2013-07-04 12:09 ` Albert ARIBAUD 2 siblings, 2 replies; 14+ messages in thread From: Andreas Bießmann @ 2013-06-30 11:15 UTC (permalink / raw) To: u-boot Some OS (like OS X) do not provide a generic readelf. We should enforce to use the toochain provided readelf instead, to do so use $(CROSS_COMPILE)readelf. Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ba1c10b..446c2f8 100644 --- a/Makefile +++ b/Makefile @@ -747,7 +747,7 @@ endif # config.mk # ARM relocations should all be R_ARM_RELATIVE. checkarmreloc: $(obj)u-boot @if test "R_ARM_RELATIVE" != \ - "`readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \ + "`$(CROSS_COMPILE)readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \ then echo "$< contains relocations other than \ R_ARM_RELATIVE"; false; fi -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 3/3] Makefile: fix readelf usage 2013-06-30 11:15 ` [U-Boot] [PATCH 3/3] Makefile: fix readelf usage Andreas Bießmann @ 2013-07-01 19:00 ` Lubomir Popov 2013-07-04 12:09 ` Albert ARIBAUD 1 sibling, 0 replies; 14+ messages in thread From: Lubomir Popov @ 2013-07-01 19:00 UTC (permalink / raw) To: u-boot > Some OS (like OS X) do not provide a generic readelf. We should enforce to use > the toochain provided readelf instead, to do so use $(CROSS_COMPILE)readelf. > > Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> > --- Tested-by: Lubomir Popov <lpopov@mm-sol.com> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 3/3] Makefile: fix readelf usage 2013-06-30 11:15 ` [U-Boot] [PATCH 3/3] Makefile: fix readelf usage Andreas Bießmann 2013-07-01 19:00 ` Lubomir Popov @ 2013-07-04 12:09 ` Albert ARIBAUD 2013-07-04 13:25 ` Andreas Bießmann 1 sibling, 1 reply; 14+ messages in thread From: Albert ARIBAUD @ 2013-07-04 12:09 UTC (permalink / raw) To: u-boot Hi Andreas, On Sun, 30 Jun 2013 13:15:06 +0200, Andreas Bie?mann <andreas.devel@googlemail.com> wrote: > Some OS (like OS X) do not provide a generic readelf. We should enforce to use > the toochain provided readelf instead, to do so use $(CROSS_COMPILE)readelf. > > Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index ba1c10b..446c2f8 100644 > --- a/Makefile > +++ b/Makefile > @@ -747,7 +747,7 @@ endif # config.mk > # ARM relocations should all be R_ARM_RELATIVE. > checkarmreloc: $(obj)u-boot > @if test "R_ARM_RELATIVE" != \ > - "`readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \ > + "`$(CROSS_COMPILE)readelf -r $< | cut -d ' ' -f 4 | grep R_ARM | sort -u`"; \ > then echo "$< contains relocations other than \ > R_ARM_RELATIVE"; false; fi Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Tom, do I take this in u-boot-arm and then deliver this later in my PR, or do you want to pick it directly in mainline? Amicalement, -- Albert. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 3/3] Makefile: fix readelf usage 2013-07-04 12:09 ` Albert ARIBAUD @ 2013-07-04 13:25 ` Andreas Bießmann 2013-07-04 14:02 ` Albert ARIBAUD 0 siblings, 1 reply; 14+ messages in thread From: Andreas Bießmann @ 2013-07-04 13:25 UTC (permalink / raw) To: u-boot Hi Albert, On 07/04/2013 02:09 PM, Albert ARIBAUD wrote: > Hi Andreas, > > On Sun, 30 Jun 2013 13:15:06 +0200, Andreas Bie?mann > <andreas.devel@googlemail.com> wrote: > >> Some OS (like OS X) do not provide a generic readelf. We should enforce to use >> the toochain provided readelf instead, to do so use $(CROSS_COMPILE)readelf. >> >> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> >> --- >> Makefile | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) <snip> > > Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> > > Tom, do I take this in u-boot-arm and then deliver this later in my PR, > or do you want to pick it directly in mainline? It is in fact in master [1]. Regards, Andreas Bie?mann [1] http://git.denx.de/?p=u-boot.git;a=commit;h=c1273d7162bd4bf795f8637cac3532a490dd9024 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [U-Boot] [PATCH 3/3] Makefile: fix readelf usage 2013-07-04 13:25 ` Andreas Bießmann @ 2013-07-04 14:02 ` Albert ARIBAUD 0 siblings, 0 replies; 14+ messages in thread From: Albert ARIBAUD @ 2013-07-04 14:02 UTC (permalink / raw) To: u-boot Hi Andreas, On Thu, 04 Jul 2013 15:25:53 +0200, "Andreas Bie?mann" <andreas.devel@googlemail.com> wrote: > Hi Albert, > > On 07/04/2013 02:09 PM, Albert ARIBAUD wrote: > > Hi Andreas, > > > > On Sun, 30 Jun 2013 13:15:06 +0200, Andreas Bie?mann > > <andreas.devel@googlemail.com> wrote: > > > >> Some OS (like OS X) do not provide a generic readelf. We should enforce to use > >> the toochain provided readelf instead, to do so use $(CROSS_COMPILE)readelf. > >> > >> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com> > >> --- > >> Makefile | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > <snip> > > > > > Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> > > > > Tom, do I take this in u-boot-arm and then deliver this later in my PR, > > or do you want to pick it directly in mainline? > > It is in fact in master [1]. Good! :) I'd missed the 'applied' reply to it. > Regards, > > Andreas Bie?mann > > [1] > http://git.denx.de/?p=u-boot.git;a=commit;h=c1273d7162bd4bf795f8637cac3532a490dd9024 Amicalement, -- Albert. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-07-04 14:02 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-06-30 11:15 [U-Boot] [PATCH 0/3] Adopt u-boot build to OS X Andreas Bießmann 2013-06-30 11:15 ` [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on " Andreas Bießmann 2013-07-01 18:58 ` Lubomir Popov 2013-07-03 14:15 ` Simon Glass 2013-06-30 11:15 ` [U-Boot] [PATCH 2/3] tools/proftool: add missing definition Andreas Bießmann 2013-07-01 18:45 ` Jeroen Hofstee 2013-07-01 20:12 ` Jeroen Hofstee 2013-07-02 6:39 ` Andreas Bießmann 2013-07-01 18:59 ` Lubomir Popov 2013-06-30 11:15 ` [U-Boot] [PATCH 3/3] Makefile: fix readelf usage Andreas Bießmann 2013-07-01 19:00 ` Lubomir Popov 2013-07-04 12:09 ` Albert ARIBAUD 2013-07-04 13:25 ` Andreas Bießmann 2013-07-04 14:02 ` Albert ARIBAUD
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox