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

[make] Clang on Linux #170

Open
OPNA2608 opened this issue Dec 3, 2020 · 0 comments
Open

[make] Clang on Linux #170

OPNA2608 opened this issue Dec 3, 2020 · 0 comments
Labels

Comments

@OPNA2608
Copy link

OPNA2608 commented Dec 3, 2020

Describe the bug

  1. The build system has GNU's g++ hardcoded in several places. That is to say, CC is unconditionally redefined as g++ and some non-standardized variables like magic_CC, magic_CXX and CPP are used for compilation
  2. A Clang-compiled binary crashes with SIGILL. Several non-error warnings during compilation indicate that there are many functions with a declared return type that don't return any value, which generates an ud2 instruction, which causing the aforementioned illegal instruction signal to be emitted.

To Reproduce
Steps to reproduce the behavior:
1)

  1. Attempt to compile ST on Linux without GCC
  2. Errors out very quickly on g++: command not found
  3. Use the 0001 patch i posted on the discord server. Additionally pass magic_CC=$CC magic_CXX=$CXX to make (assuming both default to their clang equivalents)
  4. Build succeeds and binaries are being generated
  5. Running either of them results in a SIGILL

Expected behavior

  1. Free choice of compiler, no matter the platform's default / common option
  2. Working binaries with Clang

Screenshots
grafik
grafik

Desktop (please complete the following information):

  • OS: Linux [NixOS 20.09 (Nightingale) x86_64]
  • Version v0.2.0

Additional context
Discussed on the Discord server, WIP patches sent there.

@OPNA2608 OPNA2608 added the bug label Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 participant