mips-mlir-xgot
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 4 Dec 2024 12:11:08 +0000 (13:11 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 4 Dec 2024 12:11:08 +0000 (13:11 +0100)
===================================================================

Gbp-Pq: Name mips-mlir-xgot.diff

mlir/CMakeLists.txt

index c6d44908a1111d0cf97d340b1e4791eb2f88e097..885efd819bc8a759bf0e343c1852ebe32dbe36f2 100644 (file)
@@ -93,6 +93,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LE
   append_if(CXX_SUPPORTS_WNO_UNUSED_BUT_SET_PARAMETER "-Wno-unused-but-set-parameter" CMAKE_CXX_FLAGS)
 endif()
 
+check_symbol_exists(__mips "" __MIPS)
+append_if(__MIPS "-mxgot" CMAKE_C_FLAGS)
+append_if(__MIPS "-mxgot" CMAKE_CXX_FLAGS)
+
 # Installing the headers and docs needs to depend on generating any public
 # tablegen'd targets.
 # mlir-generic-headers are dialect-independent.