Current-Users archive

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

Re: Yet another build problem for evbppc64



(Resending, this time with the promised attached patch!)

With up-to-date sources...

--- dependall-../external/bsd/mdocml/lib ---
/var/tmp//cc3rajhb.s: Assembler messages:
/var/tmp//cc3rajhb.s:90: Error: symbol `.data' is already defined
*** [tbl_data.o] Error code 1
nbmake: stopped in /build/netbsd-local/src/external/bsd/mdocml/lib/libmandoc


Looking at the compiler output, I find that we have (starting at line 83)

       .section        ".opd","aw"
       .align 3
data:
       .quad   .data,.TOC.@tocbase,0
       .previous
       .size   data,24
       .type   .data,@function
.data:
       mflr 0
       std 27,-40(1)
       std 28,-32(1)
       std 29,-24(1)
       std 30,-16(1)
       std 31,-8(1)
...
.L49:
       ld 3,.LC3@toc(2)
       ld 5,.LC4@toc(2)
       li 4,79
       ld 6,.LC6@toc(2)
       bl .__assert13
       nop
       .long 0
       .byte 0,0,0,1,128,8,0,0
       .size   .data,.-.data
       .section        ".toc","aw"
.LC18:
       .tc .LC17[TC],.LC17
       .section        ".text"
       .align 2
       .p2align 4,,15
       .globl tbl_cdata
       .section        ".opd","aw"
...

 The definition of .data is at line 90.

Unless there is some internal definition of the symbol, I don't see how this could be "already defined".

However, since the function data() within this source file is defined as static, is there any reason why it could not be renamed to something else just to avoid the internal name-space conflict?

The attached diff renames the function to xdata() and this allows the build to proceed. Does anyone object to committing it?



-------------------------------------------------------------------------
| 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  |
-------------------------------------------------------------------------
Index: tbl_data.c
===================================================================
RCS file: /cvsroot/src/external/bsd/mdocml/dist/tbl_data.c,v
retrieving revision 1.3
diff -u -p -r1.3 tbl_data.c
--- tbl_data.c  30 Jan 2012 17:03:01 -0000      1.3
+++ tbl_data.c  24 Nov 2012 21:37:31 -0000
@@ -29,13 +29,13 @@
 #include "libmandoc.h"
 #include "libroff.h"
 
-static int              data(struct tbl_node *, struct tbl_span *, 
+static int              xdata(struct tbl_node *, struct tbl_span *, 
                                int, const char *, int *);
 static struct tbl_span *newspan(struct tbl_node *, int, 
                                struct tbl_row *);
 
 static int
-data(struct tbl_node *tbl, struct tbl_span *dp, 
+xdata(struct tbl_node *tbl, struct tbl_span *dp, 
                int ln, const char *p, int *pos)
 {
        struct tbl_dat  *dat;
@@ -154,7 +154,7 @@ tbl_cdata(struct tbl_node *tbl, int ln, 
                if (p[pos] == tbl->opts.tab) {
                        tbl->part = TBL_PART_DATA;
                        pos++;
-                       return(data(tbl, tbl->last_span, ln, p, &pos));
+                       return(xdata(tbl, tbl->last_span, ln, p, &pos));
                } else if ('\0' == p[pos]) {
                        tbl->part = TBL_PART_DATA;
                        return(1);
@@ -269,7 +269,7 @@ tbl_data(struct tbl_node *tbl, int ln, c
        /* This returns 0 when TBL_PART_CDATA is entered. */
 
        while ('\0' != p[pos])
-               if ( ! data(tbl, dp, ln, p, &pos))
+               if ( ! xdata(tbl, dp, ln, p, &pos))
                        return(0);
 
        return(1);


Home | Main Index | Thread Index | Old Index