All of lore.kernel.org
 help / color / mirror / Atom feed
* avr32-*-gdb requires modifying gdb.inc / gdb-cross.inc
@ 2008-04-09 14:20 Geoffrey Wossum
  2008-04-09 15:07 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Geoffrey Wossum @ 2008-04-09 14:20 UTC (permalink / raw)
  To: openembedded-devel

Hi all,

I currently have a BitBake recipe that can build gdb 6.4 for the AVR32, and 
I'm about to make one that can build the gdb 6.7 using Atmel's newly released 
patches for the AVR32.

According to this page, http://avr32linux.org/twiki/bin/view/Main/GDBPatches, 
you must do some extra steps to build gdb if you patch it.  My experience 
with Atmel's gdb 6.4 release was that even though they claim you don't have 
to do these steps if you use the full source tarball, you have to anyway.

This requires modifying gdb.inc / gdb-cross.inc.  I think the modifications 
are safe for all platforms, but I was hoping someone could comment before I 
roll a patchset to submit.  

TIA,
---
Geoffrey


--- packages/gdb/gdb-cross.inc  2008-03-04 14:30:27.000000000 -0600
+++ /home/geoff/lrs/playpaq/org.openembedded.dev/packages/gdb/gdb-cross.inc    
2008-04-09 09:09:50.000000000 -0500
@@ -10,9 +10,38 @@ do_configure () {
 # override this function to avoid the autoconf/automake/aclocal/autoheader
 # calls for now
        (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+
+
+        # This stuff is required to build Atmel's patched gdb for the AVR32.
+        # See http://avr32linux.org/twiki/bin/view/Main/GDBPatches
+        (cd ${S}/bfd && autoreconf) || die "failure running autoreconf in bfd/"
+        (cd ${S}/opcodes && autoreconf) || die "failure running autoreconf in opcodes/"
+
        oe_runconf
+
+
+        # Also required according to the avr32linux GDBPatches page
+        make configure-bfd || die "Error running configure-bfd"
+        (cd bfd && make headers && cd "$OLDPWD") || \
+                die "error running 'make headers' in bfd"
 }

 do_stage () {
+        # Left to fend for itself, "make install" will fail, saying that
+        # makeinfo is missing.  I don't know if this is because my system
+        # makeinfo isn't available inside the bitbake build, or if this is
+        # due to the texinfo version detection bug that has plagued some
+        # packages (see https://bugzilla.redhat.com/show_bug.cgi?id=345621).
+        # Either way, we want to keep "make install"from wanting to run
+        # makeinfo.  By copying over all the .info files before hand,
+        # the files will exist in the build tree and have shiny new
+        # timestamps, thus preventing "make install" from using makeinfo.
+        cd ${S}
+        for infofile in `find . -name "*.info"`; do
+            cp "$infofile" ${B}/"$infofile"
+        done
+        cd "$OLDPWD"
+
+
        oe_runmake install
 }







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

* Re: avr32-*-gdb requires modifying gdb.inc / gdb-cross.inc
  2008-04-09 14:20 avr32-*-gdb requires modifying gdb.inc / gdb-cross.inc Geoffrey Wossum
@ 2008-04-09 15:07 ` Khem Raj
  2008-04-09 15:49   ` Geoffrey Wossum
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2008-04-09 15:07 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3358 bytes --]

Hi Geoffrey

I think it will be good to make this step arch specific to AVR only.
and best is to identify what changes are done in configure that needs it
to be regenerated. You can regenerate these and include them in the
patch itself instead of doing it at compile time.

Thanks

-Khem

On Wed, 2008-04-09 at 09:20 -0500, Geoffrey Wossum wrote:
> Hi all,
> 
> I currently have a BitBake recipe that can build gdb 6.4 for the AVR32, and 
> I'm about to make one that can build the gdb 6.7 using Atmel's newly released 
> patches for the AVR32.
> 
> According to this page, http://avr32linux.org/twiki/bin/view/Main/GDBPatches, 
> you must do some extra steps to build gdb if you patch it.  My experience 
> with Atmel's gdb 6.4 release was that even though they claim you don't have 
> to do these steps if you use the full source tarball, you have to anyway.
> 
> This requires modifying gdb.inc / gdb-cross.inc.  I think the modifications 
> are safe for all platforms, but I was hoping someone could comment before I 
> roll a patchset to submit.  
> 
> TIA,
> ---
> Geoffrey
> 
> 
> --- packages/gdb/gdb-cross.inc  2008-03-04 14:30:27.000000000 -0600
> +++ /home/geoff/lrs/playpaq/org.openembedded.dev/packages/gdb/gdb-cross.inc    
> 2008-04-09 09:09:50.000000000 -0500
> @@ -10,9 +10,38 @@ do_configure () {
>  # override this function to avoid the autoconf/automake/aclocal/autoheader
>  # calls for now
>         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
> +
> +
> +        # This stuff is required to build Atmel's patched gdb for the AVR32.
> +        # See http://avr32linux.org/twiki/bin/view/Main/GDBPatches
> +        (cd ${S}/bfd && autoreconf) || die "failure running autoreconf in bfd/"
> +        (cd ${S}/opcodes && autoreconf) || die "failure running autoreconf in opcodes/"
> +
>         oe_runconf
> +
> +
> +        # Also required according to the avr32linux GDBPatches page
> +        make configure-bfd || die "Error running configure-bfd"
> +        (cd bfd && make headers && cd "$OLDPWD") || \
> +                die "error running 'make headers' in bfd"
>  }
> 
>  do_stage () {
> +        # Left to fend for itself, "make install" will fail, saying that
> +        # makeinfo is missing.  I don't know if this is because my system
> +        # makeinfo isn't available inside the bitbake build, or if this is
> +        # due to the texinfo version detection bug that has plagued some
> +        # packages (see https://bugzilla.redhat.com/show_bug.cgi?id=345621).
> +        # Either way, we want to keep "make install"from wanting to run
> +        # makeinfo.  By copying over all the .info files before hand,
> +        # the files will exist in the build tree and have shiny new
> +        # timestamps, thus preventing "make install" from using makeinfo.
> +        cd ${S}
> +        for infofile in `find . -name "*.info"`; do
> +            cp "$infofile" ${B}/"$infofile"
> +        done
> +        cd "$OLDPWD"
> +
> +
>         oe_runmake install
>  }
> 
> 
> 
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
-- 
Khem Raj <raj.khem@gmail.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 196 bytes --]

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

* Re: avr32-*-gdb requires modifying gdb.inc / gdb-cross.inc
  2008-04-09 15:07 ` Khem Raj
@ 2008-04-09 15:49   ` Geoffrey Wossum
  0 siblings, 0 replies; 3+ messages in thread
From: Geoffrey Wossum @ 2008-04-09 15:49 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 09 April 2008 10:07:21 am Khem Raj wrote:
> Hi Geoffrey
>
> I think it will be good to make this step arch specific to AVR only.
> and best is to identify what changes are done in configure that needs it
> to be regenerated. You can regenerate these and include them in the
> patch itself instead of doing it at compile time.

Here's Atmel's reasoning for not including all the generated source / 
autotools cruft in the patch:
"The reason why these changes aren't included with the patch is that it would 
have increased its size by several megabytes, and the actual AVR32 changes 
would have been lost in the noise."

Those are good points on their part, plus I don't want to have to create and 
maintain my own patch.  When Atmel comes out with their next gdb, I don't 
want to have to create a new patch based on theirs to include in OE.  I want 
to download their patch and copy it into the OE tree.

This leaves running these extra steps only for the AVR32.  What would I put 
around these extra steps in do_configure() and do_stage() so that they are 
only run when building for the AVR32.

---
Geoffrey



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

end of thread, other threads:[~2008-04-09 15:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-09 14:20 avr32-*-gdb requires modifying gdb.inc / gdb-cross.inc Geoffrey Wossum
2008-04-09 15:07 ` Khem Raj
2008-04-09 15:49   ` Geoffrey Wossum

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.