configure tests, howto ?

Bernhard Fischer rep.nop at aon.at
Wed Jan 3 22:28:03 UTC 2007


On Tue, Jan 02, 2007 at 08:21:18PM +0100, Joakim Tjernlund wrote:
>> -----Original Message-----
>> From: 'Luciano Miguel Ferreira Rocha' [mailto:strange at nsk.no-ip.org] 
>> Sent: den 2 januari 2007 20:11
>> To: Joakim Tjernlund
>> Cc: uclibc at uclibc.org
>> Subject: Re: configure tests, howto ?
>> 
>> On Tue, Jan 02, 2007 at 04:38:15PM +0100, Joakim Tjernlund wrote:
>> > 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. 
>> 
>> I thought you already had that (the AC_CACHE_CHECK line) and 
>> was trying
>> to make that work with uclibc. It should work without any changes, as
>> long as the compiler used for the test compiles against uclibc.
>> 
>> > 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)
>> 
>> How isn't it working?
>
>Its working now, thanks for trying. The main problem is that
>CFLAGS(and CPU_CFLAGS) are reset at some point som my litte addon
>din't get through. Using ARCH_CFLAGS works though.
>
>Reason for all this is that I am trying to impl. secureplt in ppc

The attached does work for me (should be in the TARGET == powerpc
section for you).

ok?
-------------- next part --------------
Index: Rules.mak
===================================================================
--- Rules.mak	(revision 17144)
+++ Rules.mak	(working copy)
@@ -286,6 +286,9 @@
 	PIEFLAG_NAME:=-fpie
 endif
 
+PPC_HAS_REL16:=$(shell echo -e "\t.text\n\taddis 11,30,_GLOBAL_OFFSET_TABLE_-. at ha" | $(CC) -c -x assembler -o /dev/null -  2> /dev/null && echo "-DHAVE_ASM_PPC_REL16"|| echo "-UHAVE_ASM_PPC_REL16")
+CPU_CFLAGS-y+=$(PPC_HAS_REL16)
+
 ifeq ($(TARGET_ARCH),frv)
 	CPU_LDFLAGS-$(CONFIG_FRV)+=-melf32frvfd
 	# Using -pie causes the program to have an interpreter, which is


More information about the uClibc mailing list