Le 17 oct. 2012 à 17:27, Andrew a écrit :

> 17.10.2012 18:01, Yves Blusseau пишет:
>> Le 17/10/2012 15:50, Andrew a écrit :
>>> 17.10.2012 15:07, Yves Blusseau пишет:
>>>> Le 17/10/2012 13:08, Andrew a écrit :
>>>>> I think that this patch will not break anything for 32bit toolchain.
>>>> It will because if you used -m32 it will look for lib in /usr/lib32 :(
>>>> 
>>>> So we only need to patch the source only for 64bits arch.
>>>> 
>>>> Yves
>>>> 
>>> It'll look in lib32 only if gcc is compiled for 64bit support - as said
>>> in gcc/config/config.h comments. Other files are included for 64bit
>>> target system.
>>> If it fails for pure 32bit toolchain, we can try to leave config.h
>>> untouched.
>> It's seems to work. Can compile 32bit toolchain with the pure64 patch
>> applied:
>> 
>> ./i486-unknown-linux-uclibc-gcc -print-multi-os-directory
>> .
>> ./i486-unknown-linux-uclibc-gcc -m64 -print-multi-os-directory
>> .
>> ./i486-unknown-linux-uclibc-gcc -m32 -print-multi-os-directory
>> .
>> ./i486-unknown-linux-uclibc-gcc -m32 -print-multi-lib
>> .
>> 
>> But i need to understand how it can works :D.
>> I don't see any gcc/config/config.h.
>> Can you give me some tips to understand how it's works andrew ?
>> 
>> Regards,
>> Yves
> Look at the staging/<arch>/toolchain/gcc-4.6.3/gcc/config/config.h - 
> here it is. It's modified by patch.
Sorry andrew but i don't find the file:
in source i have gcc-4.6.3/gcc/config but no config.h
in toolchain 
toolchain/i486-unknown-linux-uclibc/lib/gcc/i486-unknown-linux-uclibc/4.6.3 but 
no config.h
in staging nothing about gcc

The file you speak about is perhaps:
source/<toolchain>/toolchain/gcc-4.6.3/gcc/config/i386/linux64.h or
source/<toolchain>/toolchain/gcc-4.6.3/gcc/config/linux.h
 
> And for x86 and other 32bit toolchains config.h is only file 
> that touches anything.
Don't understand sorry.

> There is still one question - about linker lib: it is 
> /lib/ld64-uClibc.so.0 for 64bit and /lib/ld-uClibc.so.0 for 32bit; it's 
> symlink for uClibc library. We can provide into initrd both links, and 
> IMHO it'll be enough good - as far as we shouldn't mix 32bit and 64bit 
> packages in one box.

We can also patch source/<toolchain>/toolchain/gcc-4.6.3/gcc/config/linux.h

#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER32 "/lib32/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"

into

#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER32 UCLIBC_DYNAMIC_LINKER
#define UCLIBC_DYNAMIC_LINKER64 UCLIBC_DYNAMIC_LINKER

And in uClibc patch source/<toolchain>/toolchain/uClibc-0.9.33.2/Rules.mak

ifneq ($(findstring  $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x 
sparc64 x86_64 ),)
UCLIBC_LDSO_NAME := ld64-uClibc
ARCH_NATIVE_BIT := 64
else
UCLIBC_LDSO_NAME := ld-uClibc
ARCH_NATIVE_BIT := 32
endif

into
ifneq ($(findstring  $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x 
sparc64 x86_64 ),)
UCLIBC_LDSO_NAME := ld-uClibc
ARCH_NATIVE_BIT := 64
else
UCLIBC_LDSO_NAME := ld-uClibc
ARCH_NATIVE_BIT := 32
endif


Yves

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to