Skip to content

Commit

Permalink
Merge branch 'v0.12-beta-test' of github.com:portalinux-project/porta…
Browse files Browse the repository at this point in the history
…linux into v0.12-beta-test
  • Loading branch information
cinnamonwolfy committed Aug 20, 2024
2 parents 88b988f + 47aeb01 commit 281c9b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def init
when "gcc"
parsedConfig.store("cross_cc", "#{parsedConfig["triple"]}-gcc")
when "llvm"
parsedConfig.store("cross_cc", File.join(parsedConfig["tcprefix"], "/bin/clang"))
parsedConfig.store("cross_cflags", "--sysroot=#{parsedConfig["sysroot"]}")
parsedConfig.store("cross_cc", "clang")
parsedConfig.store("cross_cflags", "--sysroot=#{parsedConfig["sysroot"]} --target=#{parsedConfig["triple"]}")
else
errorHandler("Unknown toolchain.", false)
end
Expand Down
1 change: 1 addition & 0 deletions lib/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def muslBuild(action, globalVars, isRootfs=false)
muslArgs.store("LIBCC", "#{globalVars["sysroot"]}/lib/linux/libclang_rt.builtins-#{globalVars["linux_arch"]}.a")
muslArgs.store("AR", "#{globalVars["tcprefix"]}/bin/llvm-ar")
muslArgs.store("RANLIB", "#{globalVars["tcprefix"]}/bin/llvm-ranlib")
muslArgs.store("CFLAGS", "#{globalVars["cross_cflags"]}")
end
muslArgs.store("CC", "#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]}")

Expand Down
6 changes: 6 additions & 0 deletions lib/llvm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,11 @@ def toolchainBuild globalVars
puts "Done."
end

if File.exist?("#{globalVars["sysroot"]}/lib/libc.so") == false
print "Building Musl..."
muslBuild("libc", globalVars, false)
puts "Done."
end

errorHandler("Remaining LLVM support unimplemented.", false)
end

0 comments on commit 281c9b3

Please sign in to comment.