pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/nasd Fix broken build.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/71311f30a2df
branches:  trunk
changeset: 604722:71311f30a2df
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat Jun 02 23:34:56 2012 +0000

description:
Fix broken build.

(1) With gcc 4.5, cpp does not fold lines separated by a escaped
newline in the output. Therefore when nasd_rpcgen runs its rpc
definitions through cpp, what comes out contains syntax errors. The
parser then reports these with SIGSEGV. First fix the cpp plumbing to
use the cpp tool wrapper during build, and then have it use -traditional.

(2) On amd64, roughly half the build thinks it's actually i386. Patch
the other half to agree. This may not turn out to work, but it does
build instead of dumping out bizarre compile errors.

diffstat:

 net/nasd/distinfo                                               |   10 +-
 net/nasd/patches/patch-al                                       |  107 ++++++++-
 net/nasd/patches/patch-ay                                       |   26 +-
 net/nasd/patches/patch-common_i386_Imakefile                    |   16 +
 net/nasd/patches/patch-include_nasd_nasd__timer_h               |   42 +++
 net/nasd/patches/patch-kernel__generate_dux_other_Makefile      |   18 +
 net/nasd/patches/patch-kernel__generate_dux_other_nasd_Makefile |   15 +
 7 files changed, 207 insertions(+), 27 deletions(-)

diffs (truncated from 323 to 300 lines):

diff -r a644699dd477 -r 71311f30a2df net/nasd/distinfo
--- a/net/nasd/distinfo Sat Jun 02 22:29:14 2012 +0000
+++ b/net/nasd/distinfo Sat Jun 02 23:34:56 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1.1.1 2005/05/04 08:56:49 agc Exp $
+$NetBSD: distinfo,v 1.2 2012/06/02 23:34:56 dholland Exp $
 
 SHA1 (repackaged-nasd-1.3.tar.gz) = 8ea5d523cab58bcc6c90ff2b5c1c04c4ff8f3949
 RMD160 (repackaged-nasd-1.3.tar.gz) = a9aaee4722af1e7f1eefe9402c840308a4f95774
@@ -14,7 +14,7 @@
 SHA1 (patch-ai) = 7bcc3a2b3f39965a66fcc106f1d7ef0de23f1bf3
 SHA1 (patch-aj) = 896cb740a933c1e63aa80d96cdd22522addd868e
 SHA1 (patch-ak) = 3a0b8984ab28cb45c5f12eef92eaee38c5d6e466
-SHA1 (patch-al) = 68f8cfa59ff64f5054cabd77b42c74151d951b3f
+SHA1 (patch-al) = edabe689a432646d76011fd3ea8313117655970b
 SHA1 (patch-am) = bf857f131d8761b7ecc85cb92868b6aa2e87f852
 SHA1 (patch-an) = 64a1800990fde4abea27cb5c31b9f611f1ff8106
 SHA1 (patch-ao) = 990215bd2b8e3f5d24535644576d5a9fe9c1551f
@@ -27,7 +27,7 @@
 SHA1 (patch-av) = 9cb91b69d51d2405475f82da52dd6a4cd70cf06d
 SHA1 (patch-aw) = 80c6972ee555e5082b49b913c82f9d354a8a9ada
 SHA1 (patch-ax) = e90ed25da1eed313d1e74a85039e14ed0f831c6a
-SHA1 (patch-ay) = 2e1cca1629a7074ed75f06b444b864cbc9f38186
+SHA1 (patch-ay) = 510c865b32bafc1a59325ec89c7f29d974bda9c3
 SHA1 (patch-az) = 977d1114a653d9736ffc72258f1ef8091236a8ed
 SHA1 (patch-ba) = 790c5e21999513aeb3f289173ec713d5eb1d68e2
 SHA1 (patch-bb) = 762a89d6d6046f08980b86ee5e5fe9a26cc2a6a4
@@ -48,3 +48,7 @@
 SHA1 (patch-bq) = aa8c03f2899feae06d6e7c79d10ceb7371029b28
 SHA1 (patch-br) = 6dd71a647bb99f2facd3ed139bc55dd23d22836e
 SHA1 (patch-bs) = 2244ca43d405cbbd2b2224260d4377b4c6c6a318
+SHA1 (patch-common_i386_Imakefile) = 71521f0a393e5f4efaae961f9b3d5dc790fa3b10
+SHA1 (patch-include_nasd_nasd__timer_h) = 887156514a266e75b4bf871907cc6b66785c7aaf
+SHA1 (patch-kernel__generate_dux_other_Makefile) = bda4171f73d69a1136398e1fc80d6beb0e5e8a65
+SHA1 (patch-kernel__generate_dux_other_nasd_Makefile) = c5d8c5c33634ce1f6287b037e360861fefc434b8
diff -r a644699dd477 -r 71311f30a2df net/nasd/patches/patch-al
--- a/net/nasd/patches/patch-al Sat Jun 02 22:29:14 2012 +0000
+++ b/net/nasd/patches/patch-al Sat Jun 02 23:34:56 2012 +0000
@@ -1,14 +1,21 @@
-$NetBSD: patch-al,v 1.1.1.1 2005/05/04 08:56:50 agc Exp $
+$NetBSD: patch-al,v 1.2 2012/06/02 23:34:56 dholland Exp $
+
+- have rpcgen use cpp on the path (thus picking up the tool wrapper)
+- use -traditional with cpp, or gcc 4.4(?) and up fail
+- add explicit netbsd support
+- add pthread options
 
-Index: config/NASD.tmpl
-===================================================================
-RCS file: /usr/cvsroot/nasd/nasd-1.3/config/NASD.tmpl,v
-retrieving revision 1.1.1.1
-retrieving revision 1.3
-diff -u -r1.1.1.1 -r1.3
---- config/NASD.tmpl   21 Mar 2005 08:52:02 -0000      1.1.1.1
-+++ config/NASD.tmpl   21 Mar 2005 22:36:25 -0000      1.3
-@@ -167,7 +167,7 @@
+--- config/NASD.tmpl.orig      2005-03-21 08:52:02.000000000 +0000
++++ config/NASD.tmpl
+@@ -94,6 +94,7 @@ CRYPT_COMMONLIB=$(THE_TOP)/common/crypto
+  * nasd_rpcgen binary
+  */
+ NASD_RPCGEN_BIN=$(THE_TOP)/rpcgen/nasd_rpcgen
++NASD_RPCGEN_ARGS=-C 'cpp -traditional'
+ NASD_RPCGEN_INCLUDES=-I$(THE_TOP)/include
+ 
+ /* may be overridden by local Imakefiles */
+@@ -167,7 +168,7 @@ DEFINES = -D__LANGUAGE_C__ $(NASD_CFGDEF
   */
  #define NASD_MakeSubdirs(_dirs_) NamedTargetSubdirs(all,_dirs_,"Making",PassCDebugFlags,all)
  #else /* AIXArchitecture && (NASD_OSMajorVersion == 4) */
@@ -17,7 +24,7 @@
  /*
   * The XFree86 NamedTargetSubdirs macro was written by
   * some weeder who just didn't grasp the beauty of
-@@ -188,7 +188,7 @@
+@@ -188,7 +189,7 @@ name:: @@\
                        exit $$status; \ @@\
                fi \ @@\
        done
@@ -26,7 +33,7 @@
  /*
   * Everything else
   */
-@@ -407,7 +407,7 @@
+@@ -407,7 +408,7 @@ Makefiles makefiles::
  PULLINSYMS = -include ${NASD_KMOD_INCDIR}/nasd/nasd_linux_common_syms.ver.h
  
  .c.o:
@@ -35,7 +42,7 @@
  
  #ifndef NASD_OverrideCOTarget
  #define NASD_OverrideCOTarget
-@@ -432,7 +432,7 @@
+@@ -432,7 +433,7 @@ filenamebase.o: filenamebase.c @@\
  program: objects deplibs @@\
        RemoveTargetProgram($@) @@\
        RemoveTargetProgram(a.out) @@\
@@ -44,7 +51,79 @@
        $(MV) a.out $@ @@\
  @@\
  clean:: @@\
-@@ -821,7 +821,8 @@
+@@ -592,7 +593,7 @@ depend:: idlfn headerfn @@\
+ @@\
+ idlfn:: rpcfn $(THE_TOP)/include/nasd/nasd_options.h @@\
+       $(RM) idlfn tmp.idlfn @@\
+-      $(NASD_RPCGEN_BIN) -S_t -I$(THE_TOP)/include -i tmp.idlfn rpcfn @@\
++      $(NASD_RPCGEN_BIN) $(NASD_RPCGEN_ARGS) -S_t -I$(THE_TOP)/include -i tmp.idlfn rpcfn @@\
+       $(MV) tmp.idlfn idlfn @@\
+ @@\
+ headerfn:: idlfn @@\
+@@ -682,7 +683,7 @@ depend:: headerfn @@\
+ @@\
+ headerfn:: rpcfn $(THE_TOP)/include/nasd/nasd_options.h @@\
+       $(RM) headerfn tmp.headerfn @@\
+-      $(NASD_RPCGEN_BIN) -S_t -I$(THE_TOP)/include -h tmp.headerfn rpcfn @@\
++      $(NASD_RPCGEN_BIN) $(NASD_RPCGEN_ARGS) -S_t -I$(THE_TOP)/include -h tmp.headerfn rpcfn @@\
+       $(MV) tmp.headerfn headerfn @@\
+ @@\
+ clean:: @@\
+@@ -699,7 +700,7 @@ depend:: serverfn.c @@\
+ serverfn.c:: rpcfn $(NASD_RPCGEN_BIN) $(THE_TOP)/include/nasd/nasd_options.h @@\
+       @echo Generating serverfn.c @@\
+       @$(RM) serverfn.c tmp.serverfn.c @@\
+-      $(NASD_RPCGEN_BIN) -S_t -I$(THE_TOP)/include -B nasd/nasd_error.h -B nasd/nasd_types.h -B headerfn1 -B headerfn2 -y tmp.serverfn.c rpcfn @@\
++      $(NASD_RPCGEN_BIN) $(NASD_RPCGEN_ARGS) -S_t -I$(THE_TOP)/include -B nasd/nasd_error.h -B nasd/nasd_types.h -B headerfn1 -B headerfn2 -y tmp.serverfn.c rpcfn @@\
+       $(MV) tmp.serverfn.c serverfn.c @@\
+       @echo Generated serverfn.c @@\
+ @@\
+@@ -716,7 +717,7 @@ depend:: serverfn.h @@\
+ serverfn.h:: rpcfn $(NASD_RPCGEN_BIN) $(THE_TOP)/include/nasd/nasd_options.h @@\
+       @echo Generating serverfn.h @@\
+       @$(RM) serverfn.h tmp.serverfn.h @@\
+-      $(NASD_RPCGEN_BIN) -S_t -I$(THE_TOP)/include -Y tmp.serverfn.h -B nasd/nasd_error.h -B nasd/nasd_types.h rpcfn @@\
++      $(NASD_RPCGEN_BIN) $(NASD_RPCGEN_ARGS) -S_t -I$(THE_TOP)/include -Y tmp.serverfn.h -B nasd/nasd_error.h -B nasd/nasd_types.h rpcfn @@\
+       $(MV) tmp.serverfn.h serverfn.h @@\
+       @echo Generated serverfn.h @@\
+ @@\
+@@ -731,7 +732,7 @@ depend:: clientfn.c @@\
+ clientfn.c:: rpcfn $(NASD_RPCGEN_BIN) $(THE_TOP)/include/nasd/nasd_options.h @@\
+       @echo Generating clientfn.c @@\
+       @$(RM) clientfn.c tmp.clientfn.c @@\
+-      $(NASD_RPCGEN_BIN) -S_t -I$(THE_TOP)/include -B nasd/nasd_error.h -B nasd/nasd_types.h -B nasd/nasd_marshall.h -B headerfn1 -B headerfn2 -x tmp.clientfn.c rpcfn @@\
++      $(NASD_RPCGEN_BIN) $(NASD_RPCGEN_ARGS) -S_t -I$(THE_TOP)/include -B nasd/nasd_error.h -B nasd/nasd_types.h -B nasd/nasd_marshall.h -B headerfn1 -B headerfn2 -x tmp.clientfn.c rpcfn @@\
+       $(MV) tmp.clientfn.c clientfn.c @@\
+       @echo Generated clientfn.c @@\
+ @@\
+@@ -748,7 +749,7 @@ depend:: clientfn.h @@\
+ clientfn.h:: rpcfn $(NASD_RPCGEN_BIN) $(THE_TOP)/include/nasd/nasd_options.h @@\
+       @echo Generating clientfn.h @@\
+       @$(RM) clientfn.h tmp.clientfn.h @@\
+-      $(NASD_RPCGEN_BIN) -S_t -I$(THE_TOP)/include -X tmp.clientfn.h -B nasd/nasd_error.h -B nasd/nasd_types.h rpcfn @@\
++      $(NASD_RPCGEN_BIN) $(NASD_RPCGEN_ARGS) -S_t -I$(THE_TOP)/include -X tmp.clientfn.h -B nasd/nasd_error.h -B nasd/nasd_types.h rpcfn @@\
+       $(MV) tmp.clientfn.h clientfn.h @@\
+       @echo Generated clientfn.h @@\
+ @@\
+@@ -765,7 +766,7 @@ depend:: marshallfn @@\
+ marshallfn:: rpcfn $(NASD_RPCGEN_BIN) $(THE_TOP)/include/nasd/nasd_options.h @@\
+       @echo Generating marshallfn @@\
+       @$(RM) marshallfn tmp.marshallfn @@\
+-      $(NASD_RPCGEN_BIN) -S_t -I$(THE_TOP)/include -M tmp.marshallfn -P nasd_ -B headerfn rpcfn @@\
++      $(NASD_RPCGEN_BIN) $(NASD_RPCGEN_ARGS) -S_t -I$(THE_TOP)/include -M tmp.marshallfn -P nasd_ -B headerfn rpcfn @@\
+       $(MV) tmp.marshallfn marshallfn @@\
+       @echo Generated marshallfn @@\
+ @@\
+@@ -783,7 +784,7 @@ depend:: marshallfn @@\
+ marshallfn:: rpcfn $(NASD_RPCGEN_BIN) $(THE_TOP)/include/nasd/nasd_options.h @@\
+       @echo Generating marshallfn @@\
+       @$(RM) marshallfn tmp.marshallfn @@\
+-      $(NASD_RPCGEN_BIN) -S_t -I$(THE_TOP)/include -e tmp.marshallfn -P nasd_ -B headerfn rpcfn @@\
++      $(NASD_RPCGEN_BIN) $(NASD_RPCGEN_ARGS) -S_t -I$(THE_TOP)/include -e tmp.marshallfn -P nasd_ -B headerfn rpcfn @@\
+       $(MV) tmp.marshallfn marshallfn @@\
+       @echo Generated marshallfn @@\
+ @@\
+@@ -821,7 +822,8 @@ sayconfig::
        NASD_SayVar(NASD_RPC_PACKAGE_DEFINES)
        NASD_SayVar(NASD_CMU_PDLDEFINES)
  
diff -r a644699dd477 -r 71311f30a2df net/nasd/patches/patch-ay
--- a/net/nasd/patches/patch-ay Sat Jun 02 22:29:14 2012 +0000
+++ b/net/nasd/patches/patch-ay Sat Jun 02 23:34:56 2012 +0000
@@ -1,14 +1,11 @@
-$NetBSD: patch-ay,v 1.1.1.1 2005/05/04 08:56:50 agc Exp $
+$NetBSD: patch-ay,v 1.2 2012/06/02 23:34:56 dholland Exp $
 
-Index: include/nasd/Imakefile
-===================================================================
-RCS file: /usr/cvsroot/nasd/nasd-1.3/include/nasd/Imakefile,v
-retrieving revision 1.1.1.1
-retrieving revision 1.2
-diff -u -r1.1.1.1 -r1.2
---- include/nasd/Imakefile     21 Mar 2005 08:52:02 -0000      1.1.1.1
-+++ include/nasd/Imakefile     21 Mar 2005 08:57:43 -0000      1.2
-@@ -33,6 +33,7 @@
+- add explicit netbsd support
+- honor NASD_RPCGEN_ARGS, introduced/used by patch-al
+
+--- include/nasd/Imakefile.orig        2005-03-21 08:52:02.000000000 +0000
++++ include/nasd/Imakefile
+@@ -33,6 +33,7 @@ SUBDIRS = \
        generic \
        irix \
        linux \
@@ -16,3 +13,12 @@
        solaris \
        video \
        vxworks
+@@ -206,7 +207,7 @@ NASD_RPCGenClientHeader(nasd_cheops_mgr.
+ nasd_rpcgen_glob_param.h:: $(RPCGEN_FILES) $(NASD_RPCGEN_BIN)
+       @echo Generating $@
+       @$(RM) -f tmp.$@ $@
+-      $(NASD_RPCGEN_BIN) ${NASD_RPCGEN_INCLUDES} -S_t -P nasd_ -g tmp.$@ ${RPCGEN_FILES}
++      $(NASD_RPCGEN_BIN) ${NASD_RPCGEN_ARGS} ${NASD_RPCGEN_INCLUDES} -S_t -P nasd_ -g tmp.$@ ${RPCGEN_FILES}
+       $(MV) tmp.$@ $@
+       @echo Generated $@
+ 
diff -r a644699dd477 -r 71311f30a2df net/nasd/patches/patch-common_i386_Imakefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nasd/patches/patch-common_i386_Imakefile      Sat Jun 02 23:34:56 2012 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-common_i386_Imakefile,v 1.1 2012/06/02 23:34:56 dholland Exp $
+
+Treat x86_64 like i386, as half the build system already does, and
+hope it works.
+
+--- common/i386/Imakefile~     2005-03-21 08:52:02.000000000 +0000
++++ common/i386/Imakefile
+@@ -25,7 +25,7 @@
+ 
+ #include "NASD.tmpl"
+ 
+-#if defined(i386Architecture)
++#if defined(i386Architecture) || defined(__amd64__) || defined(__x86_64__)
+ 
+ SRCS = \
+       nasd_rpcc.c
diff -r a644699dd477 -r 71311f30a2df net/nasd/patches/patch-include_nasd_nasd__timer_h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nasd/patches/patch-include_nasd_nasd__timer_h Sat Jun 02 23:34:56 2012 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-include_nasd_nasd__timer_h,v 1.1 2012/06/02 23:34:56 dholland Exp $
+
+Handle x86_64 like i386.
+
+--- include/nasd/nasd_timer.h~ 2005-03-21 08:52:03.000000000 +0000
++++ include/nasd/nasd_timer.h
+@@ -33,7 +33,7 @@
+ 
+ #define NASD_TM_INTERVALS 60
+ 
+-#if defined(SOLARIS) && !defined(i386)
++#if defined(SOLARIS) && !defined(i386) && !defined(__x86_64__)
+ #include <nasd/generic/nasd_generic_timer.h>
+ #define NASD_TIMERS_DEFINED
+ #endif /* SOLARIS && !i386 */
+@@ -127,7 +127,7 @@ struct nasd_delaycounter_s {
+ 
+ #endif /* DEC_OSF */
+ 
+-#ifdef i386
++#if defined(i386) || defined(__x86_64__)
+ 
+ #include <asm/delay.h>
+ 
+@@ -237,7 +237,7 @@ struct nasd_delaycounter_s {
+ /*
+  * Performance counters
+  */
+-#if defined(DEC_OSF) || defined(i386)
++#if defined(DEC_OSF) || defined(i386) || defined(__x86_64__)
+ typedef struct nasd_timer_s           nasd_timer_t;
+ typedef struct nasd_multitimer_s      nasd_multitimer_t;
+ typedef struct nasd_timer_interval_s  nasd_timer_interval_t;
+@@ -261,7 +261,7 @@ extern nasd_uint32 NASD_rpcc();
+ #define NASD_RPCC() NASD_rpcc()
+ #define NASD_TICKS nasd_ctimer_ticks
+ 
+-#ifdef i386
++#if defined(i386) || defined(__x86_64__)
+ extern void NASD_rpcc_int64(nasd_uint32 *high, nasd_uint32 *low);
+ #endif /* i386 */
+ 
diff -r a644699dd477 -r 71311f30a2df net/nasd/patches/patch-kernel__generate_dux_other_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nasd/patches/patch-kernel__generate_dux_other_Makefile        Sat Jun 02 23:34:56 2012 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-kernel__generate_dux_other_Makefile,v 1.1 2012/06/02 23:34:56 dholland Exp $
+
+Set cpp and use -traditional when invoking nasd_rpcgen.
+
+--- kernel_generate/dux/other/Makefile~        2005-03-21 08:52:03.000000000 +0000
++++ kernel_generate/dux/other/Makefile
+@@ -55,8 +55,9 @@ IMODE   = 444
+ IOWNER  = bin
+ IGROUP  = bin
+ 
+-NASD_RPCGEN = ../../../../bin/nasd_rpcgen
+-NASD_RPCGEN_BIN = ${NASD_RPCGEN}
++NASD_RPCGEN = ${NASD_RPCGEN_BIN} ${NASD_RPCGEN_ARGS}
++NASD_RPCGEN_BIN = ../../../../bin/nasd_rpcgen



Home | Main Index | Thread Index | Old Index