From bd5969fc876a10b18613302db7087ef3c40f18e1 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:00 -0500 Subject: lib: Add mlibc Signed-off-by: Ian Moffett --- lib/mlibc/ci/abidiff_suppress.ini | 2 + lib/mlibc/ci/aero.cross-file | 12 +++ lib/mlibc/ci/bootstrap.yml | 181 ++++++++++++++++++++++++++++++++++ lib/mlibc/ci/dripos.cross-file | 12 +++ lib/mlibc/ci/ironclad.cross-file | 12 +++ lib/mlibc/ci/keyronex.cross-file | 9 ++ lib/mlibc/ci/lemon.cross-file | 12 +++ lib/mlibc/ci/linux-aarch64.cross-file | 13 +++ lib/mlibc/ci/linux-riscv64.cross-file | 13 +++ lib/mlibc/ci/linux-x86.cross-file | 10 ++ lib/mlibc/ci/linux-x86_64.cross-file | 9 ++ lib/mlibc/ci/lyre.cross-file | 12 +++ lib/mlibc/ci/managarm.cross-file | 12 +++ 13 files changed, 309 insertions(+) create mode 100644 lib/mlibc/ci/abidiff_suppress.ini create mode 100644 lib/mlibc/ci/aero.cross-file create mode 100644 lib/mlibc/ci/bootstrap.yml create mode 100644 lib/mlibc/ci/dripos.cross-file create mode 100644 lib/mlibc/ci/ironclad.cross-file create mode 100644 lib/mlibc/ci/keyronex.cross-file create mode 100644 lib/mlibc/ci/lemon.cross-file create mode 100644 lib/mlibc/ci/linux-aarch64.cross-file create mode 100644 lib/mlibc/ci/linux-riscv64.cross-file create mode 100644 lib/mlibc/ci/linux-x86.cross-file create mode 100644 lib/mlibc/ci/linux-x86_64.cross-file create mode 100644 lib/mlibc/ci/lyre.cross-file create mode 100644 lib/mlibc/ci/managarm.cross-file (limited to 'lib/mlibc/ci') diff --git a/lib/mlibc/ci/abidiff_suppress.ini b/lib/mlibc/ci/abidiff_suppress.ini new file mode 100644 index 0000000..0f68976 --- /dev/null +++ b/lib/mlibc/ci/abidiff_suppress.ini @@ -0,0 +1,2 @@ +[suppress_function] +name_regexp = ^(mlibc|frg|std)::.* diff --git a/lib/mlibc/ci/aero.cross-file b/lib/mlibc/ci/aero.cross-file new file mode 100644 index 0000000..48772eb --- /dev/null +++ b/lib/mlibc/ci/aero.cross-file @@ -0,0 +1,12 @@ +[binaries] +c = 'x86_64-linux-mlibc-gcc' +cpp = 'x86_64-linux-mlibc-g++' + +[properties] +needs_exe_wrapper = true + +[host_machine] +system = 'aero' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/lib/mlibc/ci/bootstrap.yml b/lib/mlibc/ci/bootstrap.yml new file mode 100644 index 0000000..f166bcc --- /dev/null +++ b/lib/mlibc/ci/bootstrap.yml @@ -0,0 +1,181 @@ +declare_options: + - name: arch + default: x86_64 + +sources: + - name: mlibc + git: 'https://github.com/managarm/mlibc.git' + branch: 'master' + + - name: linux + url: 'https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.8.tar.xz' + extract_path: 'linux-6.1.8' + format: 'tar.xz' + version: '6.1.8' + +tools: + +packages: + - name: mlibc + architecture: '@OPTION:arch@' + from_source: mlibc + pkgs_required: + - linux-headers + configure: + - args: + - 'meson' + - 'setup' + - '--prefix=/usr' + - '--libdir=lib' + - '--buildtype=debugoptimized' + - "-Dc_args=['-Wno-error=maybe-uninitialized']" + - "-Dcpp_args=['-Wno-error=maybe-uninitialized']" + - "-Dbuild_tests=true" + - "-Db_sanitize=undefined" + - "-Ddefault_library=both" + - "-Dwerror=true" + - '-Dlinux_kernel_headers=@BUILD_ROOT@/packages/linux-headers/usr/include' + - "--cross-file=@THIS_SOURCE_DIR@/ci/linux-@OPTION:arch@.cross-file" + - '@THIS_SOURCE_DIR@' + environ: + CFLAGS: '-Wno-error=maybe-uninitialized' + CXXFLAGS: '-Wno-error=maybe-uninitialized' + build: + - args: ['ninja'] + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + quiet: true + + - name: mlibc-static + architecture: '@OPTION:arch@' + from_source: mlibc + pkgs_required: + - linux-headers + configure: + - args: + - 'meson' + - 'setup' + - '--prefix=/usr' + - '--libdir=lib' + - '--buildtype=debugoptimized' + - "-Dc_args=['-Wno-error=maybe-uninitialized']" + - "-Dcpp_args=['-Wno-error=maybe-uninitialized']" + - "-Dbuild_tests=true" + - "-Db_sanitize=undefined" + - "-Ddefault_library=static" + - "-Dwerror=true" + - '-Dlinux_kernel_headers=@BUILD_ROOT@/packages/linux-headers/usr/include' + - "--cross-file=@THIS_SOURCE_DIR@/ci/linux-@OPTION:arch@.cross-file" + - '@THIS_SOURCE_DIR@' + build: + - args: ['ninja'] + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + quiet: true + + - name: mlibc-shared + from_source: mlibc + pkgs_required: + - linux-headers + configure: + - args: + - 'meson' + - 'setup' + - '--prefix=/usr' + - '--libdir=lib' + - '--buildtype=debugoptimized' + - "-Dc_args=['-Wno-error=maybe-uninitialized']" + - "-Dcpp_args=['-Wno-error=maybe-uninitialized']" + - "-Dbuild_tests=true" + - "-Db_sanitize=undefined" + - "-Ddefault_library=shared" + - "-Dwerror=true" + - '-Dlinux_kernel_headers=@BUILD_ROOT@/packages/linux-headers/usr/include' + - "--cross-file=@THIS_SOURCE_DIR@/ci/linux-@OPTION:arch@.cross-file" + - '@THIS_SOURCE_DIR@' + build: + - args: ['ninja'] + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + quiet: true + + - name: mlibc-ansi-only + architecture: '@OPTION:arch@' + from_source: mlibc + pkgs_required: + - linux-headers + configure: + - args: + - 'meson' + - 'setup' + - '--prefix=/usr' + - '--libdir=lib' + - '--buildtype=debugoptimized' + - "-Dc_args=['-Wno-error=maybe-uninitialized']" + - "-Dcpp_args=['-Wno-error=maybe-uninitialized']" + - "-Dbuild_tests=true" + - "-Db_sanitize=undefined" + - "-Ddefault_library=both" + - "-Dwerror=true" + - "-Ddisable_posix_option=true" + - "-Ddisable_linux_option=true" + - "-Ddisable_glibc_option=true" + - "-Ddisable_bsd_option=true" + - '-Dlinux_kernel_headers=@BUILD_ROOT@/packages/linux-headers/usr/include' + - "--cross-file=@THIS_SOURCE_DIR@/ci/linux-@OPTION:arch@.cross-file" + - '@THIS_SOURCE_DIR@' + build: + - args: ['ninja'] + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + quiet: true + + - name: mlibc-headers-only + architecture: '@OPTION:arch@' + from_source: mlibc + pkgs_required: + - linux-headers + configure: + - args: + - 'meson' + - 'setup' + - '--prefix=/usr' + - '--libdir=lib' + - '--buildtype=debugoptimized' + - "-Dc_args=['-Wno-error=maybe-uninitialized']" + - "-Dcpp_args=['-Wno-error=maybe-uninitialized']" + - "-Db_sanitize=undefined" + - "-Dwerror=true" + - "-Dheaders_only=true" + - '-Dlinux_kernel_headers=@BUILD_ROOT@/packages/linux-headers/usr/include' + - "--cross-file=@THIS_SOURCE_DIR@/ci/linux-@OPTION:arch@.cross-file" + - '@THIS_SOURCE_DIR@' + build: + - args: ['ninja'] + - args: ['ninja', 'install'] + environ: + DESTDIR: '@THIS_COLLECT_DIR@' + quiet: true + + - name: linux-headers + architecture: '@OPTION:arch@' + from_source: linux + configure: + # custom build system requires in tree-ish builds + - args: ['cp', '-Tr', '@THIS_SOURCE_DIR@/', '.'] + build: + - args: | + LINUX_ARCH="@OPTION:arch@" + case "$LINUX_ARCH" in + "aarch64") + LINUX_ARCH="arm64" + ;; + "riscv64") + LINUX_ARCH="riscv" + ;; + esac + make O=@THIS_COLLECT_DIR@ ARCH="$LINUX_ARCH" headers_install diff --git a/lib/mlibc/ci/dripos.cross-file b/lib/mlibc/ci/dripos.cross-file new file mode 100644 index 0000000..6a79be9 --- /dev/null +++ b/lib/mlibc/ci/dripos.cross-file @@ -0,0 +1,12 @@ +[binaries] +c = 'x86_64-linux-mlibc-gcc' +cpp = 'x86_64-linux-mlibc-g++' + +[properties] +needs_exe_wrapper = true + +[host_machine] +system = 'dripos' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/lib/mlibc/ci/ironclad.cross-file b/lib/mlibc/ci/ironclad.cross-file new file mode 100644 index 0000000..f016592 --- /dev/null +++ b/lib/mlibc/ci/ironclad.cross-file @@ -0,0 +1,12 @@ +[binaries] +c = 'x86_64-linux-mlibc-gcc' +cpp = 'x86_64-linux-mlibc-g++' + +[properties] +needs_exe_wrapper = true + +[host_machine] +system = 'ironclad' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/lib/mlibc/ci/keyronex.cross-file b/lib/mlibc/ci/keyronex.cross-file new file mode 100644 index 0000000..d77a540 --- /dev/null +++ b/lib/mlibc/ci/keyronex.cross-file @@ -0,0 +1,9 @@ +[binaries] +c = ['x86_64-linux-mlibc-gcc'] +cpp = ['x86_64-linux-mlibc-g++'] + +[host_machine] +system = 'keyronex' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/lib/mlibc/ci/lemon.cross-file b/lib/mlibc/ci/lemon.cross-file new file mode 100644 index 0000000..23dcf7e --- /dev/null +++ b/lib/mlibc/ci/lemon.cross-file @@ -0,0 +1,12 @@ +[binaries] +c = 'x86_64-linux-mlibc-gcc' +cpp = 'x86_64-linux-mlibc-g++' + +[properties] +needs_exe_wrapper = true + +[host_machine] +system = 'lemon' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/lib/mlibc/ci/linux-aarch64.cross-file b/lib/mlibc/ci/linux-aarch64.cross-file new file mode 100644 index 0000000..f1843ae --- /dev/null +++ b/lib/mlibc/ci/linux-aarch64.cross-file @@ -0,0 +1,13 @@ +[properties] +skip_sanity_check = true + +[binaries] +c = ['aarch64-linux-mlibc-gcc'] +cpp = ['aarch64-linux-mlibc-g++'] +exe_wrapper = 'qemu-aarch64' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'unknown' +endian = 'little' diff --git a/lib/mlibc/ci/linux-riscv64.cross-file b/lib/mlibc/ci/linux-riscv64.cross-file new file mode 100644 index 0000000..283eaf2 --- /dev/null +++ b/lib/mlibc/ci/linux-riscv64.cross-file @@ -0,0 +1,13 @@ +[properties] +skip_sanity_check = true + +[binaries] +c = ['riscv64-linux-mlibc-gcc'] +cpp = ['riscv64-linux-mlibc-g++'] +exe_wrapper = 'qemu-riscv64' + +[host_machine] +system = 'linux' +cpu_family = 'riscv64' +cpu = 'unknown' +endian = 'little' diff --git a/lib/mlibc/ci/linux-x86.cross-file b/lib/mlibc/ci/linux-x86.cross-file new file mode 100644 index 0000000..edad985 --- /dev/null +++ b/lib/mlibc/ci/linux-x86.cross-file @@ -0,0 +1,10 @@ +[binaries] +c = 'i686-linux-mlibc-gcc' +cpp = 'i686-linux-mlibc-g++' +exe_wrapper = 'qemu-i386' + +[host_machine] +system = 'linux' +cpu_family = 'x86' +cpu = 'i386' +endian = 'little' diff --git a/lib/mlibc/ci/linux-x86_64.cross-file b/lib/mlibc/ci/linux-x86_64.cross-file new file mode 100644 index 0000000..fdf2b2d --- /dev/null +++ b/lib/mlibc/ci/linux-x86_64.cross-file @@ -0,0 +1,9 @@ +[binaries] +c = ['x86_64-linux-mlibc-gcc'] +cpp = ['x86_64-linux-mlibc-g++'] + +[host_machine] +system = 'linux' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/lib/mlibc/ci/lyre.cross-file b/lib/mlibc/ci/lyre.cross-file new file mode 100644 index 0000000..1d4cd70 --- /dev/null +++ b/lib/mlibc/ci/lyre.cross-file @@ -0,0 +1,12 @@ +[binaries] +c = 'x86_64-linux-mlibc-gcc' +cpp = 'x86_64-linux-mlibc-g++' + +[properties] +needs_exe_wrapper = true + +[host_machine] +system = 'lyre' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/lib/mlibc/ci/managarm.cross-file b/lib/mlibc/ci/managarm.cross-file new file mode 100644 index 0000000..0e1d48f --- /dev/null +++ b/lib/mlibc/ci/managarm.cross-file @@ -0,0 +1,12 @@ +[binaries] +c = 'x86_64-linux-mlibc-gcc' +cpp = 'x86_64-linux-mlibc-g++' + +[properties] +needs_exe_wrapper = true + +[host_machine] +system = 'managarm' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' -- cgit v1.2.3