[Slackbuilds-users] Desmume on 64-bit - optimization flag

j at dawnrazor.net j at dawnrazor.net
Wed Jan 23 14:14:11 UTC 2013


On 2013-01-23 04:26, Matteo Bernardini wrote:
> 2013/1/23 Tim Dickson <dickson.tim at googlemail.com>
>
>> On 23/01/2013 07:21, Matteo Bernardini wrote:
>>
>>> I lied (previous versions are fails)
>>>
>>> SLKCFLAGS=${SLKCFLAGS:--O2}
>>> LIBDIRSUFFIX=""
>>> [ "$(uname -m)" = "x86_64" ] && SLKCFLAGS="$SLKCFLAGS -fPIC" 
>>> LIBDIRSUFFIX="64"
>>> [ "$ARCH" = "i486" ] || [ "$ARCH" = "native" ] && 
>>> SLKCFLAGS="$SLKCFLAGS -march=$ARCH"
>>> [ "$ARCH" = "i486" ] || [ "$ARCH" = "i686" ] && 
>>> SLKCFLAGS="$SLKCFLAGS -mtune=i686"
>> i think you would have difficulties creating 32bit packages from 
>> 64bit (multilib) slackware, as uname -m would set libdirsuffix to 64 
>> which is not what you want for 32bit package. you might have to add a  
>> && ![ "$ARCH" = "i486" ] or something similar after the first part of 
>> the test.
>
> thank for spotting it, you mean something like this?
>

it does not apply, because ARCH should not get changed in order to 
compile 32bit packages on multilib x86_64 bit systems, per 
http://www.slackware.com/~alien/multilib/ :

--
You will be able to use standard SlackBuilds to build 32-bit packages 
for
Slackware64.  There are two things to keep in mind:
(1) You will have to define the ARCH variable as 'x86_64' even though 
you
     are compiling a 32-bit program!
(2) You will have to edit the SlackBuild and if it wants to use 
'lib64/'
     directories for "$ARCH = x86_64", you will have to force it to use 
'lib/'
     directories instead.  Usually, this is accomplished by finding a 
definition
     like:
       LIBDIRSUFFIX="64"
     and change this line to
       LIBDIRSUFFIX=""
--

so this is not even a consideration.


More information about the SlackBuilds-users mailing list