HULL/cmake/compilers/gnu.cmake
Simon McVittie dc00968bc1 client: Remove i386 GNU assembler version of S_WriteLinearBlastStereo16()
This was the last remaining GNU assembler code that was in its own
independent source file, as opposed to being embedded in C code with
GNU `__asm__ volatile` or MSVC `__asm` (which tends to be much easier
to deal with in a modern build system).

When the Quake 3 engine was originally written, this might have been
an "expensive" function when written in portable C, but after 25 years
of CPU development it's less likely to matter (and modern compilers
might produce faster results from the C code anyway).

Resolves: https://github.com/ioquake/ioq3/issues/778
Signed-off-by: Simon McVittie <smcv@debian.org>
2025-08-23 21:23:03 +01:00

32 lines
965 B
CMake

# GNU style (GCC/Clang) compiler specific settings
if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang$")
return()
endif()
enable_language(ASM)
set(ASM_SOURCES
${SOURCE_DIR}/asm/ftola.c
${SOURCE_DIR}/asm/snapvector.c
)
add_compile_options(-Wall -Wimplicit
-Wstrict-prototypes -Wformat=2 -Wformat-security
-Wstrict-aliasing=2 -Wmissing-format-attribute
-Wdisabled-optimization -Werror-implicit-function-declaration)
add_compile_options(-Wno-format-zero-length -Wno-format-nonliteral)
# There are lots of instances of union based aliasing in the code
# that rely on the compiler not optimising them away, so disable it
add_compile_options(-fno-strict-aliasing)
# This is necessary to hide all symbols unless explicitly exported
# via the Q_EXPORT macro
add_compile_options(-fvisibility=hidden)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX /opt/quake3)
endif()