All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] ntp: rename patches to follow BR guidelines
@ 2014-07-18  3:56 Danomi Manchego
  2014-07-18  3:56 ` [Buildroot] [PATCH 2/2] ntp: prevent keyword-gen failure during ntp_keyword.h check Danomi Manchego
  2014-07-18 19:25 ` [Buildroot] [PATCH 1/2] ntp: rename patches to follow BR guidelines Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Danomi Manchego @ 2014-07-18  3:56 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
 .../{ntp-adjtimex.patch => ntp-001-adjtimex.patch} |    0
 package/ntp/{ntp-nano.patch => ntp-002-nano.patch} |    0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename package/ntp/{ntp-adjtimex.patch => ntp-001-adjtimex.patch} (100%)
 rename package/ntp/{ntp-nano.patch => ntp-002-nano.patch} (100%)

diff --git a/package/ntp/ntp-adjtimex.patch b/package/ntp/ntp-001-adjtimex.patch
similarity index 100%
rename from package/ntp/ntp-adjtimex.patch
rename to package/ntp/ntp-001-adjtimex.patch
diff --git a/package/ntp/ntp-nano.patch b/package/ntp/ntp-002-nano.patch
similarity index 100%
rename from package/ntp/ntp-nano.patch
rename to package/ntp/ntp-002-nano.patch
-- 
1.7.9.5

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

* [Buildroot] [PATCH 2/2] ntp: prevent keyword-gen failure during ntp_keyword.h check
  2014-07-18  3:56 [Buildroot] [PATCH 1/2] ntp: rename patches to follow BR guidelines Danomi Manchego
@ 2014-07-18  3:56 ` Danomi Manchego
  2014-07-18 19:26   ` Thomas Petazzoni
  2014-07-18 19:25 ` [Buildroot] [PATCH 1/2] ntp: rename patches to follow BR guidelines Thomas Petazzoni
  1 sibling, 1 reply; 6+ messages in thread
From: Danomi Manchego @ 2014-07-18  3:56 UTC (permalink / raw)
  To: buildroot

During the first compile, the keyword-gen check is not run.  However,
it gets run on the first rebuild.  Because we are cross-compiling, the
keyword-gen can't run on the host.  Since this is only used to check if
ntp_keyword.h is up to date, we simply drop the check altogether.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>

---

Note: "the first rebuild" means "the first 'make ntp-rebuild'"
---
 package/ntp/ntp-003-skip-keyword-check.patch |   56 ++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 package/ntp/ntp-003-skip-keyword-check.patch

diff --git a/package/ntp/ntp-003-skip-keyword-check.patch b/package/ntp/ntp-003-skip-keyword-check.patch
new file mode 100644
index 0000000..dc09fbc
--- /dev/null
+++ b/package/ntp/ntp-003-skip-keyword-check.patch
@@ -0,0 +1,56 @@
+ntp: prevent keyword-gen failure during ntp_keyword.h check
+
+During the first compile, the keyword-gen check is not run.  However,
+it gets run on the first rebuild.  Because we are cross-compiling, the
+keyword-gen can't run on the host.  Since this is only used to check if
+ntp_keyword.h is up to date, we simply drop the check altogether.
+
+Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
+
+
+diff -purN a/ntpd/Makefile.am b/ntpd/Makefile.am
+--- a/ntpd/Makefile.am	2014-07-16 15:16:30.650280205 -0400
++++ b/ntpd/Makefile.am	2014-07-16 15:24:57.256527446 -0400
+@@ -213,17 +213,8 @@ libntpd_a_SOURCES =		\
+ 	refclock_zyfer.c	\
+ 	$(NULL)
+ 
+-k-g-u-submake: keyword-gen
+-	./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
+-	@grep -v diff_ignore_line < k-g.out > cmp1
+-	@grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
+-	@cmp cmp1 cmp2 > /dev/null || \
+-		{ mv -f k-g.out $(srcdir)/ntp_keyword.h && \
+-		  echo 'Generated changed ntp_keyword.h.' ;}
+-	@[ ! -f k-g.out ] || \
+-		{ rm k-g.out && echo 'ntp_keyword.h is up to date.' ;}
+-	@rm cmp1 cmp2
+-	@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
++k-g-u-submake:
++	# Skip keyword-gen check due to cross-compile
+ 
+ $(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
+ 	$(MAKE) k-g-u-submake	# avoid explicit dependency
+diff -purN a/ntpd/Makefile.in b/ntpd/Makefile.in
+--- a/ntpd/Makefile.in	2014-07-16 15:16:30.650280205 -0400
++++ b/ntpd/Makefile.in	2014-07-16 15:25:08.764962071 -0400
+@@ -1182,17 +1182,8 @@ vphack_after:
+ check-local: @MAKE_CHECK_Y2K@ $(CHECK_SAVECONFIG)
+ 	test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
+ 
+-k-g-u-submake: keyword-gen
+-	./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
+-	@grep -v diff_ignore_line < k-g.out > cmp1
+-	@grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
+-	@cmp cmp1 cmp2 > /dev/null || \
+-		{ mv -f k-g.out $(srcdir)/ntp_keyword.h && \
+-		  echo 'Generated changed ntp_keyword.h.' ;}
+-	@[ ! -f k-g.out ] || \
+-		{ rm k-g.out && echo 'ntp_keyword.h is up to date.' ;}
+-	@rm cmp1 cmp2
+-	@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
++k-g-u-submake:
++	# Skip keyword-gen check due to cross-compile
+ 
+ $(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
+ 	$(MAKE) k-g-u-submake	# avoid explicit dependency
-- 
1.7.9.5

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

* [Buildroot] [PATCH 1/2] ntp: rename patches to follow BR guidelines
  2014-07-18  3:56 [Buildroot] [PATCH 1/2] ntp: rename patches to follow BR guidelines Danomi Manchego
  2014-07-18  3:56 ` [Buildroot] [PATCH 2/2] ntp: prevent keyword-gen failure during ntp_keyword.h check Danomi Manchego
@ 2014-07-18 19:25 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-07-18 19:25 UTC (permalink / raw)
  To: buildroot

Dear Danomi Manchego,

On Thu, 17 Jul 2014 23:56:53 -0400, Danomi Manchego wrote:
> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
> ---
>  .../{ntp-adjtimex.patch => ntp-001-adjtimex.patch} |    0
>  package/ntp/{ntp-nano.patch => ntp-002-nano.patch} |    0
>  2 files changed, 0 insertions(+), 0 deletions(-)
>  rename package/ntp/{ntp-adjtimex.patch => ntp-001-adjtimex.patch} (100%)
>  rename package/ntp/{ntp-nano.patch => ntp-002-nano.patch} (100%)

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 2/2] ntp: prevent keyword-gen failure during ntp_keyword.h check
  2014-07-18  3:56 ` [Buildroot] [PATCH 2/2] ntp: prevent keyword-gen failure during ntp_keyword.h check Danomi Manchego
@ 2014-07-18 19:26   ` Thomas Petazzoni
  2014-07-19  0:52     ` Danomi Manchego
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-07-18 19:26 UTC (permalink / raw)
  To: buildroot

Dear Danomi Manchego,

On Thu, 17 Jul 2014 23:56:54 -0400, Danomi Manchego wrote:
> During the first compile, the keyword-gen check is not run.  However,
> it gets run on the first rebuild.  Because we are cross-compiling, the
> keyword-gen can't run on the host.  Since this is only used to check if
> ntp_keyword.h is up to date, we simply drop the check altogether.
> 
> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>

I haven't applied this one, because I'm not entirely satisfied by the
explanation here. Why isn't the keyword-gen check executed on the first
run? I did some testing, and I indeed don't see the rule about
ntp_keyword.h being evaluated on the first build. Do you have more
details about what makes the difference between the first and
subsequent builds?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 2/2] ntp: prevent keyword-gen failure during ntp_keyword.h check
  2014-07-18 19:26   ` Thomas Petazzoni
@ 2014-07-19  0:52     ` Danomi Manchego
  2014-07-19  8:38       ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Danomi Manchego @ 2014-07-19  0:52 UTC (permalink / raw)
  To: buildroot

On Fri, Jul 18, 2014 at 3:26 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Danomi Manchego,
>
> On Thu, 17 Jul 2014 23:56:54 -0400, Danomi Manchego wrote:
>> During the first compile, the keyword-gen check is not run.  However,
>> it gets run on the first rebuild.  Because we are cross-compiling, the
>> keyword-gen can't run on the host.  Since this is only used to check if
>> ntp_keyword.h is up to date, we simply drop the check altogether.
>>
>> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
>
> I haven't applied this one, because I'm not entirely satisfied by the
> explanation here. Why isn't the keyword-gen check executed on the first
> run? I did some testing, and I indeed don't see the rule about
> ntp_keyword.h being evaluated on the first build. Do you have more
> details about what makes the difference between the first and
> subsequent builds?

No.  Stranger yet, when the patch is applied, I found that the
keyword-gen check is only run on the *first* ntp-rebuild.  Further
ntp-rebuilds do not cause the check to re-occur.

But anyway, I didn't notice any indication that the keyword-gen would
be compiled with a HOSTCC, so I reasoned that if it's cross-compiled,
then it shouldn't be run on the build machine in any circumstance.  So
I didn't investigate further.

Danomi -

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

* [Buildroot] [PATCH 2/2] ntp: prevent keyword-gen failure during ntp_keyword.h check
  2014-07-19  0:52     ` Danomi Manchego
@ 2014-07-19  8:38       ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-07-19  8:38 UTC (permalink / raw)
  To: buildroot

Dear Danomi Manchego,

On Fri, 18 Jul 2014 20:52:18 -0400, Danomi Manchego wrote:

> > I haven't applied this one, because I'm not entirely satisfied by the
> > explanation here. Why isn't the keyword-gen check executed on the first
> > run? I did some testing, and I indeed don't see the rule about
> > ntp_keyword.h being evaluated on the first build. Do you have more
> > details about what makes the difference between the first and
> > subsequent builds?
> 
> No.  Stranger yet, when the patch is applied, I found that the
> keyword-gen check is only run on the *first* ntp-rebuild.  Further
> ntp-rebuilds do not cause the check to re-occur.
> 
> But anyway, I didn't notice any indication that the keyword-gen would
> be compiled with a HOSTCC, so I reasoned that if it's cross-compiled,
> then it shouldn't be run on the build machine in any circumstance.  So
> I didn't investigate further.

Right, but the ntp source code comes with a pre-generated result of
this keyword-gen program, which allows the first build to work
properly. So it'd be good to understand why this logic used for the
first build doesn't work for the subsequent builds.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2014-07-19  8:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-18  3:56 [Buildroot] [PATCH 1/2] ntp: rename patches to follow BR guidelines Danomi Manchego
2014-07-18  3:56 ` [Buildroot] [PATCH 2/2] ntp: prevent keyword-gen failure during ntp_keyword.h check Danomi Manchego
2014-07-18 19:26   ` Thomas Petazzoni
2014-07-19  0:52     ` Danomi Manchego
2014-07-19  8:38       ` Thomas Petazzoni
2014-07-18 19:25 ` [Buildroot] [PATCH 1/2] ntp: rename patches to follow BR guidelines Thomas Petazzoni

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.