Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] GDB attempting to apply patches severla times
@ 2008-08-14 19:41 Christopher Taylor
  2008-08-14 19:45 ` Christopher Taylor
  2008-08-24  7:53 ` Peter Korsgaard
  0 siblings, 2 replies; 8+ messages in thread
From: Christopher Taylor @ 2008-08-14 19:41 UTC (permalink / raw)
  To: buildroot

Has anyone noticed that buildroot attempts to apply the GDB  patches twice?

Seems like this only happens when I have buildroot build GDB for the
target (as a server and regularly) and for the host.  When I take the
host out, it seems to work ok....

-Chris

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

* [Buildroot] GDB attempting to apply patches severla times
  2008-08-14 19:41 [Buildroot] GDB attempting to apply patches severla times Christopher Taylor
@ 2008-08-14 19:45 ` Christopher Taylor
  2008-08-14 19:56   ` Christopher Taylor
  2008-08-24  7:53 ` Peter Korsgaard
  1 sibling, 1 reply; 8+ messages in thread
From: Christopher Taylor @ 2008-08-14 19:45 UTC (permalink / raw)
  To: buildroot

> Has anyone noticed that buildroot attempts to apply the GDB  patches twice?
>
> Seems like this only happens when I have buildroot build GDB for the
> target (as a server and regularly) and for the host.  When I take the
> host out, it seems to work ok....


Should have mentioned that it looks like it may have something to do
with how the gdb.mk file is layed out and buildroot references it.
Specifically, the section below from the gdb.mk file:

gdb-unpacked: $(GDB_DIR)/.unpacked
$(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE)
        mkdir -p $(TOOL_BUILD_DIR)
        $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOL_BUILD_DIR)
$(TAR_OPTIONS) -
ifeq ($(GDB_VERSION),snapshot)
        GDB_REAL_DIR=$(shell \
                tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
        ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf
$(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
endif
        toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
        $(CONFIG_UPDATE) $(GDB_DIR)
        touch $@

gdb-patched: $(GDB_DIR)/.unpacked
$(GDB_DIR)/.patched: $(GDB_DIR)/.unpacked
        toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
        $(CONFIG_UPDATE) $(GDB_DIR)
        touch $@

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

* [Buildroot] GDB attempting to apply patches severla times
  2008-08-14 19:45 ` Christopher Taylor
@ 2008-08-14 19:56   ` Christopher Taylor
  2008-08-14 20:51     ` Markus Heidelberg
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Taylor @ 2008-08-14 19:56 UTC (permalink / raw)
  To: buildroot

> Should have mentioned that it looks like it may have something to do
> with how the gdb.mk file is layed out and buildroot references it.
> Specifically, the section below from the gdb.mk file:

does the attached patch work for anyone besides me?

-Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb.mk.patch
Type: text/x-patch
Size: 555 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20080814/42770e45/attachment.bin 

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

* [Buildroot] GDB attempting to apply patches severla times
  2008-08-14 19:56   ` Christopher Taylor
@ 2008-08-14 20:51     ` Markus Heidelberg
  2008-08-14 21:19       ` Christopher Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Markus Heidelberg @ 2008-08-14 20:51 UTC (permalink / raw)
  To: buildroot

Christopher Taylor, 14.08.2008:
> 
> does the attached patch work for anyone besides me?

I think there is another issue in the file: when building for the server or
the host, then it's not patched anymore now. Only when building for the
target, the source would have been patched. Perhaps the patching in the
configuring target was a bad fix?

Here's the patch without having tested anything:

fixes:
* remove patching in the unpacking target (your change)
* also patch before configuring the server or host
* correct prerequisite for target gdb-patched

diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index 6220cd9..d156758 100644
--- a/toolchain/gdb/gdb.mk
+++ b/toolchain/gdb/gdb.mk
@@ -57,11 +57,8 @@ ifeq ($(GDB_VERSION),snapshot)
 		tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
 	ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
 endif
-	toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
-	$(CONFIG_UPDATE) $(GDB_DIR)
-	touch $@
 
-gdb-patched: $(GDB_DIR)/.unpacked
+gdb-patched: $(GDB_DIR)/.patched
 $(GDB_DIR)/.patched: $(GDB_DIR)/.unpacked
 	toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
 	$(CONFIG_UPDATE) $(GDB_DIR)
@@ -140,7 +137,7 @@ gdb_target-dirclean:
 
 GDB_SERVER_DIR:=$(BUILD_DIR)/gdbserver-$(GDB_VERSION)
 
-$(GDB_SERVER_DIR)/.configured: $(GDB_DIR)/.unpacked
+$(GDB_SERVER_DIR)/.configured: $(GDB_DIR)/.patched
 	mkdir -p $(GDB_SERVER_DIR)
 	(cd $(GDB_SERVER_DIR); \
 		$(TARGET_CONFIGURE_OPTS) \
@@ -198,7 +195,7 @@ gdbserver-dirclean:
 
 GDB_HOST_DIR:=$(TOOL_BUILD_DIR)/gdbhost-$(GDB_VERSION)
 
-$(GDB_HOST_DIR)/.configured: $(GDB_DIR)/.unpacked
+$(GDB_HOST_DIR)/.configured: $(GDB_DIR)/.patched
 	mkdir -p $(GDB_HOST_DIR)
 	(cd $(GDB_HOST_DIR); \
 		gdb_cv_func_sigsetjmp=yes \

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

* [Buildroot] GDB attempting to apply patches severla times
  2008-08-14 20:51     ` Markus Heidelberg
@ 2008-08-14 21:19       ` Christopher Taylor
  2008-08-14 21:32         ` Christopher Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Christopher Taylor @ 2008-08-14 21:19 UTC (permalink / raw)
  To: buildroot

good call ....

wondering if this a gdb or a br issue ....

-Chris

On Thu, Aug 14, 2008 at 4:51 PM, Markus Heidelberg
<markus.heidelberg@web.de> wrote:
> Christopher Taylor, 14.08.2008:
>>
>> does the attached patch work for anyone besides me?
>
> I think there is another issue in the file: when building for the server or
> the host, then it's not patched anymore now. Only when building for the
> target, the source would have been patched. Perhaps the patching in the
> configuring target was a bad fix?
>
> Here's the patch without having tested anything:
>
> fixes:
> * remove patching in the unpacking target (your change)
> * also patch before configuring the server or host
> * correct prerequisite for target gdb-patched
>
> diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
> index 6220cd9..d156758 100644
> --- a/toolchain/gdb/gdb.mk
> +++ b/toolchain/gdb/gdb.mk
> @@ -57,11 +57,8 @@ ifeq ($(GDB_VERSION),snapshot)
>                tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
>        ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
>  endif
> -       toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
> -       $(CONFIG_UPDATE) $(GDB_DIR)
> -       touch $@
>
> -gdb-patched: $(GDB_DIR)/.unpacked
> +gdb-patched: $(GDB_DIR)/.patched
>  $(GDB_DIR)/.patched: $(GDB_DIR)/.unpacked
>        toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
>        $(CONFIG_UPDATE) $(GDB_DIR)
> @@ -140,7 +137,7 @@ gdb_target-dirclean:
>
>  GDB_SERVER_DIR:=$(BUILD_DIR)/gdbserver-$(GDB_VERSION)
>
> -$(GDB_SERVER_DIR)/.configured: $(GDB_DIR)/.unpacked
> +$(GDB_SERVER_DIR)/.configured: $(GDB_DIR)/.patched
>        mkdir -p $(GDB_SERVER_DIR)
>        (cd $(GDB_SERVER_DIR); \
>                $(TARGET_CONFIGURE_OPTS) \
> @@ -198,7 +195,7 @@ gdbserver-dirclean:
>
>  GDB_HOST_DIR:=$(TOOL_BUILD_DIR)/gdbhost-$(GDB_VERSION)
>
> -$(GDB_HOST_DIR)/.configured: $(GDB_DIR)/.unpacked
> +$(GDB_HOST_DIR)/.configured: $(GDB_DIR)/.patched
>        mkdir -p $(GDB_HOST_DIR)
>        (cd $(GDB_HOST_DIR); \
>                gdb_cv_func_sigsetjmp=yes \
>
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
>

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

* [Buildroot] GDB attempting to apply patches severla times
  2008-08-14 21:19       ` Christopher Taylor
@ 2008-08-14 21:32         ` Christopher Taylor
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher Taylor @ 2008-08-14 21:32 UTC (permalink / raw)
  To: buildroot

for some reason, br wants to rebuild gdb every time now :/  I'll
fiddle with this some more tomorrow.

-Chris

O

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

* [Buildroot] GDB attempting to apply patches severla times
@ 2008-08-15  6:09 markus.heidelberg at web.de
  0 siblings, 0 replies; 8+ messages in thread
From: markus.heidelberg at web.de @ 2008-08-15  6:09 UTC (permalink / raw)
  To: buildroot

> > diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
> > index 6220cd9..d156758 100644
> > --- a/toolchain/gdb/gdb.mk
> > +++ b/toolchain/gdb/gdb.mk
> > @@ -57,11 +57,8 @@ ifeq ($(GDB_VERSION),snapshot)
> >                tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
> >        ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
> >  endif
> > -       toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
> > -       $(CONFIG_UPDATE) $(GDB_DIR)
> > -       touch $@

Oh, we don't want to delete the last command "touch $@". That's the reason why br wants to rebuild gdb every time now, br thinks it has never been unpacked. But I think that should have occured with your patch the same way already, I have just taken this part from your patch. However...

Markus
_______________________________________________________________________
EINE F?R ALLE: die kostenlose WEB.DE-Plattform f?r Freunde und Deine
Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/?kid=kid at mf2

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

* [Buildroot] GDB attempting to apply patches severla times
  2008-08-14 19:41 [Buildroot] GDB attempting to apply patches severla times Christopher Taylor
  2008-08-14 19:45 ` Christopher Taylor
@ 2008-08-24  7:53 ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2008-08-24  7:53 UTC (permalink / raw)
  To: buildroot

>>>>> "Christopher" == Christopher Taylor <chtaylo3@gmail.com> writes:

Hi,

 Christopher> Has anyone noticed that buildroot attempts to apply the
 Christopher> GDB patches twice?  Seems like this only happens when I
 Christopher> have buildroot build GDB for the target (as a server and
 Christopher> regularly) and for the host.  When I take the host out,
 Christopher> it seems to work ok....

Sorry about that - Got broken in r22624 and is now fixed in r23193.

Thanks!

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2008-08-24  7:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-14 19:41 [Buildroot] GDB attempting to apply patches severla times Christopher Taylor
2008-08-14 19:45 ` Christopher Taylor
2008-08-14 19:56   ` Christopher Taylor
2008-08-14 20:51     ` Markus Heidelberg
2008-08-14 21:19       ` Christopher Taylor
2008-08-14 21:32         ` Christopher Taylor
2008-08-24  7:53 ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2008-08-15  6:09 markus.heidelberg at web.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox