[Toybox] imgtec patch: Fix static linkage of toybox binary.

enh enh at google.com
Fri May 6 12:56:16 PDT 2016


On Thu, May 5, 2016 at 8:15 PM, Rob Landley <rob at landley.net> wrote:
> On 05/05/2016 06:21 PM, enh wrote:
>> imgtec sent us https://android-review.googlesource.com/#/c/223060/
>>
>> Fix static linkage of toybox binary.
>>
>> If toybox was compiled statically e.g. for use in a recovery ramdisk,
>> it would not build after b66a29a. This is because libselinux already
>> exports a selinux_log_callback() function which getprop.c is trying
>> to override.
>>
>> This change simply makes the second symbol static, since it is only
>> used in a function table so we do not actually need to export it
>> from toybox.
>>
>> Change-Id: I603258877ae2286660df35738bbf4f4285df5b54
>> Signed-off-by: Alistair Strachan <alistair.strachan at imgtec.com>
>>
>>
>>
>> the git cherrypick copy & paste (from the top-right in the gerrit UI) is:
>>
>> git fetch https://android.googlesource.com/platform/external/toybox
>> refs/changes/60/223060/1 && git cherry-pick FETCH_HEAD
>
> I can attest that non-selinux static builds worked fine during this
> period. :)
>
> Applied, and that fetch+cherry-pick thing _also_ seems to avoid a
> gratuitous merge commit, which is very nice.

it also has the happy side-effect (because you keep the gerrit
change-id line) of appearing in the UI as if the originally uploaded
change was merged when i do my command-line merge from github. so if i
hadn't told the imgtec guy i was sending this patch upstream first, as
far as he knows it just got submitted here.

(i'll still keep pointing folks upstream though, because the community
of those fiddling with toybox should be around upstream, not AOSP or
whichever other downstream they happen to use personally.)

> Rob



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.



More information about the Toybox mailing list