Skip to contentSkip to conversation

clang: misc fixes

PATCH New João Marcos Costa 1 participant 3 messages Jun 29

lore
Share & tools
lore
#0 lore raw

cover clang: misc fixes

Hello,

Regarding the first patch, it is dead code for now because get_clang_host_arch() and get_clang_target_arch() are not used anywhere. However, I had prepared some patches to fix them too, then use them to define LLVM_TARGETS_TO_BUILD, but this still needs some testing and I have other changes to submit first.

Best regards,

João Marcos Costa (2):
common-clang.inc: fix undefined name in get_clang_arch clang_git.bb: remove dangling comment

 meta/recipes-devtools/clang/clang_git.bb     | 2 --
 meta/recipes-devtools/clang/common-clang.inc | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.47.0
#1 lore raw

PATCH 1/2 common-clang.inc: fix undefined name in get_clang_arch

Replace arch_val by arch_var, thus fixing:

NameError: name 'arch_val' is not defined. Did you mean: 'arch_var'?

---
 meta/recipes-devtools/clang/common-clang.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/clang/common-clang.inc +1 -1
index ed628008e0..9018094419 100644
@@ -35,7 +35,7 @@ def get_clang_arch(bb, d, arch_var):
     elif re.match('p(pc|owerpc)(|64)', a):             return 'PowerPC'
     elif re.match('loongarch64$', a):                  return 'LoongArch'
     else:
-        bb.fatal("Unhandled architecture %s" % arch_val)
+        bb.fatal("Unhandled architecture %s" % arch_var)
         return ""
 
 def get_clang_host_arch(bb, d):
Signature · 1 line
2.47.0
#2 lore raw

PATCH 2/2 clang_git.bb: remove dangling comment

In reply to João Marcos Costa

CMAKE_VERBOSE is already enabled in cmake.bbclass (inherited in this recipe). I would have considering uncommenting the line if it originally meant to disable the verbose mode.

---
 meta/recipes-devtools/clang/clang_git.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-devtools/clang/clang_git.bb +0 -2
index 662cda1b2e..d55c59ffa0 100644
@@ -54,8 +54,6 @@ OECMAKE_SOURCEPATH = "${S}/clang"
 # linux hosts (.so) on Windows .pyd
 SOLIBSDEV:mingw32 = ".pyd"
 
-#CMAKE_VERBOSE = "VERBOSE=1"
-
 EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
                   -DLLVM_ENABLE_PIC=ON \
                   -DCLANG_DEFAULT_PIE_ON_LINUX=ON \
Signature · 1 line
2.47.0