* [PATCH] tzcode-native: quote ${CC}
@ 2017-05-18 17:34 Enrico Scholz
2017-05-18 18:19 ` Denys Dmytriyenko
0 siblings, 1 reply; 10+ messages in thread
From: Enrico Scholz @ 2017-05-18 17:34 UTC (permalink / raw)
To: openembedded-core; +Cc: Enrico Scholz
build fails else with
| + make -j 8 -l 6 cc=ccache gcc
| make: *** No rule to make target 'gcc'. Stop.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
meta/recipes-extended/tzcode/tzcode-native_2017b.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb
index 2084f79..165d2c6 100644
--- a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb
+++ b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb
@@ -18,7 +18,7 @@ S = "${WORKDIR}"
inherit native
-EXTRA_OEMAKE += "cc=${CC}"
+EXTRA_OEMAKE += "cc='${CC}'"
do_install () {
install -d ${D}${bindir}/
--
2.9.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] tzcode-native: quote ${CC} 2017-05-18 17:34 [PATCH] tzcode-native: quote ${CC} Enrico Scholz @ 2017-05-18 18:19 ` Denys Dmytriyenko 2017-05-18 18:57 ` Khem Raj 2017-05-18 23:37 ` Enrico Scholz 0 siblings, 2 replies; 10+ messages in thread From: Denys Dmytriyenko @ 2017-05-18 18:19 UTC (permalink / raw) To: Enrico Scholz; +Cc: openembedded-core On Thu, May 18, 2017 at 07:34:23PM +0200, Enrico Scholz wrote: > build fails else with > > | + make -j 8 -l 6 cc=ccache gcc > | make: *** No rule to make target 'gcc'. Stop. > > Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > --- > meta/recipes-extended/tzcode/tzcode-native_2017b.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > index 2084f79..165d2c6 100644 > --- a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > +++ b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > @@ -18,7 +18,7 @@ S = "${WORKDIR}" > > inherit native > > -EXTRA_OEMAKE += "cc=${CC}" > +EXTRA_OEMAKE += "cc='${CC}'" Should these be double-quotes around ${CC}? > do_install () { > install -d ${D}${bindir}/ > -- > 2.9.4 > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] tzcode-native: quote ${CC} 2017-05-18 18:19 ` Denys Dmytriyenko @ 2017-05-18 18:57 ` Khem Raj 2017-05-18 21:37 ` Christopher Larson 2017-05-18 23:37 ` Enrico Scholz 1 sibling, 1 reply; 10+ messages in thread From: Khem Raj @ 2017-05-18 18:57 UTC (permalink / raw) To: Denys Dmytriyenko Cc: Enrico Scholz, Patches and discussions about the oe-core layer On Thu, May 18, 2017 at 11:19 AM, Denys Dmytriyenko <denis@denix.org> wrote: > On Thu, May 18, 2017 at 07:34:23PM +0200, Enrico Scholz wrote: >> build fails else with >> >> | + make -j 8 -l 6 cc=ccache gcc >> | make: *** No rule to make target 'gcc'. Stop. >> >> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> >> --- >> meta/recipes-extended/tzcode/tzcode-native_2017b.bb | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb >> index 2084f79..165d2c6 100644 >> --- a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb >> +++ b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb >> @@ -18,7 +18,7 @@ S = "${WORKDIR}" >> >> inherit native >> >> -EXTRA_OEMAKE += "cc=${CC}" >> +EXTRA_OEMAKE += "cc='${CC}'" > > Should these be double-quotes around ${CC}? I think this should work as such. > > >> do_install () { >> install -d ${D}${bindir}/ >> -- >> 2.9.4 >> >> -- >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.openembedded.org/mailman/listinfo/openembedded-core > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] tzcode-native: quote ${CC} 2017-05-18 18:57 ` Khem Raj @ 2017-05-18 21:37 ` Christopher Larson 2017-05-18 21:54 ` Denys Dmytriyenko 0 siblings, 1 reply; 10+ messages in thread From: Christopher Larson @ 2017-05-18 21:37 UTC (permalink / raw) To: Khem Raj; +Cc: Enrico Scholz, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 1440 bytes --] On Thu, May 18, 2017 at 11:57 AM, Khem Raj <raj.khem@gmail.com> wrote: > On Thu, May 18, 2017 at 11:19 AM, Denys Dmytriyenko <denis@denix.org> > wrote: > > On Thu, May 18, 2017 at 07:34:23PM +0200, Enrico Scholz wrote: > >> build fails else with > >> > >> | + make -j 8 -l 6 cc=ccache gcc > >> | make: *** No rule to make target 'gcc'. Stop. > >> > >> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > >> --- > >> meta/recipes-extended/tzcode/tzcode-native_2017b.bb | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > >> index 2084f79..165d2c6 100644 > >> --- a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > >> +++ b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > >> @@ -18,7 +18,7 @@ S = "${WORKDIR}" > >> > >> inherit native > >> > >> -EXTRA_OEMAKE += "cc=${CC}" > >> +EXTRA_OEMAKE += "cc='${CC}'" > > > > Should these be double-quotes around ${CC}? > > I think this should work as such. Indeed, it’s expanded by bitbake, not the shell, so which quotes don’t matter in that regard, and it’s syntactically cleaner to use different quotes than those used for the variable as a whole. -- Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics [-- Attachment #2: Type: text/html, Size: 2617 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] tzcode-native: quote ${CC} 2017-05-18 21:37 ` Christopher Larson @ 2017-05-18 21:54 ` Denys Dmytriyenko 2017-05-18 22:38 ` Christopher Larson 0 siblings, 1 reply; 10+ messages in thread From: Denys Dmytriyenko @ 2017-05-18 21:54 UTC (permalink / raw) To: Christopher Larson Cc: Enrico Scholz, Patches and discussions about the oe-core layer On Thu, May 18, 2017 at 02:37:29PM -0700, Christopher Larson wrote: > On Thu, May 18, 2017 at 11:57 AM, Khem Raj <raj.khem@gmail.com> wrote: > > > On Thu, May 18, 2017 at 11:19 AM, Denys Dmytriyenko <denis@denix.org> > > wrote: > > > On Thu, May 18, 2017 at 07:34:23PM +0200, Enrico Scholz wrote: > > >> build fails else with > > >> > > >> | + make -j 8 -l 6 cc=ccache gcc > > >> | make: *** No rule to make target 'gcc'. Stop. > > >> > > >> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > > >> --- > > >> meta/recipes-extended/tzcode/tzcode-native_2017b.bb | 2 +- > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > >> > > >> diff --git a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > > b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > > >> index 2084f79..165d2c6 100644 > > >> --- a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > > >> +++ b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > > >> @@ -18,7 +18,7 @@ S = "${WORKDIR}" > > >> > > >> inherit native > > >> > > >> -EXTRA_OEMAKE += "cc=${CC}" > > >> +EXTRA_OEMAKE += "cc='${CC}'" > > > > > > Should these be double-quotes around ${CC}? > > > > I think this should work as such. > > Indeed, it’s expanded by bitbake, not the shell, so which quotes don’t > matter in that regard, and it’s syntactically cleaner to use different > quotes than those used for the variable as a whole. Unless ${CC} has shell variables inside for later expansion, isn't it? -- Denys ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] tzcode-native: quote ${CC} 2017-05-18 21:54 ` Denys Dmytriyenko @ 2017-05-18 22:38 ` Christopher Larson 0 siblings, 0 replies; 10+ messages in thread From: Christopher Larson @ 2017-05-18 22:38 UTC (permalink / raw) To: Denys Dmytriyenko Cc: Enrico Scholz, Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 2100 bytes --] On Thu, May 18, 2017 at 2:54 PM, Denys Dmytriyenko <denis@denix.org> wrote: > On Thu, May 18, 2017 at 02:37:29PM -0700, Christopher Larson wrote: > > On Thu, May 18, 2017 at 11:57 AM, Khem Raj <raj.khem@gmail.com> wrote: > > > > > On Thu, May 18, 2017 at 11:19 AM, Denys Dmytriyenko <denis@denix.org> > > > wrote: > > > > On Thu, May 18, 2017 at 07:34:23PM +0200, Enrico Scholz wrote: > > > >> build fails else with > > > >> > > > >> | + make -j 8 -l 6 cc=ccache gcc > > > >> | make: *** No rule to make target 'gcc'. Stop. > > > >> > > > >> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> > > > >> --- > > > >> meta/recipes-extended/tzcode/tzcode-native_2017b.bb | 2 +- > > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > > >> > > > >> diff --git a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > > > b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > > > >> index 2084f79..165d2c6 100644 > > > >> --- a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > > > >> +++ b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb > > > >> @@ -18,7 +18,7 @@ S = "${WORKDIR}" > > > >> > > > >> inherit native > > > >> > > > >> -EXTRA_OEMAKE += "cc=${CC}" > > > >> +EXTRA_OEMAKE += "cc='${CC}'" > > > > > > > > Should these be double-quotes around ${CC}? > > > > > > I think this should work as such. > > > > Indeed, it’s expanded by bitbake, not the shell, so which quotes don’t > > matter in that regard, and it’s syntactically cleaner to use different > > quotes than those used for the variable as a whole. > > Unless ${CC} has shell variables inside for later expansion, isn't it? IMO doing so is a bug, as it relies on particulars of precisely when and where the shell variable is expanded. Doing so often results in having to escape it a precise number of times, depending on what context where you want it expanded. More trouble than it’s worth, in my opinion. *shrug* -- Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics [-- Attachment #2: Type: text/html, Size: 3565 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] tzcode-native: quote ${CC} 2017-05-18 18:19 ` Denys Dmytriyenko 2017-05-18 18:57 ` Khem Raj @ 2017-05-18 23:37 ` Enrico Scholz 2017-05-19 18:07 ` Denys Dmytriyenko 1 sibling, 1 reply; 10+ messages in thread From: Enrico Scholz @ 2017-05-18 23:37 UTC (permalink / raw) To: Denys Dmytriyenko; +Cc: openembedded-core Denys Dmytriyenko <denis@denix.org> writes: >> -EXTRA_OEMAKE += "cc=${CC}" >> +EXTRA_OEMAKE += "cc='${CC}'" > > Should these be double-quotes around ${CC}? I wrote it in this way: - to 60%, because '' is more correct than "" in this context (see below) - to 40%, because "" would clutter code too much and I can not say whether it must be quoted as \", \\" or whether perhaps plain " works too A yet more correct solution would be | export cc = "${CC}" in the recipe (outside of do_*()) and perhaps adding '-e' to EXTRA_OEMAKE. This handles additionally the case when 'CC' contains a single quote (which causes misbehavior in my patch). Double quotes are much more worse because CC must not contain '$', '`' or '\\' (which is not uncommon in flags like '-DFOO()=\"bar\"'). In OE, it is not expected that these characters are interpreted directly by the shell (${CC} is passed properly quoted in the environment). But all this does not matter... correct quoting is neglactted in OE and bitbake; when you are lucky, commands are written as "foo '%s'" % path. But nobody uses functions like 'pipes.quote()' or a non-shell variants like subprocess.call(['foo', path]). So, you can assume that '${FOO}' expands to the same value like "${FOO}". Enrico -- SIGMA Chemnitz GmbH Registergericht: Amtsgericht Chemnitz HRB 1750 Am Erlenwald 13 Geschaeftsfuehrer: Grit Freitag, Frank Pyritz 09128 Chemnitz ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] tzcode-native: quote ${CC} 2017-05-18 23:37 ` Enrico Scholz @ 2017-05-19 18:07 ` Denys Dmytriyenko 2017-05-19 18:09 ` Khem Raj 0 siblings, 1 reply; 10+ messages in thread From: Denys Dmytriyenko @ 2017-05-19 18:07 UTC (permalink / raw) To: Enrico Scholz; +Cc: openembedded-core On Fri, May 19, 2017 at 01:37:59AM +0200, Enrico Scholz wrote: > Denys Dmytriyenko <denis@denix.org> writes: > > >> -EXTRA_OEMAKE += "cc=${CC}" > >> +EXTRA_OEMAKE += "cc='${CC}'" > > > > Should these be double-quotes around ${CC}? > > I wrote it in this way: > > - to 60%, because '' is more correct than "" in this context (see below) > > - to 40%, because "" would clutter code too much and I can not say > whether it must be quoted as \", \\" or whether perhaps plain " works > too FWIW, bitbake handles nested quotes properly, no escaping needed: +EXTRA_OEMAKE += "cc="${CC}"" > A yet more correct solution would be > > | export cc = "${CC}" > > in the recipe (outside of do_*()) and perhaps adding '-e' to EXTRA_OEMAKE. > > > This handles additionally the case when 'CC' contains a single quote > (which causes misbehavior in my patch). > > Double quotes are much more worse because CC must not contain '$', '`' > or '\\' (which is not uncommon in flags like '-DFOO()=\"bar\"'). In OE, > it is not expected that these characters are interpreted directly by the > shell (${CC} is passed properly quoted in the environment). > > But all this does not matter... correct quoting is neglactted in OE and > bitbake; when you are lucky, commands are written as "foo '%s'" % path. > But nobody uses functions like 'pipes.quote()' or a non-shell variants > like subprocess.call(['foo', path]). > > So, you can assume that '${FOO}' expands to the same value like "${FOO}". Yes, bitbake variables will be expanded properly regardles of the quotes. Passing a shell variable may cause problems, but may not be a good practice in general. -- Denys ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] tzcode-native: quote ${CC} 2017-05-19 18:07 ` Denys Dmytriyenko @ 2017-05-19 18:09 ` Khem Raj 0 siblings, 0 replies; 10+ messages in thread From: Khem Raj @ 2017-05-19 18:09 UTC (permalink / raw) To: Denys Dmytriyenko Cc: Enrico Scholz, Patches and discussions about the oe-core layer On Fri, May 19, 2017 at 11:07 AM, Denys Dmytriyenko <denis@denix.org> wrote: > On Fri, May 19, 2017 at 01:37:59AM +0200, Enrico Scholz wrote: >> Denys Dmytriyenko <denis@denix.org> writes: >> >> >> -EXTRA_OEMAKE += "cc=${CC}" >> >> +EXTRA_OEMAKE += "cc='${CC}'" >> > >> > Should these be double-quotes around ${CC}? >> >> I wrote it in this way: >> >> - to 60%, because '' is more correct than "" in this context (see below) >> >> - to 40%, because "" would clutter code too much and I can not say >> whether it must be quoted as \", \\" or whether perhaps plain " works >> too > > FWIW, bitbake handles nested quotes properly, no escaping needed: > > +EXTRA_OEMAKE += "cc="${CC}"" > > >> A yet more correct solution would be >> >> | export cc = "${CC}" >> >> in the recipe (outside of do_*()) and perhaps adding '-e' to EXTRA_OEMAKE. >> >> >> This handles additionally the case when 'CC' contains a single quote >> (which causes misbehavior in my patch). >> >> Double quotes are much more worse because CC must not contain '$', '`' >> or '\\' (which is not uncommon in flags like '-DFOO()=\"bar\"'). In OE, >> it is not expected that these characters are interpreted directly by the >> shell (${CC} is passed properly quoted in the environment). >> >> But all this does not matter... correct quoting is neglactted in OE and >> bitbake; when you are lucky, commands are written as "foo '%s'" % path. >> But nobody uses functions like 'pipes.quote()' or a non-shell variants >> like subprocess.call(['foo', path]). >> >> So, you can assume that '${FOO}' expands to the same value like "${FOO}". > > Yes, bitbake variables will be expanded properly regardles of the quotes. > Passing a shell variable may cause problems, but may not be a good practice > in general. you can toggle '' and "" strings, will keep the readability and embed the string too > > -- > Denys > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] tzcode-native: quote ${CC}
@ 2017-06-23 11:19 Enrico Scholz
0 siblings, 0 replies; 10+ messages in thread
From: Enrico Scholz @ 2017-06-23 11:19 UTC (permalink / raw)
To: openembedded-core; +Cc: Enrico Scholz
build fails else with
| + make -j 8 -l 6 cc=ccache gcc
| make: *** No rule to make target 'gcc'. Stop.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
meta/recipes-extended/tzcode/tzcode-native_2017b.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb
index 2084f79..165d2c6 100644
--- a/meta/recipes-extended/tzcode/tzcode-native_2017b.bb
+++ b/meta/recipes-extended/tzcode/tzcode-native_2017b.bb
@@ -18,7 +18,7 @@ S = "${WORKDIR}"
inherit native
-EXTRA_OEMAKE += "cc=${CC}"
+EXTRA_OEMAKE += "cc='${CC}'"
do_install () {
install -d ${D}${bindir}/
--
2.9.4
^ permalink raw reply related [flat|nested] 10+ messages in threadend of thread, other threads:[~2017-06-23 11:36 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 17:34 [PATCH] tzcode-native: quote ${CC} Enrico Scholz
2017-05-18 18:19 ` Denys Dmytriyenko
2017-05-18 18:57 ` Khem Raj
2017-05-18 21:37 ` Christopher Larson
2017-05-18 21:54 ` Denys Dmytriyenko
2017-05-18 22:38 ` Christopher Larson
2017-05-18 23:37 ` Enrico Scholz
2017-05-19 18:07 ` Denys Dmytriyenko
2017-05-19 18:09 ` Khem Raj
-- strict thread matches above, loose matches on Subject: below --
2017-06-23 11:19 Enrico Scholz
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.