public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/13160] New: bfin simulator does not build on Darwin
@ 2011-09-07  0:20 chrisj at rtems dot org
  2015-03-09  3:52 ` [Bug sim/13160] " vapier at gentoo dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: chrisj at rtems dot org @ 2011-09-07  0:20 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13160

             Bug #: 13160
           Summary: bfin simulator does not build on Darwin
           Product: gdb
           Version: 7.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
        AssignedTo: unassigned@sourceware.org
        ReportedBy: chrisj@rtems.org
    Classification: Unclassified


The sim/bfin/Makefile.in contains a COMMON_POST_CONFIG_FRAG to do with
$(srcdir)/linux-fixed-code.h. The sed part of the Makefile command does not
work on Darwin. The file name needs to be at the end and it complains about the
final 'p'.

I had a quick look at the command running on a recent Linux and there is no
output generated. It looks like this does nothing.

Configured as:

$ ../../1.0/gdb-7.3/configure --build=i386-apple-darwin10.6.0
--host=i386-apple-darwin10.6.0 --target=bfin-elf --prefix=/Users/chris/bfin-1.0
--verbose --disable-nls --without-included-gettext --disable-win32-registry
--disable-werror --with-expat --with-python

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
@ 2015-03-09  3:52 ` vapier at gentoo dot org
  2015-03-09  6:08 ` vapier at gentoo dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: vapier at gentoo dot org @ 2015-03-09  3:52 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vapier at gentoo dot org
          Component|build                       |sim
           Assignee|unassigned at sourceware dot org   |vapier at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
  2015-03-09  3:52 ` [Bug sim/13160] " vapier at gentoo dot org
@ 2015-03-09  6:08 ` vapier at gentoo dot org
  2015-03-10  2:18 ` chrisj at rtems dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: vapier at gentoo dot org @ 2015-03-09  6:08 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #1 from Mike Frysinger <vapier at gentoo dot org> ---
i don't know what you mean by "complains about the final p".  afaict, the code
is POSIX compliant.  please post the exact command you're running and the exact
error you're seeing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
  2015-03-09  3:52 ` [Bug sim/13160] " vapier at gentoo dot org
  2015-03-09  6:08 ` vapier at gentoo dot org
@ 2015-03-10  2:18 ` chrisj at rtems dot org
  2015-03-10  3:47 ` vapier at gentoo dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: chrisj at rtems dot org @ 2015-03-10  2:18 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

Chris Johns <chrisj at rtems dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |OBSOLETE

--- Comment #2 from Chris Johns <chrisj at rtems dot org> ---
Thanks for following up the bug report.

I have just built a git binutils-gdb with this patch
https://git.rtems.org/rtems-tools/plain/tools/4.11/gdb/gdb-sim-arange-inline.diff
on Marvrick with clang (Xcode) and the build completed successfully. 

I could not find linux-fixed-code.o and so I can only conclude something else
has changed and error no longer exists.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
                   ` (2 preceding siblings ...)
  2015-03-10  2:18 ` chrisj at rtems dot org
@ 2015-03-10  3:47 ` vapier at gentoo dot org
  2015-03-10  4:33 ` chrisj at rtems dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: vapier at gentoo dot org @ 2015-03-10  3:47 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

--- Comment #3 from Mike Frysinger <vapier at gentoo dot org> ---
(In reply to Chris Johns from comment #2)

the linux-fixed-code.h is checked in now, so it only gets regenerated in
maintainer mode.  if you delete it, it should try to regen it.

as for that patch, probably should be submitting bug reports/patches to the
list so i can review them.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
                   ` (3 preceding siblings ...)
  2015-03-10  3:47 ` vapier at gentoo dot org
@ 2015-03-10  4:33 ` chrisj at rtems dot org
  2015-03-10  5:09 ` vapier at gentoo dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: chrisj at rtems dot org @ 2015-03-10  4:33 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

Chris Johns <chrisj at rtems dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|OBSOLETE                    |---

--- Comment #4 from Chris Johns <chrisj at rtems dot org> ---
Ah ok thanks. The error is:

/Users/chris/development/play/gdb/bfin-elf/./gas/as-new
../../../binutils-gdb/sim/bfin/linux-fixed-code.s -o linux-fixed-code.o
(       set -e; \
                echo "/* DO NOT EDIT: Autogenerated from linux-fixed-code.s. 
*/"; \
                echo "static const unsigned char bfin_linux_fixed_code[] ="; \
                echo "{"; \
                /Users/chris/development/play/gdb/bfin-elf/./binutils/objdump
-d -z linux-fixed-code.o >
../../../binutils-gdb/sim/bfin/linux-fixed-code.h.dis; \
                sed -n \
                        -e 's:^[^       ]*      :0x:' \
                        -e '/^0x/{s:    .*::;s: *$:,:;s: :, 0x:g;p}' \
                        ../../../binutils-gdb/sim/bfin/linux-fixed-code.h.dis;
\
                rm -f ../../../binutils-gdb/sim/bfin/linux-fixed-code.h.dis; \
                echo "};" \
        ) > ../../../binutils-gdb/sim/bfin/linux-fixed-code.h.tmp
sed: 1: "/^0x/{s:       .*::;s: *$:,:; ...": extra characters at the end of p
command
make[3]: *** [../../../binutils-gdb/sim/bfin/linux-fixed-code.h] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all-sim] Error 2
make: *** [all] Error 2

I have tried to run the sed script by hand on a Linux box and I get no output.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
                   ` (4 preceding siblings ...)
  2015-03-10  4:33 ` chrisj at rtems dot org
@ 2015-03-10  5:09 ` vapier at gentoo dot org
  2015-03-10  5:42 ` chrisj at rtems dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: vapier at gentoo dot org @ 2015-03-10  5:09 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

--- Comment #5 from Mike Frysinger <vapier at gentoo dot org> ---
(In reply to Chris Johns from comment #4)

my guess is you're copying & pasting the command from your terminal and that
isn't preserving the tabs.  instead you're pasting a command that uses spaces. 
you want something like:
bfin-elf-objdump -d -z linux-fixed-code.o | \
  sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:g;p}'

i don't know why that's failing as, afaict, the code is POSIX compliant.  maybe
Darwin has a crappy implementation ?  i've tried `sed --posix` and `minised`
and `busybox sed` and they all work (well, almost ... minised doesn't handle
tabs correctly).

maybe it can't handle a nested print ?  what if you combine it with the s:
bfin-elf-objdump -d -z linux-fixed-code.o | \
  sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:gp}'

if that still fails, try unrolling it:
bfin-elf-objdump -d -z linux-fixed-code.o | \
  sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:g;
p
}'

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
                   ` (5 preceding siblings ...)
  2015-03-10  5:09 ` vapier at gentoo dot org
@ 2015-03-10  5:42 ` chrisj at rtems dot org
  2015-03-10  5:44 ` vapier at gentoo dot org
  2015-03-10 14:04 ` cvs-commit at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: chrisj at rtems dot org @ 2015-03-10  5:42 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

--- Comment #6 from Chris Johns <chrisj at rtems dot org> ---
(In reply to Mike Frysinger from comment #5)
> (In reply to Chris Johns from comment #4)
> 
> my guess is you're copying & pasting the command from your terminal and that
> isn't preserving the tabs.  instead you're pasting a command that uses
> spaces.  

Nice guess. Using C-v<tab> worked.

> you want something like:
> bfin-elf-objdump -d -z linux-fixed-code.o | \
>   sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:g;p}'

I think \t is a GNU extension.

> i don't know why that's failing as, afaict, the code is POSIX compliant. 
> maybe Darwin has a crappy implementation ?  i've tried `sed --posix` and
> `minised` and `busybox sed` and they all work (well, almost ... minised
> doesn't handle tabs correctly).

The sed looks similar to FreeBSD. It also fails in the same way.

> 
> maybe it can't handle a nested print ?  what if you combine it with the s:
> bfin-elf-objdump -d -z linux-fixed-code.o | \
>   sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:gp}'
> 
> if that still fails, try unrolling it:
> bfin-elf-objdump -d -z linux-fixed-code.o | \
>   sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:g;
> p
> }'

Ah ok, thanks for posting this. The following seems this works on MacOS and
FreeBSD ...

sed -n -e 's:^[^      ]*      :0x:' -e '/^0x/{s:      .*::;s: *$:,:g;p;}'
../../../binutils-gdb/sim/bfin/linux-fixed-code.h.dis 

This is with <tab> characters and a ';' after the 'p'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
                   ` (6 preceding siblings ...)
  2015-03-10  5:42 ` chrisj at rtems dot org
@ 2015-03-10  5:44 ` vapier at gentoo dot org
  2015-03-10 14:04 ` cvs-commit at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: vapier at gentoo dot org @ 2015-03-10  5:44 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

Mike Frysinger <vapier at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Mike Frysinger <vapier at gentoo dot org> ---
(In reply to Chris Johns from comment #6)

\t might be a GNU extension, but you were talking about trying to run it on
your linux box ;).  the Makefile.in is using an actual tab character.

at any rate, adding a trailing ; after the p command is easy enough.  i'll push
that through.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug sim/13160] bfin simulator does not build on Darwin
  2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
                   ` (7 preceding siblings ...)
  2015-03-10  5:44 ` vapier at gentoo dot org
@ 2015-03-10 14:04 ` cvs-commit at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-03-10 14:04 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=13160

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Michael Frysinger
<vapier@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6defcd57e9df4f61cd0c59e3d9b66b6b071af808

commit 6defcd57e9df4f61cd0c59e3d9b66b6b071af808
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Tue Mar 10 01:41:48 2015 -0400

    sim: bfin: fix up linux-fixed-code.h generation more [PR sim/13160]

    Add a trailing semi-colon to the sed print command as the BSD sed
    implementation wants it.  It's a nop otherwise and works fine on
    GNU/etc... implementations too.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2015-03-10  5:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-07  0:20 [Bug build/13160] New: bfin simulator does not build on Darwin chrisj at rtems dot org
2015-03-09  3:52 ` [Bug sim/13160] " vapier at gentoo dot org
2015-03-09  6:08 ` vapier at gentoo dot org
2015-03-10  2:18 ` chrisj at rtems dot org
2015-03-10  3:47 ` vapier at gentoo dot org
2015-03-10  4:33 ` chrisj at rtems dot org
2015-03-10  5:09 ` vapier at gentoo dot org
2015-03-10  5:42 ` chrisj at rtems dot org
2015-03-10  5:44 ` vapier at gentoo dot org
2015-03-10 14:04 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).