Subject: Re: 'make build' fail
To: None <eeh@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-sparc64
Date: 11/22/2000 16:49:41
On Tue, Nov 21, 2000 at 06:21:03PM -0000, eeh@netbsd.org wrote:
> Seems to be a -pic/-PIC issue.  The assembly language stub
> generated by src/lib/libc/arch/sparc64/SYS.h uses -pic
> relocations for ___cerror, while it appears that this
> library is too large for that.  Eventually we should
> fix the assembly stubs so -pic or -PIC can be selected
> with a compiler option.  In the mean time try the following
> fix:
> 
> Index: lib/libc/arch/sparc64/SYS.h
> ===================================================================
> RCS file: /cvsroot/basesrc/lib/libc/arch/sparc64/SYS.h,v
> retrieving revision 1.4
> diff -u -u -r1.4 SYS.h
> --- lib/libc/arch/sparc64/SYS.h 2000/07/18 22:39:25     1.4
> +++ lib/libc/arch/sparc64/SYS.h 2000/11/21 18:20:49
> @@ -56,8 +56,8 @@
>   */
>  #ifdef PIC
>  #define        ERROR() \
> -       PIC_PROLOGUE(%g1,%g2); \
> -       ldx [%g1+_C_LABEL(__cerror)],%g2; jmp %g2; nop
> +       PIC_PROLOGUE(%g1,%g2); sethi %hi(_C_LABEL(__cerror)),%g2; \
> +       or %g2,%lo(_C_LABEL(__cerror)),%g2; ldx [%g1+%g2],%g2; jmp %g2; nop
>  #else
>  #define        ERROR() \
>         sethi %hi(_C_LABEL(__cerror)),%g1; or %lo(_C_LABEL(__cerror)),%g1,%g1; \


Ok, with this I can now compile a libc cleanly.
I've another issue again with libedit:
cc -O  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-unini
tialized   -I. -I/home/bouyer/src/lib/libedit -I. -I/home/bouyer/src/lib/libedit
   -c editline.c
In file included from editline.c:4:
chared.c: In function `ch_init':
chared.c:465: `ED_UNASSIGNED' undeclared (first use in this function)
chared.c:465: (Each undeclared identifier is reported only once
chared.c:465: for each function it appears in.)
chared.c: In function `ch_reset':
chared.c:501: `ED_UNASSIGNED' undeclared (first use in this function)
chared.c: In function `c_gets':
chared.c:584: warning: implicit declaration of function `ed_end_of_file'

etc, etc. This looks a lot like the awk issue, but this is the awk
from the beta snapshot so it's supposed to be ok. Any idea ?

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--