| Message ID | 20251114020447.2540986-1-f_l_k@t-online.de |
|---|---|
| State | Accepted |
| Headers | show |
| Series | [meta-oe] fex: add recipe | expand |
On Thu, Nov 13, 2025 at 6:05 PM Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote: > Fex is a fast usermode x86 and x86-64 emulator for Arm64 Linux > It is used by 'valve' to run windows games on snapdragon > > Compilation requires TOOLCHAIN = "clang" > > Signed-off-by: Markus Volk <f_l_k@t-online.de> > --- > meta-oe/recipes-devtools/fex/fex_2511.bb | 58 ++++++++++++++++++++++++ > 1 file changed, 58 insertions(+) > create mode 100644 meta-oe/recipes-devtools/fex/fex_2511.bb > > diff --git a/meta-oe/recipes-devtools/fex/fex_2511.bb > b/meta-oe/recipes-devtools/fex/fex_2511.bb > new file mode 100644 > index 0000000000..295df8e814 > --- /dev/null > +++ b/meta-oe/recipes-devtools/fex/fex_2511.bb > @@ -0,0 +1,58 @@ > +SUMMARY = "A fast usermode x86 and x86-64 emulator for Arm64 Linux" > +HOMEPAGE = "https://github.com/FEX-Emu/FEX" > +LICENSE = "MIT & BSL-1.0 & BSD-2-Clause" > +LIC_FILES_CHKSUM = "file://LICENSE;md5=70d20d502833c35d6d5a4f0ef5d9efcc" > +LIC_FILES_CHKSUM += > "file://External/range-v3/LICENSE.txt;md5=5dc23d5193abaedb6e42f05650004624" > +LIC_FILES_CHKSUM += > "file://External/xxhash/LICENSE;md5=13be6b481ff5616f77dda971191bb29b" > + > +COMPATIBLE_HOST = "aarch64.*-linux" > + > +REQUIRED_DISTRO_FEATURES = "ld-is-lld" > + > You. can just add LDFLAGS += "-fuse-ld=lld" instead of demanding the distro feature that will make it work with wider variety of distro settings, not many OE distros default to LLD yet. > +SRC_URI = " \ > + git:// > github.com/FEX-Emu/FEX.git;name=fex;protocol=https;nobranch=1;tag=FEX-${PV} > <http://github.com/FEX-Emu/FEX.git;name=fex;protocol=https;nobranch=1;tag=FEX-$%7BPV%7D> > \ > + git:// > github.com/Sonicadvance1/cpp-optparse.git;name=cpp-optparse;subdir=${S}/Source/Common/cpp-optparse;protocol=https;nobranch=1 > <http://github.com/Sonicadvance1/cpp-optparse.git;name=cpp-optparse;subdir=$%7BS%7D/Source/Common/cpp-optparse;protocol=https;nobranch=1> > \ > + git:// > github.com/FEX-Emu/drm-headers.git;name=fex-drm;subdir=${S}/External/drm-headers;protocol=https;nobranch=1 > <http://github.com/FEX-Emu/drm-headers.git;name=fex-drm;subdir=$%7BS%7D/External/drm-headers;protocol=https;nobranch=1> > \ > + git:// > github.com/Cyan4973/xxHash.git;name=xxhash;subdir=${S}/External/xxhash;protocol=https;nobranch=1 > <http://github.com/Cyan4973/xxHash.git;name=xxhash;subdir=$%7BS%7D/External/xxhash;protocol=https;nobranch=1> > \ > + git:// > github.com/FEX-Emu/jemalloc.git;name=jemalloc;subdir=${S}/External/jemalloc;protocol=https;nobranch=1 > <http://github.com/FEX-Emu/jemalloc.git;name=jemalloc;subdir=$%7BS%7D/External/jemalloc;protocol=https;nobranch=1> > \ > + git:// > github.com/FEX-Emu/jemalloc.git;name=jemalloc-glibc;subdir=${S}/External/jemalloc_glibc;protocol=https;nobranch=1 > <http://github.com/FEX-Emu/jemalloc.git;name=jemalloc-glibc;subdir=$%7BS%7D/External/jemalloc_glibc;protocol=https;nobranch=1> > \ > + git:// > github.com/ericniebler/range-v3.git;name=range-v3;subdir=${S}/External/range-v3;protocol=https;nobranch=1 > <http://github.com/ericniebler/range-v3.git;name=range-v3;subdir=$%7BS%7D/External/range-v3;protocol=https;nobranch=1> > \ > + git:// > github.com/FEX-Emu/robin-map.git;name=robin-map;subdir=${S}/External/robin-map;protocol=https;nobranch=1 > <http://github.com/FEX-Emu/robin-map.git;name=robin-map;subdir=$%7BS%7D/External/robin-map;protocol=https;nobranch=1> > \ > +" > + > +SRCREV_FORMAT = "fex" > +SRCREV_fex = "663fd5a98befbf7a0ac585627de15c662715a731" > +SRCREV_cpp-optparse = "9f94388a339fcbb0bc95c17768eb786c85988f6e" > +SRCREV_fex-drm = "3e49836995c1dcb3df709440ad2f270b569c6a5f" > +SRCREV_xxhash = "e626a72bc2321cd320e953a0ccf1584cad60f363" > +SRCREV_jemalloc = "ce24593018ca5d5af7e5661ceda9744e02b59f8f" > +SRCREV_jemalloc-glibc = "8436195ad5e1bc347d9b39743af3d29abee59f06" > +SRCREV_robin-map = "d5683d9f1891e5b04e3e3b2192b5349dc8d814ea" > +SRCREV_range-v3 = "ca1388fb9da8e69314dda222dc7b139ca84e092f" > + > +DEPENDS = " \ > + catch2 \ > + fmt \ > + libdrm \ > + nasm-native \ > + vulkan-headers \ > +" > + > +PACKAGECONFIG = "" > +PACKAGECONFIG[qt] = "-DBUILD_FEXCONFIG=ON,-DBUILD_FEXCONFIG=OFF,qtbase > qttools-native qtquick3d" > + > +EXTRA_OECMAKE += " \ > + -DBUILD_TESTING=OFF \ > + -DENABLE_VIXL_DISASSEMBLER=OFF \ > + -DENABLE_VIXL_SIMULATOR=OFF \ > + -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ > + -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ > + -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ > + -DDATA_DIRECTORY=${datadir} \ > + -DQT_HOST_PATH:PATH=${RECIPE_SYSROOT_NATIVE}${prefix_native} \ > +" > + > +inherit cmake ccache pkgconfig features_check > + > +FILES:${PN} += "${datadir} ${libdir}/binfmt.d ${libdir}/libFEXCore.so" > +FILES:${PN}-dev = "${includedir}" > -- > 2.51.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#121663): > https://lists.openembedded.org/g/openembedded-devel/message/121663 > Mute This Topic: https://lists.openembedded.org/mt/116286410/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ > raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
On Thu, Nov 13 2025 at 18:18:40 -08:00:00, Khem Raj via
lists.openembedded.org <raj.khem=gmail.com@lists.openembedded.org>
wrote:
> LDFLAGS += "-fuse-ld=lld"
Thanks. I will test if that works as well. I needed to set it to lld
because by default it wanted to use gold linker and failed with file
not found
On Thu, Nov 13 2025 at 18:18:40 -08:00:00, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@lists.openembedded.org> wrote: > You. can just add LDFLAGS += "-fuse-ld=lld" instead of demanding the > distro feature > that will make it work with wider variety of distro settings, not > many OE distros default to LLD yet. It works like that. But I also added the feature_check because I was afraid that it would break meta-openembedded world build. If you try to build fex with gcc toolchain it will throw an error
On Thu, Nov 13, 2025 at 6:36 PM Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote: > On Thu, Nov 13 2025 at 18:18:40 -08:00:00, Khem Raj via > lists.openembedded.org <raj.khem=gmail.com@lists.openembedded.org> wrote: > > You. can just add LDFLAGS += "-fuse-ld=lld" instead of demanding the > distro feature > that will make it work with wider variety of distro settings, not many OE > distros default to LLD yet. > > > It works like that. But I also added the feature_check because I was > afraid that it would break meta-openembedded world build. > If you try to build fex with gcc toolchain it will throw an error > Once you set TOOLCHAIN = "clang" then gcc is out of picture. > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#121670): > https://lists.openembedded.org/g/openembedded-devel/message/121670 > Mute This Topic: https://lists.openembedded.org/mt/116286410/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ > raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta-oe/recipes-devtools/fex/fex_2511.bb b/meta-oe/recipes-devtools/fex/fex_2511.bb new file mode 100644 index 0000000000..295df8e814 --- /dev/null +++ b/meta-oe/recipes-devtools/fex/fex_2511.bb @@ -0,0 +1,58 @@ +SUMMARY = "A fast usermode x86 and x86-64 emulator for Arm64 Linux" +HOMEPAGE = "https://github.com/FEX-Emu/FEX" +LICENSE = "MIT & BSL-1.0 & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=70d20d502833c35d6d5a4f0ef5d9efcc" +LIC_FILES_CHKSUM += "file://External/range-v3/LICENSE.txt;md5=5dc23d5193abaedb6e42f05650004624" +LIC_FILES_CHKSUM += "file://External/xxhash/LICENSE;md5=13be6b481ff5616f77dda971191bb29b" + +COMPATIBLE_HOST = "aarch64.*-linux" + +REQUIRED_DISTRO_FEATURES = "ld-is-lld" + +SRC_URI = " \ + git://github.com/FEX-Emu/FEX.git;name=fex;protocol=https;nobranch=1;tag=FEX-${PV} \ + git://github.com/Sonicadvance1/cpp-optparse.git;name=cpp-optparse;subdir=${S}/Source/Common/cpp-optparse;protocol=https;nobranch=1 \ + git://github.com/FEX-Emu/drm-headers.git;name=fex-drm;subdir=${S}/External/drm-headers;protocol=https;nobranch=1 \ + git://github.com/Cyan4973/xxHash.git;name=xxhash;subdir=${S}/External/xxhash;protocol=https;nobranch=1 \ + git://github.com/FEX-Emu/jemalloc.git;name=jemalloc;subdir=${S}/External/jemalloc;protocol=https;nobranch=1 \ + git://github.com/FEX-Emu/jemalloc.git;name=jemalloc-glibc;subdir=${S}/External/jemalloc_glibc;protocol=https;nobranch=1 \ + git://github.com/ericniebler/range-v3.git;name=range-v3;subdir=${S}/External/range-v3;protocol=https;nobranch=1 \ + git://github.com/FEX-Emu/robin-map.git;name=robin-map;subdir=${S}/External/robin-map;protocol=https;nobranch=1 \ +" + +SRCREV_FORMAT = "fex" +SRCREV_fex = "663fd5a98befbf7a0ac585627de15c662715a731" +SRCREV_cpp-optparse = "9f94388a339fcbb0bc95c17768eb786c85988f6e" +SRCREV_fex-drm = "3e49836995c1dcb3df709440ad2f270b569c6a5f" +SRCREV_xxhash = "e626a72bc2321cd320e953a0ccf1584cad60f363" +SRCREV_jemalloc = "ce24593018ca5d5af7e5661ceda9744e02b59f8f" +SRCREV_jemalloc-glibc = "8436195ad5e1bc347d9b39743af3d29abee59f06" +SRCREV_robin-map = "d5683d9f1891e5b04e3e3b2192b5349dc8d814ea" +SRCREV_range-v3 = "ca1388fb9da8e69314dda222dc7b139ca84e092f" + +DEPENDS = " \ + catch2 \ + fmt \ + libdrm \ + nasm-native \ + vulkan-headers \ +" + +PACKAGECONFIG = "" +PACKAGECONFIG[qt] = "-DBUILD_FEXCONFIG=ON,-DBUILD_FEXCONFIG=OFF,qtbase qttools-native qtquick3d" + +EXTRA_OECMAKE += " \ + -DBUILD_TESTING=OFF \ + -DENABLE_VIXL_DISASSEMBLER=OFF \ + -DENABLE_VIXL_SIMULATOR=OFF \ + -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ + -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ + -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ + -DDATA_DIRECTORY=${datadir} \ + -DQT_HOST_PATH:PATH=${RECIPE_SYSROOT_NATIVE}${prefix_native} \ +" + +inherit cmake ccache pkgconfig features_check + +FILES:${PN} += "${datadir} ${libdir}/binfmt.d ${libdir}/libFEXCore.so" +FILES:${PN}-dev = "${includedir}"
Fex is a fast usermode x86 and x86-64 emulator for Arm64 Linux It is used by 'valve' to run windows games on snapdragon Compilation requires TOOLCHAIN = "clang" Signed-off-by: Markus Volk <f_l_k@t-online.de> --- meta-oe/recipes-devtools/fex/fex_2511.bb | 58 ++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 meta-oe/recipes-devtools/fex/fex_2511.bb