All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] core: detect and reject build paths which contain an '@'
@ 2018-08-20 20:49 Yann E. MORIN
  2018-10-20 18:50 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2018-08-20 20:49 UTC (permalink / raw)
  To: buildroot

gcc does not build when the srcdir path contains a '@', because that
path is then substitued in a texi file as argument to an @include
directive. But then, the '@' in the path will start a command evaluation
of its own, thus breaking the build. For example, with a $(O) path set
to /home/ymorin/dev/buildroot/O/to at ti :

    perl ../../gcc/../contrib/texi2pod.pl ../../gcc/doc/invoke.texi > gcc.pod
    ../../gcc/doc/invoke.texi:1678: unknown command `ti'
    ../../gcc/doc/invoke.texi:1678: @include: could not find /home/ymorin/dev/buildroot/O/to/build/host-gcc-initial-7.3.0/build/gcc/../../gcc/../libiberty/at-file.texi

Reported-by: c32 on IRC
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index d1ee9293a2..8a2b614b81 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,11 @@ override O := $(patsubst %/,%,$(patsubst %.,%,$(O)))
 # avoid empty CANONICAL_O in case on non-existing entry.
 CANONICAL_O := $(shell mkdir -p $(O) >/dev/null 2>&1)$(realpath $(O))
 
+# gcc fails to build when the srcdir contains a '@'
+ifneq ($(CANONICAL_O),$(subst @,,$(CANONICAL_O)))
+$(error The build directory can not contain a '@')
+endif
+
 CANONICAL_CURDIR = $(realpath $(CURDIR))
 
 REQ_UMASK = 0022
-- 
2.14.1

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

* [Buildroot] [PATCH] core: detect and reject build paths which contain an '@'
  2018-08-20 20:49 [Buildroot] [PATCH] core: detect and reject build paths which contain an '@' Yann E. MORIN
@ 2018-10-20 18:50 ` Peter Korsgaard
  2018-10-24 12:30   ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2018-10-20 18:50 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > gcc does not build when the srcdir path contains a '@', because that
 > path is then substitued in a texi file as argument to an @include
 > directive. But then, the '@' in the path will start a command evaluation
 > of its own, thus breaking the build. For example, with a $(O) path set
 > to /home/ymorin/dev/buildroot/O/to at ti :

 >     perl ../../gcc/../contrib/texi2pod.pl ../../gcc/doc/invoke.texi > gcc.pod
 >     ../../gcc/doc/invoke.texi:1678: unknown command `ti'
 >     ../../gcc/doc/invoke.texi:1678: @include: could not find /home/ymorin/dev/buildroot/O/to/build/host-gcc-initial-7.3.0/build/gcc/../../gcc/../libiberty/at-file.texi

 > Reported-by: c32 on IRC
 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > ---
 >  Makefile | 5 +++++
 >  1 file changed, 5 insertions(+)

 > diff --git a/Makefile b/Makefile
 > index d1ee9293a2..8a2b614b81 100644
 > --- a/Makefile
 > +++ b/Makefile
 > @@ -60,6 +60,11 @@ override O := $(patsubst %/,%,$(patsubst %.,%,$(O)))
 >  # avoid empty CANONICAL_O in case on non-existing entry.
 >  CANONICAL_O := $(shell mkdir -p $(O) >/dev/null 2>&1)$(realpath $(O))
 
 > +# gcc fails to build when the srcdir contains a '@'
 > +ifneq ($(CANONICAL_O),$(subst @,,$(CANONICAL_O)))

I find findstring easier to read, so I've changed it to:

ifneq ($(findstring @,$(CANONICAL_O)),)

And committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] core: detect and reject build paths which contain an '@'
  2018-10-20 18:50 ` Peter Korsgaard
@ 2018-10-24 12:30   ` Peter Korsgaard
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-10-24 12:30 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
 >> gcc does not build when the srcdir path contains a '@', because that
 >> path is then substitued in a texi file as argument to an @include
 >> directive. But then, the '@' in the path will start a command evaluation
 >> of its own, thus breaking the build. For example, with a $(O) path set
 >> to /home/ymorin/dev/buildroot/O/to at ti :

 >> perl ../../gcc/../contrib/texi2pod.pl ../../gcc/doc/invoke.texi > gcc.pod
 >> ../../gcc/doc/invoke.texi:1678: unknown command `ti'
 >> ../../gcc/doc/invoke.texi:1678: @include: could not find /home/ymorin/dev/buildroot/O/to/build/host-gcc-initial-7.3.0/build/gcc/../../gcc/../libiberty/at-file.texi

 >> Reported-by: c32 on IRC
 >> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 >> ---
 >> Makefile | 5 +++++
 >> 1 file changed, 5 insertions(+)

 >> diff --git a/Makefile b/Makefile
 >> index d1ee9293a2..8a2b614b81 100644
 >> --- a/Makefile
 >> +++ b/Makefile
 >> @@ -60,6 +60,11 @@ override O := $(patsubst %/,%,$(patsubst %.,%,$(O)))
 >> # avoid empty CANONICAL_O in case on non-existing entry.
 >> CANONICAL_O := $(shell mkdir -p $(O) >/dev/null 2>&1)$(realpath $(O))
 
 >> +# gcc fails to build when the srcdir contains a '@'
 >> +ifneq ($(CANONICAL_O),$(subst @,,$(CANONICAL_O)))

 > I find findstring easier to read, so I've changed it to:

 > ifneq ($(findstring @,$(CANONICAL_O)),)

 > And committed, thanks.

Committed to 2018.02.x and 2018.08.x with that change, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2018-10-24 12:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20 20:49 [Buildroot] [PATCH] core: detect and reject build paths which contain an '@' Yann E. MORIN
2018-10-20 18:50 ` Peter Korsgaard
2018-10-24 12:30   ` Peter Korsgaard

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.