Ignore:
Timestamp:
12/22/2023 07:38:13 PM (6 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, ken/TL2024, lazarus, plabs/newcss, python3.11, rahul/power-profiles-daemon, trunk, xry111/llvm18
Children:
7b63cb6e
Parents:
b9d313c
Message:

liba52: Use -fPIC even on 32-bit x86

See the updated command explanation for rationale of this change. And
it also makes the instruction simpler, so it's a win-win.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • multimedia/libdriv/liba52.xml

    rb9d313c rdcf0bcc2  
    9292            --enable-shared         \
    9393            --disable-static        \
    94             CFLAGS="${CFLAGS:--g -O3} $([ $(uname -m) = x86_64 ] &amp;&amp; echo -fPIC)" &amp;&amp;
     94            CFLAGS="${CFLAGS:--g -O3} -fPIC" &amp;&amp;
    9595make</userinput></screen>
    9696
     
    114114
    115115    <para>
    116       <parameter>CFLAGS="${CFLAGS:--g -O3} ...</parameter>: This sets
    117       CFLAGS to -g -O3
    118       (which is the default) but then on x86_64 adds -fPIC. This is needed to
    119       compile <application>liba52</application> on x86_64.
     116      <parameter>CFLAGS="${CFLAGS:--g -O3} -fPIC"</parameter>: This appends
     117      <option>-fPIC</option> to <envar>CFLAGS</envar> but use
     118      <option>-g -O3</option> (the default of this package) instead of an
     119      empty string when <envar>CFLAGS</envar> is not set.
     120      This is needed to compile <application>liba52</application> without
     121      runtime text relocation.  Runtime text relocation is prohibited on
     122      x86_64 so <option>-fPIC</option> is strictly required.  On 32-bit x86
     123      runtime text relocation is allowed but it's insecure and it may waste
     124      physical RAM, so <option>-fPIC</option> is still better.
    120125    </para>
    121126
Note: See TracChangeset for help on using the changeset viewer.