-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
467 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
set(CMAKE_SYSTEM_NAME UnixPaths) | ||
set(CMAKE_SYSTEM_NAME Vinix) | ||
|
||
set(CMAKE_FIND_ROOT_PATH /sysroot) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,93 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# This file was taken from Managarm and I have no clue what it does. | ||
|
||
import argparse | ||
import sys | ||
import os | ||
|
||
our_version = 14 | ||
our_version = 17 | ||
|
||
|
||
def do_version(): | ||
return '{}.0.6'.format(our_version) | ||
return '{}.0.6'.format(our_version) | ||
|
||
|
||
def do_components(): | ||
return 'all all-targets analysis asmparser asmprinter binaryformat bitreader bitwriter codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel gtest gtest_main instcombine instrumentation interpreter ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mirparser native nativecodegen objcarcopts object objectyaml option orcjit passes profiledata runtimedyld scalaropts selectiondag support symbolize tablegen target testingsupport transformutils vectorize windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils' | ||
return 'aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen codegentypes core coroutines coverage debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerparallel dwp engine executionengine extensions filecheck frontendhlsl frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi transformutils ve veasmparser vecodegen vectorize vedesc vedisassembler veinfo webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray' | ||
|
||
|
||
def do_targets_built(): | ||
return 'X86' | ||
return 'AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch Mips MSP430 NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore' | ||
|
||
|
||
def get_includedir(): | ||
return '/sysroot/usr/include' | ||
return '/sysroot/usr/include' | ||
|
||
|
||
def get_libdir(): | ||
return '/sysroot/usr/lib' | ||
return '/sysroot/usr/lib' | ||
|
||
|
||
def do_has_rtti(): | ||
return 'YES' | ||
return 'YES' | ||
|
||
|
||
def do_shared_mode(): | ||
return 'shared' | ||
return 'shared' | ||
|
||
|
||
def do_libs(): | ||
return '-lLLVMAggressiveInstCombine -lLLVMLTO -lLLVMAnalysis -lLLVMLibDriver -lLLVMAsmParser -lLLVMLineEditor -lLLVMAsmPrinter -lLLVMLinker -lLLVMBinaryFormat -lLLVMMC -lLLVMBitReader -lLLVMMCA -lLLVMBitWriter -lLLVMMCDisassembler -lLLVMBitstreamReader -lLLVMMCJIT -lLLVMCFGuard -lLLVMMCParser -lLLVMCFIVerify -lLLVMMIRParser -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMCore -lLLVMObject -lLLVMCoroutines -lLLVMObjectYAML -lLLVMCoverage -lLLVMOption -lLLVMDWARFLinker -lLLVMOrcJIT -lLLVMDWP -lLLVMOrcShared -lLLVMDebugInfoCodeView -lLLVMOrcTargetProcess -lLLVMDebugInfoDWARF -lLLVMPasses -lLLVMDebugInfoGSYM -lLLVMProfileData -lLLVMDebugInfoMSF -lLLVMRemarks -lLLVMDebugInfoPDB -lLLVMRuntimeDyld -lLLVMDebuginfod -lLLVMScalarOpts -lLLVMDemangle -lLLVMSelectionDAG -lLLVMDiff -lLLVMSupport -lLLVMDlltoolDriver -lLLVMSymbolize -lLLVMExecutionEngine -lLLVMTableGen -lLLVMExegesis -lLLVMTableGenGlobalISel -lLLVMExegesisX86 -lLLVMTarget -lLLVMExtensions -lLLVMTextAPI -lLLVMFileCheck -lLLVMTransformUtils -lLLVMFrontendOpenACC -lLLVMVectorize -lLLVMFrontendOpenMP -lLLVMWindowsManifest -lLLVMFuzzMutate -lLLVMX86AsmParser -lLLVMGlobalISel -lLLVMX86CodeGen -lLLVMIRReader -lLLVMX86Desc -lLLVMInstCombine -lLLVMX86Disassembler -lLLVMInstrumentation -lLLVMX86Info -lLLVMInterfaceStub -lLLVMX86TargetMCA -lLLVMInterpreter -lLLVMXRay -lLLVMJITLink -lLLVMipo' | ||
return f'-lLLVM-{our_version}' | ||
|
||
|
||
def do_system_libs(): | ||
return '-lLLVMAggressiveInstCombine -lLLVMLTO -lLLVMAnalysis -lLLVMLibDriver -lLLVMAsmParser -lLLVMLineEditor -lLLVMAsmPrinter -lLLVMLinker -lLLVMBinaryFormat -lLLVMMC -lLLVMBitReader -lLLVMMCA -lLLVMBitWriter -lLLVMMCDisassembler -lLLVMBitstreamReader -lLLVMMCJIT -lLLVMCFGuard -lLLVMMCParser -lLLVMCFIVerify -lLLVMMIRParser -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMCore -lLLVMObject -lLLVMCoroutines -lLLVMObjectYAML -lLLVMCoverage -lLLVMOption -lLLVMDWARFLinker -lLLVMOrcJIT -lLLVMDWP -lLLVMOrcShared -lLLVMDebugInfoCodeView -lLLVMOrcTargetProcess -lLLVMDebugInfoDWARF -lLLVMPasses -lLLVMDebugInfoGSYM -lLLVMProfileData -lLLVMDebugInfoMSF -lLLVMRemarks -lLLVMDebugInfoPDB -lLLVMRuntimeDyld -lLLVMDebuginfod -lLLVMScalarOpts -lLLVMDemangle -lLLVMSelectionDAG -lLLVMDiff -lLLVMSupport -lLLVMDlltoolDriver -lLLVMSymbolize -lLLVMExecutionEngine -lLLVMTableGen -lLLVMExegesis -lLLVMTableGenGlobalISel -lLLVMExegesisX86 -lLLVMTarget -lLLVMExtensions -lLLVMTextAPI -lLLVMFileCheck -lLLVMTransformUtils -lLLVMFrontendOpenACC -lLLVMVectorize -lLLVMFrontendOpenMP -lLLVMWindowsManifest -lLLVMFuzzMutate -lLLVMX86AsmParser -lLLVMGlobalISel -lLLVMX86CodeGen -lLLVMIRReader -lLLVMX86Desc -lLLVMInstCombine -lLLVMX86Disassembler -lLLVMInstrumentation -lLLVMX86Info -lLLVMInterfaceStub -lLLVMX86TargetMCA -lLLVMInterpreter -lLLVMXRay -lLLVMJITLink -lLLVMipo' | ||
return f'-lLLVM-{our_version}' | ||
|
||
|
||
def do_cppflags(): | ||
return '' | ||
return '' | ||
|
||
|
||
def do_cxxflags(): | ||
return '' | ||
return '' | ||
|
||
|
||
def do_ldflags(): | ||
return '-L' + get_libdir() | ||
return '-L' + get_libdir() | ||
|
||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument('--version', action='append_const', dest='command', const=do_version) | ||
parser.add_argument('--targets-built', action='append_const', dest='command', const=do_targets_built) | ||
parser.add_argument('--components', action='append_const', dest='command', const=do_components) | ||
parser.add_argument('--includedir', action='append_const', dest='command', const=get_includedir) | ||
parser.add_argument('--libdir', action='append_const', dest='command', const=get_libdir) | ||
parser.add_argument('--has-rtti', action='append_const', dest='command', const=do_has_rtti) | ||
parser.add_argument('--shared-mode', action='append_const', dest='command', const=do_shared_mode) | ||
parser.add_argument('--link-shared', action='store_const', dest='link', const='shared') | ||
parser.add_argument('--cppflags', action='append_const', dest='command', const=do_cppflags) | ||
parser.add_argument('--cxxflags', action='append_const', dest='command', const=do_cxxflags) | ||
parser.add_argument('--ldflags', action='append_const', dest='command', const=do_ldflags) | ||
parser.add_argument('--libs', action='append_const', dest='command', const=do_libs) | ||
parser.add_argument('--system-libs', action='append_const', dest='command', const=do_system_libs) | ||
parser.add_argument('--version', action='append_const', | ||
dest='command', const=do_version) | ||
parser.add_argument('--targets-built', action='append_const', | ||
dest='command', const=do_targets_built) | ||
parser.add_argument('--components', action='append_const', | ||
dest='command', const=do_components) | ||
parser.add_argument('--includedir', action='append_const', | ||
dest='command', const=get_includedir) | ||
parser.add_argument('--libdir', action='append_const', | ||
dest='command', const=get_libdir) | ||
parser.add_argument('--has-rtti', action='append_const', | ||
dest='command', const=do_has_rtti) | ||
parser.add_argument('--shared-mode', action='append_const', | ||
dest='command', const=do_shared_mode) | ||
parser.add_argument('--link-shared', action='store_const', | ||
dest='link', const='shared') | ||
parser.add_argument('--cppflags', action='append_const', | ||
dest='command', const=do_cppflags) | ||
parser.add_argument('--cxxflags', action='append_const', | ||
dest='command', const=do_cxxflags) | ||
parser.add_argument('--ldflags', action='append_const', | ||
dest='command', const=do_ldflags) | ||
parser.add_argument('--libs', action='append_const', | ||
dest='command', const=do_libs) | ||
parser.add_argument('--system-libs', action='append_const', | ||
dest='command', const=do_system_libs) | ||
parser.add_argument('components', type=str, nargs='*') | ||
|
||
print("cross-llvm-config:", sys.argv, file=sys.stderr) | ||
|
||
args = parser.parse_args() | ||
for command in args.command: | ||
result = command() | ||
print("cross-llvm-config yields:", result, file=sys.stderr) | ||
print(result) | ||
|
||
result = command() | ||
print("cross-llvm-config yields:", result, file=sys.stderr) | ||
print(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name=cmake | ||
from_source=cmake | ||
revision=1 | ||
imagedeps="gcc" | ||
|
||
build() { | ||
"${source_dir}"/configure --prefix="${prefix}" --parallel="${parallelism}" | ||
|
||
make -j${parallelism} | ||
} | ||
|
||
package() { | ||
DESTDIR="${dest_dir}" make install | ||
echo 'include(Platform/UnixPaths)' > "${dest_dir}${prefix}/share/cmake-3.28/Modules/Platform/Vinix.cmake" | ||
|
||
strip_command=strip \ | ||
post_package_strip | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.