diff --git a/gentoo_llvm_targets.html b/gentoo_llvm_targets.html new file mode 100644 index 0000000..6db2148 --- /dev/null +++ b/gentoo_llvm_targets.html @@ -0,0 +1,286 @@ + + + + + + + +Gentoo LLVM_TARGETS not Working? + + + + + + +
+ UP + | + HOME +
+

Gentoo LLVM_TARGETS not Working?

+

+Recently, I would like to test switching from gcc to clang on my Gentoo VM.
+Because if so, I can install Rust and Zig from source
+without worrying about adding the HUGE clang dependency that won't be used by other packages.
+Later I will remove gcc :)
+

+ +
+

1. problem

+
+

+First I want to make LLVM not targeting too many platform, but changing LLVM_TARGETS don't work
+

+
+
[ebuild  N     ] sys-devel/llvm-15.0.3:15::gentoo  USE="binutils-plugin libffi
+ncurses -debug -doc -exegesis -libedit -test -verify-sig -xar -xml -z3 -zstd"
+LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (MSP430)
+(Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86)
+(XCore) (-ARC) (-CSKY) (-DirectX) (-LoongArch) (-M68k) (-SPIRV)" 241 KiB    
+
+
+
+
+ +
+

2. and I found [solved] LLVM_TARGETS not respected?(Mar 2022) on gentoo forum

+
+

+It seems that global LLVM_TARGETS setting is not respected,
+and flags such as llvm_targets_AArch64, llvm_targets_ARM, are no longer there.
+They're now forced by default as a precaution.
+

+
+
+ + +
+

3. solution

+
+
+
+

3.1. add something like */* -llvm_targets_AArch64 into /etc/portage/profile/package.use.force

+
+

+I excluded all targets exept for X86, but still 3 left: AMDGPU, BPF, NVPTX
+

+
+
+
+

3.2. so I also add sys-devel/llvm -llvm_targets_AMDGPU -llvm_targets_BPF -llvm_targets_NVPTX in /etc/portage/package.use/

+
+
+

3.3. and don't forget to add that three excluder to clang or other compiler that uses llvm

+
+
+ + +
+

4. finally I got this:

+
+
+
[ebuild  N     ] sys-devel/llvm-15.0.3:15::gentoo  USE="binutils-plugin libffi
+ncurses -debug -doc -exegesis -libedit -test -verify-sig -xar -xml -z3 -zstd"
+LLVM_TARGETS="(X86) -AArch64 -AMDGPU (-ARC) -ARM -AVR -BPF (-CSKY) (-DirectX)
+-Hexagon -Lanai (-LoongArch) (-M68k) -MSP430 -Mips -NVPTX -PowerPC -RISCV
+(-SPIRV) -Sparc -SystemZ -VE -WebAssembly -XCore" 241 KiB
+
+
+ +

+in the end, Gentoo cheatsheet and Gentoo Wiki: Clang could be useful.
+

+
+
+
+
+

Date: 2022-10-29 六 00:00

+

Author: dongdigua

+

Created: 2022-10-30 日 14:16

+
+ + diff --git a/gmi/gopher_collections.gmi b/gmi/gopher_collections.gmi index 3d7aefc..8741bae 100644 --- a/gmi/gopher_collections.gmi +++ b/gmi/gopher_collections.gmi @@ -1,7 +1,6 @@ - _____ _ _ - / ___/__ __ _ (_)__ (_) -/ (_ / -_) ' \/ / _ \/ / -\___/\__/_/_/_/_/_//_/_/ + o + /\--) + /\ gem # Gopher/Gemini collections A quiet place in the internet other than HyperText Machine Learning diff --git a/images/monero_request.png b/images/monero_request.png new file mode 100644 index 0000000..19270f7 Binary files /dev/null and b/images/monero_request.png differ diff --git a/index.html b/index.html index f5b050e..afa9953 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,7 @@ (feed "feed.xml") (github "@dongdigua") (bilibili "董地瓜") - (payment "monero") + (payment "Monero") (pgp "0x56CEE157C9F5334F") (interests '("computer science" diff --git a/org/gentoo_llvm_targets.org b/org/gentoo_llvm_targets.org new file mode 100644 index 0000000..4dc7f4a --- /dev/null +++ b/org/gentoo_llvm_targets.org @@ -0,0 +1,44 @@ +#+TITLE: Gentoo LLVM_TARGETS not Working? +#+DATE: <2022-10-29 六> +#+OPTIONS: toc:nil + +Recently, I would like to test switching from =gcc= to =clang= on my Gentoo VM. +Because if so, I can install =Rust= and =Zig= from source +without worrying about adding the HUGE =clang= dependency that won't be used by other packages. +Later I will remove =gcc= :) + +* problem +First I want to make [[https://llvm.org][LLVM]] not targeting too many platform, but changing =LLVM_TARGETS= don't work +#+BEGIN_SRC shell + [ebuild N ] sys-devel/llvm-15.0.3:15::gentoo USE="binutils-plugin libffi + ncurses -debug -doc -exegesis -libedit -test -verify-sig -xar -xml -z3 -zstd" + LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (MSP430) + (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) + (XCore) (-ARC) (-CSKY) (-DirectX) (-LoongArch) (-M68k) (-SPIRV)" 241 KiB +#+END_SRC + +* and I found [[https://forums.gentoo.org/viewtopic.php?p=8694331][[solved] LLVM_TARGETS not respected?]](Mar 2022) on gentoo forum + +It seems that global =LLVM_TARGETS= setting is not respected, +and flags such as =llvm_targets_AArch64=, =llvm_targets_ARM=, are no longer there. +They're now forced by default as a precaution. + + +* /*solution*/ +** add something like =*/* -llvm_targets_AArch64= into =/etc/portage/profile/package.use.force= +I excluded all targets exept for X86, but still 3 left: AMDGPU, BPF, NVPTX +** so I also add =sys-devel/llvm -llvm_targets_AMDGPU -llvm_targets_BPF -llvm_targets_NVPTX= in =/etc/portage/package.use/= +** and don't forget to add that three excluder to clang or other compiler that uses llvm + + +* finally I got this: +#+BEGIN_SRC shell + [ebuild N ] sys-devel/llvm-15.0.3:15::gentoo USE="binutils-plugin libffi + ncurses -debug -doc -exegesis -libedit -test -verify-sig -xar -xml -z3 -zstd" + LLVM_TARGETS="(X86) -AArch64 -AMDGPU (-ARC) -ARM -AVR -BPF (-CSKY) (-DirectX) + -Hexagon -Lanai (-LoongArch) (-M68k) -MSP430 -Mips -NVPTX -PowerPC -RISCV + (-SPIRV) -Sparc -SystemZ -VE -WebAssembly -XCore" 241 KiB +#+END_SRC + +in the end, [[https://wiki.gentoo.org/wiki/Gentoo_Cheat_Sheet][Gentoo cheatsheet]] and [[https://wiki.gentoo.org/wiki/Clang][Gentoo Wiki: Clang]] could be useful. + diff --git a/org/publish_config.el b/org/publish_config.el index 642baf7..13dd5f7 100644 --- a/org/publish_config.el +++ b/org/publish_config.el @@ -66,7 +66,7 @@ "feed.xml" "./../" "https://dongdigua.github.io" - (delete "index.html" (directory-files "./../" nil ".*\.html$")) + (delete "xmr.html" (delete "index.html" (directory-files "./../" nil ".*\.html$"))) :title "dongdigua's blog" :description "Blog!" :builder 'webfeeder-make-rss) diff --git a/posts.md b/posts.md index 50243a3..6b64d33 100644 --- a/posts.md +++ b/posts.md @@ -1,5 +1,6 @@ ## Table of Contents ### Posts (sorted by time) +[Gentoo LLVM\_TARGETS not Working?](gentoo_llvm_targets)
[CentOS/Fedora 不同的配置默认都安装了什么软件](anaconda_kickstarts)
[build a nixos live image](nixos)
[moonboos, 懂的都懂](moonboos)
diff --git a/xmr.html b/xmr.html new file mode 100644 index 0000000..b65fc10 --- /dev/null +++ b/xmr.html @@ -0,0 +1,2 @@ +
+
47LjRRyNYWKf1W5NPmfgZXdZGnGXv4QZRjEnZJbrRRJkAbgikXJGecCNJiP2rny6SR3SSizTVYKJKFdhdKEf5scVMc9Zk1R
diff --git a/xmr.txt b/xmr.txt deleted file mode 100644 index a4dfd69..0000000 --- a/xmr.txt +++ /dev/null @@ -1 +0,0 @@ -47LjRRyNYWKf1W5NPmfgZXdZGnGXv4QZRjEnZJbrRRJkAbgikXJGecCNJiP2rny6SR3SSizTVYKJKFdhdKEf5scVMc9Zk1R