Hello,
I am working on making my OS support Clang. I see no tutorial on how to build compiler-rt with -mno-red-zone, however.
I tried taking matters into my own hands by looking through compiler-rt's build system to figure out how to do this. I theory, this should be easy (just find a place where x86_64 specific C flags can be put and add -mno-red-zone), but compiler-rt's x86 appears to bundle x86_64 and i386, which probably would mess up the build
Any tips on this?
Thanks,
nexos
compiler-rt without red zone
Re: compiler-rt without red zone
For cmake projects I typically run "ccmake ." to show available options (press 't' to toggle advanced options).
For compiler-rt it looks like there are "CMAKE_C_FLAGS" and "CMAKE_CXX_FLAGS" which are standard for C/C++ projects. Your build process with cmake is probably something like:
(edit: I haven't actually tried to build).
For compiler-rt it looks like there are "CMAKE_C_FLAGS" and "CMAKE_CXX_FLAGS" which are standard for C/C++ projects. Your build process with cmake is probably something like:
Code: Select all
mkdir build
cd build
cmake .. -DCMAKE_C_FLAGS=-mno-red-zone -DCMAKE_CXX_FLAGS=-mno-red-zone
make
Re: compiler-rt without red zone
Also, use:
... to actually see the compilation commands.
Code: Select all
make VERBOSE=1