Page MenuHomeWildfire Games

Use local label in inline asm, avoid symbol duplication

Authored by StefanBruens on Aug 2 2020, 9:22 PM.



The global label "unsupported" may lead to duplicated symbols
when the function is inlined in multiple places. This may happen
in any case, but using LTO exposes this problem reliably.


Test Plan

Builds successfully also with LTO on x86 (32bit) now

Diff Detail

rP 0 A.D. Public Repository
Lint Skipped
Unit Tests Skipped

Event Timeline

StefanBruens requested review of this revision.Aug 2 2020, 9:22 PM
StefanBruens created this revision.
StefanBruens edited the test plan for this revision. (Show Details)
Stan added a subscriber: Stan.EditedAug 2 2020, 9:31 PM

Hey there thanks for the patch! I believe you should report that to the upstream of premake :)
I believe @Itms has plans to allow the use of your distro provided premake :)

Stan added a subscriber: Itms.Aug 2 2020, 9:32 PM
Stan edited reviewers, added: Itms; removed: Imarok.Aug 5 2020, 8:12 PM
Itms abandoned this revision.Aug 6 2020, 10:07 AM

Hi Stefan, thanks for this patch. Indeed, we are merely providing a bundled version of premake, and we try to keep it as close as possible from upstream.

If premake is patched and installed on your system, as Stan says, you can build 0 A.D. by calling --with-system-premake5.

You should open this pull request at They are rather quick at reviewing and including changes. I have to warn you that maybe they will also prefer waiting for your fix to be included in mbedtls, so that they upgrade their copy of the lib.

Whenever your change is included and released in premake, feel free to post here and I will gladly upgrade premake to its latest release. In the meantime, I am closing this.