Add MKCTF

2014-03-24 Thread Ryota Ozaki
Hi,

I'm adding a new build variable MKCTF, which
was discussed on the chat some days ago.

Currently CTF tools are built and used to generate
and manipulate CTF data of ELF binaries when
we build with MKDTRACE=yes. Unfortunately,
current CTF tools don't work on i386/amd64/arm,
and that adds a burden to try DTrace by users.

The new variable is intended to separate CTF
stuffs from MKDTRACE; we can build DTrace
solely without worrying about the CTF issues.
Fortunately, CTF data are not used yet by
current DTrace of NetBSD, so DTrace still
works without CTF data.

Once CTF issues are solved, we would be
able to merge MKCTF to MKDTRACE again
but it would not come soon. So I think the
workaround is still useful at this point.

My patch is attached and also available at
http://www.netbsd.org/~ozaki-r/MKCTF.diff .

This is the diffstat of the patch:
$ diffstat MKCTF.diff
 distrib/sets/lists/comp/mi   |6 +++---
 distrib/sets/lists/man/mi|   18 +-
 etc/Makefile.params  |2 +-
 external/cddl/Makefile   |2 +-
 external/cddl/osnet/lib/Makefile |2 ++
 external/cddl/osnet/usr.bin/Makefile |2 +-
 share/man/man5/mk.conf.5 |7 +++
 share/mk/bsd.README  |5 +
 share/mk/bsd.own.mk  |4 ++--
 share/mk/bsd.prog.mk |2 +-
 tools/Makefile   |2 ++
 11 files changed, 34 insertions(+), 18 deletions(-)

Any comments and suggestions are welcome.

Best regards,
  ozaki-r
Index: distrib/sets/lists/comp/mi
===
RCS file: /cvs/cvsroot/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.1885
diff -u -r1.1885 mi
--- distrib/sets/lists/comp/mi  22 Mar 2014 11:24:35 -  1.1885
+++ distrib/sets/lists/comp/mi  24 Mar 2014 09:43:41 -
@@ -20,9 +20,9 @@
 ./usr/bin/config   comp-util-bin
 ./usr/bin/crunchgencomp-c-bin
 ./usr/bin/crunchidecomp-c-bin
-./usr/bin/ctfconvert   comp-util-bin   dtrace
-./usr/bin/ctfdump  comp-util-bin   dtrace
-./usr/bin/ctfmerge comp-util-bin   dtrace
+./usr/bin/ctfconvert   comp-util-bin   ctf
+./usr/bin/ctfdump  comp-util-bin   ctf
+./usr/bin/ctfmerge comp-util-bin   ctf
 ./usr/bin/cvs  comp-cvs-bincvs
 ./usr/bin/cvsbug   comp-cvs-bincvs
 ./usr/bin/elfedit  comp-util-bin   binutils
Index: distrib/sets/lists/man/mi
===
RCS file: /cvs/cvsroot/src/distrib/sets/lists/man/mi,v
retrieving revision 1.1465
diff -u -r1.1465 mi
--- distrib/sets/lists/man/mi   19 Mar 2014 15:26:41 -  1.1465
+++ distrib/sets/lists/man/mi   24 Mar 2014 09:43:43 -
@@ -125,9 +125,9 @@
 ./usr/share/man/cat1/csh.0 man-util-catman .cat
 ./usr/share/man/cat1/csplit.0  man-util-catman .cat
 ./usr/share/man/cat1/ctags.0   man-c-catman.cat
-./usr/share/man/cat1/ctfconvert.0  man-util-catman 
.cat,dtrace
-./usr/share/man/cat1/ctfdump.0 man-util-catman 
.cat,dtrace
-./usr/share/man/cat1/ctfmerge.0man-util-catman 
.cat,dtrace
+./usr/share/man/cat1/ctfconvert.0  man-util-catman .cat,ctf
+./usr/share/man/cat1/ctfdump.0 man-util-catman .cat,ctf
+./usr/share/man/cat1/ctfmerge.0man-util-catman 
.cat,ctf
 ./usr/share/man/cat1/cu.0  man-util-catman .cat
 ./usr/share/man/cat1/cut.0 man-util-catman .cat
 ./usr/share/man/cat1/daicctl.0 man-sysutil-catman  .cat
@@ -3240,9 +3240,9 @@
 ./usr/share/man/html1/csh.html man-util-htmlmanhtml
 ./usr/share/man/html1/csplit.html  man-util-htmlmanhtml
 ./usr/share/man/html1/ctags.html   man-c-htmlman   html
-./usr/share/man/html1/ctfconvert.html  man-util-htmlman
html,dtrace
-./usr/share/man/html1/ctfdump.html man-util-htmlman
html,dtrace
-./usr/share/man/html1/ctfmerge.htmlman-util-htmlman
html,dtrace
+./usr/share/man/html1/ctfconvert.html  man-util-htmlmanhtml,ctf
+./usr/share/man/html1/ctfdump.html man-util-htmlmanhtml,ctf
+./usr/share/man/html1/ctfmerge.htmlman-util-htmlmanhtml,ctf
 ./usr/share/man/html1/cu.html  man-util-htmlmanhtml
 ./usr/share/man/html1/cut.html 

Re: Enhance ptyfs to handle multiple instances.

2014-03-24 Thread Christos Zoulas
On Mar 24,  5:46pm, net...@izyk.ru (Ilya Zykov) wrote:
-- Subject: Re: Enhance ptyfs to handle multiple instances.

| Hello!
| 
| Please, tell me know if I wrong.
| In general case I can't find(easy), from driver, where its device file 
located on file system,
| its vnode or its directory vnode where this file located.
| Such files can be many and I can't find what file used for current operation.
| Maybe anybody had being attempted get this info from the driver?

You can't find from the driver where the device node file is located
in the filesystem, as well as you cannot reliably find from the
vnode of the device node the filesystem path. There could be many
device nodes that satisfy the criteria (you can make your own tty
node with mknod)

christos


Re: Enhance ptyfs to handle multiple instances.

2014-03-24 Thread Ilya Zykov
 
 You can't find from the driver where the device node file is located
 

OK, I thought so.
Thank you.



Re: gd packages fails to build under NetBSD/amd64 current

2014-03-24 Thread Matthias Scheler
On Sun, Mar 23, 2014 at 07:55:05PM +, Matthias Scheler wrote:
   So, no more xx, but somehow the substitution to ${PKGCONFIG_REQUIRES}
   hasn't happened for me...
  
  Finally : I needed
  cd /usr/src/external/mit/xorg/lib/fontconfig/src  make distclean
  to get rid of the fontconfig.pc file, so it gets rebuilt. make clean
  isn't enough. Now:
  
  Name: Fontconfig
  Description: Font configuration and customization library
  Version: 2.11.0
  Requires: 
  Requires.private: 
  Libs: -Wl,-rpath,${libdir} -L${libdir} -lfontconfig
  Libs.private: -lexpat -lfreetype  
  Cflags: -I${includedir}  -I/usr/X11R7/include/freetype2 
  -I/usr/X11R7/include  
  
  So ryoon's patches are all that is needed...
 
 I get this:
 
 tron@lyssa:/usr/pkgsrc/graphics/gd#cat /usr/X11R7/lib/pkgconfig/fontconfig.pc
 prefix=/usr/X11R7
 exec_prefix=${prefix}
 libdir=${prefix}/lib
 includedir=${prefix}/include
 sysconfdir=@sysconfdir@
 localstatedir=@localstatedir@
 PACKAGE=
 confdir=@baseconfigdir@
 cachedir=@fc_cachedir@

Matthew Green has fixed this.

 The first part still doesn't look right and the gd package still
 fails to detect fontconfig.

This seems to be a problem with pkgsrc which I'm currently fixing.

Kind regards

-- 
Matthias Scheler https://zhadum.org.uk/


gcc unwind-dw2.c build break

2014-03-24 Thread Paul Goyette
On amd64, and with most recet update to unwind-dw2.c (rev 1.2) I am 
getting


#   compile  libgcc/unwind-dw2.o
/test-bed/tools/bin/x86_64--netbsd-gcc -O2 -std=gnu99 -Werror 
--sysroot=/test-bed/dst 
-I/test-bed/src/external/gpl3/gcc/lib/libgcc/libgcc 
-I/test-bed/src/external/gpl3/gcc/lib/libgcc/arch/x86_64 
-I/test-bed/src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64 -DIN_GCC 
-DIN_LIBGCC2 -I/test-bed/src/external/gpl3/gcc/dist/libgcc 
-I/test-bed/src/external/gpl3/gcc/dist/libgcc/. 
-I/test-bed/src/external/gpl3/gcc/dist/libgcc/../gcc 
-I/test-bed/src/external/gpl3/gcc/dist/libgcc/../include  -fpic 
-fbuilding-libgcc -fno-stack-protector 
-I/test-bed/src/external/gpl3/gcc/dist/gcc/config/i386 
-I/test-bed/src/external/gpl3/gcc/dist/gcc/ginclude 
-I/test-bed/src/external/gpl3/gcc/dist/libgcc 
-I/test-bed/src/external/gpl3/gcc/dist/libgcc/config 
-I/test-bed/src/external/gpl3/gcc/dist/gcc 
-I/test-bed/src/external/gpl3/gcc/dist/include -I.  -c -fexceptions 
-Wno-stack-protector -o unwind-dw2.o 
/test-bed/src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c
/test-bed/src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c: In function 
'_Unwind_GetLanguageSpecificData':
/test-bed/src/external/gpl3/gcc/dist/libgcc/unwind-dw2.c:371:3: error: 
return makes integer from pointer without a cast [-Werror]

   return context-lsda;
   ^

-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |  | pgoyette at netbsd.org  |
-


Re: Add MKCTF

2014-03-24 Thread Ryota Ozaki
On Tue, Mar 25, 2014 at 1:47 AM, Christos Zoulas chris...@astron.com wrote:
 In article 
 cakryomjraa3-olqh7wmmqh1tprjzb1oq9a6vrskiin+ltf-...@mail.gmail.com,
 Ryota Ozaki  ozak...@netbsd.org wrote:
-=-=-=-=-=-

Hi,

I'm adding a new build variable MKCTF, which
was discussed on the chat some days ago.

Currently CTF tools are built and used to generate
and manipulate CTF data of ELF binaries when
we build with MKDTRACE=yes. Unfortunately,
current CTF tools don't work on i386/amd64/arm,
and that adds a burden to try DTrace by users.

The new variable is intended to separate CTF
stuffs from MKDTRACE; we can build DTrace
solely without worrying about the CTF issues.
Fortunately, CTF data are not used yet by
current DTrace of NetBSD, so DTrace still
works without CTF data.

Once CTF issues are solved, we would be
able to merge MKCTF to MKDTRACE again
but it would not come soon. So I think the
workaround is still useful at this point.

My patch is attached and also available at
http://www.netbsd.org/~ozaki-r/MKCTF.diff .

 I am happy with that approach.

Thanks! I will commit it later.

  ozaki-r