php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80717 Calling minilua during cross-compiling
Submitted: 2021-02-06 13:09 UTC Modified: 2022-12-11 13:24 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mhei at heimpold dot de Assigned:
Status: Closed Package: Compile Failure
PHP Version: 8.0.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mhei at heimpold dot de
New email:
PHP Version: OS:

 

 [2021-02-06 13:09 UTC] mhei at heimpold dot de
Description:
------------
During OpenWrt "cross-compiling" for x86_64, we noticed that during the build a minilua compiler is generated and finally invoked. I refer to the following lines
in ext/opcache/jit/Makefile.frag:

  $(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
    $(CC) $(srcdir)/jit/dynasm/minilua.c -lm -o $@

  $(builddir)/jit/zend_jit_x86.c: $(srcdir)/jit/zend_jit_x86.dasc $(srcdir)/jit/dynasm/*.lua $(builddir)/minilua
    $(builddir)/minilua $(srcdir)/jit/dynasm/dynasm.lua  $(DASM_FLAGS) -o $@ $(srcdir)/jit/zend_jit_x86.dasc

While this is fine when doing a native build, it fails for "cross-compiling" e.g. due to different used C libraries (e.g. target=musl, host=glibc). Our solution is to convert the $(CC) to $(HOSTCC) which is then passed via environment. Not sure, whether this is the best solution. Also it might need additional makefile magic for none "cross-compiling" environments.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-11-15 13:39 UTC] cbing at cybernetics dot com
I believe this issue is partially related to https://bugs.php.net/bug.php?id=60109
 [2022-12-11 13:24 UTC] mhei at heimpold dot de
-Status: Open +Status: Closed
 [2022-12-11 13:24 UTC] mhei at heimpold dot de
This issue was fixed with f1ad9199eff32dd805bb5b155002bdb6ca69bf01
so I'm closing it here.
Thanks, mhei
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 05:01:28 2024 UTC