Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling i686 build on x86_64 #1865

Open
thesamesam opened this issue Sep 10, 2020 · 2 comments
Open

Disabling i686 build on x86_64 #1865

thesamesam opened this issue Sep 10, 2020 · 2 comments

Comments

@thesamesam
Copy link

Hi,

Downstream in Gentoo, we received a report of a failed ispc build when running on a 'no multilib' profile (essentially an amd64 system which doesn't build 32-bit binaries by choice).

For now, I've worked around this by changing this when we're in such an environment:

    if ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "x86")
-       set(target_arch "i686")
+       return()
    elseif ("${bit}" STREQUAL "64" AND ${arch} STREQUAL "x86")
        set(target_arch "x86_64")

From what I can tell, there isn't a way to disable i686 support via a CMake option directly.

Could you advise if there are any better methods to disable an i686 build on hardware (where the autodetection rightly thinks it is safe/capable of running it)?

Thank you!

@dbabokin
Copy link
Collaborator

Heh, that's an interesting request. This is probably the first time people ask to disable 32-bit support in ISPC. Note, that this is not about host platform, but about target platform. We don't have a way to do that. But disabling it on the platforms that do not support 32 bits it does make sense.

But this request also means that you are using "standard" clang/llvm build, instead of recommended custom build with set of patches. Is there a chance to use our scripts to build LLVM? The set of patches that we are using are required for stability and all of them are backports from LLVM trunk.

@StefanBruens
Copy link

I think most users will use ISPC with host and target arch being identical (ignoring GPU for now).

There is also the case for requiring 64bit on 32bit archs, e.g. 32bit ARM looks for the aarch64 LLVM component:

ispc/CMakeLists.txt

Lines 308 to 309 in 02ed097

if (ARM_ENABLED)
list(APPEND LLVM_COMPONENTS arm aarch64)

Current generations of aarch64 processors are no longer able to run 32bit code (Cortex-A76 and later, Apple M1):
https://www.arm.com/-/media/Arm%20Developer%20Community/PDF/Cortex-A%20R%20M%20datasheets/Arm%20Cortex-A%20Comparison%20Table_v4.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants