configure tests, howto ?

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Jan 2 15:38:15 UTC 2007


> -----Original Message-----
> From: uclibc-bounces at uclibc.org 
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Luciano 
> Miguel Ferreira Rocha
> Sent: den 2 januari 2007 16:03
> To: uclibc at uclibc.org
> Subject: Re: configure tests, howto ?
> 
> On Tue, Jan 02, 2007 at 02:42:21PM +0000, Luciano Miguel 
> Ferreira Rocha wrote:
> > On Tue, Jan 02, 2007 at 03:14:16PM +0100, Joakim Tjernlund wrote:
> > > Anyone know how to translate this configure test to uClibc:
> > > 
> > > # See whether gas has R_PPC_REL16 relocs.
> > > AC_CACHE_CHECK(for R_PPC_REL16 gas support, 
> libc_cv_ppc_rel16, [dnl
> > > cat > conftest.s <<\EOF
> > > 	.text
> > > 	addis 11,30,_GLOBAL_OFFSET_TABLE_-. at ha
> > > EOF
> > 
> > Try this:
> > 	.text
> > 	here:
> > 	addis 11,30,here-. at ha
> > 
> > Some PPC systems use a different assembly sintax:
> > 	.text
> > 	here:
> > 	addis r11,r30,ha16(here-.)
> 
> Actually, this is probably incorrect, as the assembler can 
> compute here - ..
> 
> So maybe your assembler really doesn't support R_PPC_REL16? What's the
> output of gcc?

binutil 2.16.1 doesn not support REL16, but that's not the point
I want to construct something that TESTS if the current binutils
support REL16 or not. 
This is what I got sofar, but its not working yet:

PPC_HAS_REL16:=$(shell echo -e "\t.text\n\taddis 11,30,_GLOBAL_OFFSET_TABLE_-. at ha" | $(CC) -x assembler -o /dev/null\
 -  2> /dev/null && echo -DNO_REL16 || echo -DHAVE_ASM_PPC_REL16)
CFLAGS+= $(PPC_HAS_REL16)




More information about the uClibc mailing list