[aur-general] Conventions on packages for cross-compiling

Allan McRae allan at archlinux.org
Tue Oct 13 08:11:11 EDT 2009


Vojtech Horky wrote:
> 2009/10/13 Allan McRae <allan at archlinux.org>:
>   
>> Vojtech Horky wrote:
>>     
>>> 2009/10/8 bardo <ilbardo at gmail.com>:
>>>
>>>       
>>>> 2009/10/7 Vojtech Horky <vojta.horky at seznam.cz>:
>>>>
>>>>         
>>>>> Hi all,
>>>>> I am seeking advice how to write correct PKGBUILDs for cross-compilers.
>>>>>
>>>>> The thing I am not sure about is where to install them.
>>>>> Trouble is that even the binary packages use different locations and I
>>>>> haven't found any other source where to get information from (for
>>>>> example, cross-arm-wince-cegcc-binutils uses prefix /opt/cegcc/ while
>>>>> mingw32-gcc uses /usr).
>>>>> So, which location would you recommend/is better?
>>>>>
>>>>>           
>>>> Some time ago I asked the same question about my AVR toolchain, which
>>>> is now in [community]. I think the original thread can be interesting
>>>> to you:
>>>>
>>>> http://mailman.archlinux.org/pipermail/aur-general/2008-January/thread.html#611
>>>>
>>>>
>>>>         
>>>>> Another thing - is the correct naming convention
>>>>> 'cross-<arch>-<pkgname>'?
>>>>>
>>>>>           
>>>> As you see, I just stuck with the '-arch' postfix =)
>>>>
>>>> Corrado
>>>>
>>>>
>>>>         
>>> Hi,
>>> first of all - thanks everybody for the suggestions and the links.
>>>
>>> I read them through, (again and again) looked around how others do it
>>> and finally decided to really write that wiki page as Loui proposed. I
>>> put the guidelines proposal on
>>>
>>> http://wiki.archlinux.org/index.php/Cross_Compiling_Tools_Package_Guidelines_Proposal
>>> I and would be really glad if someone would find some time to read it
>>> and express his opinion.
>>>       
>> I have been looking into cross-compilers a lot lately, and I think the best
>> place to put _all_ their files is /usr/lib/cross-*-*-* and then symlink
>> needed stuff or add wrapper scripts in /usr/bin/.  This is more FHS
>> compliant than the /usr/i486-mingw32 that is used in mingw32 and /usr/avr in
>> the avr one.
>>     
> I agree that it is more FHS compliant but I would prefer to have files
> directly (i.e. no symlinks) where they are supposed to be (e.g. put
> executables into /usr/bin rather than symlinking them from
> /usr/lib/cross*).
>   

I found an issue with just using /usr directly...  see below.

>> Does your proposed build process lead to any "interesting"
>> directories in /usr?
>>     
> No. But sometimes a small hack is needed (e.g. the tooldir settings
> for binutils). Possible conflicts are solved by adding architecture
> prefix and duplicate files are not installed at all (e.g. man pages or
> READMEs).
> BTW, the MIPS cross-compilers
> (http://aur.archlinux.org/packages.php?O=0&K=cross-mips) now follow
> the proposed guidelines from the wiki.
>   

Are there no headers needed for mips?  Seems weird...   and this may be 
an issue with other cross compilers.  If the mingw headers go in 
/usr/include there will be lots of conflicts. 

Allan



More information about the aur-general mailing list