Skip to content

Commit 893b4bc

Browse files
no92Andy-Python-Programmer
authored andcommitted
meta: use external Linux headers with the new mlibc option
1 parent 56b30ad commit 893b4bc

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

bootstrap.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,18 +731,41 @@ packages:
731731
# environ:
732732
# DESTDIR: '@THIS_COLLECT_DIR@'
733733

734+
- name: linux-headers
735+
source:
736+
subdir: 'bundled'
737+
url: 'https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.8.tar.xz'
738+
checksum: 'blake2b:1eeab95bf09757131031ebeaa3fb66f01626ecfe3b72d0044176613d027ac6643c688a0bb8f4493ae6faa3d3bf0c89fcdff3c28d7b8375e59ed6e8bd6d856e44'
739+
extract_path: 'linux-6.1.8'
740+
format: 'tar.xz'
741+
version: '6.1.8'
742+
implict_package: true
743+
configure:
744+
- args: ['cp', '-Tr', '@THIS_SOURCE_DIR@', '.']
745+
build:
746+
- args: ['make', 'ARCH=x86_64', 'headers_install']
747+
- args: ['find', 'usr/include', '-type', 'f', '!', '-name', '*.h', '-delete']
748+
- args: ['mkdir', '-p', '@THIS_COLLECT_DIR@/usr']
749+
# remove this file, as mlibc will override this file with one suited to mlibc
750+
- args: ['rm', 'usr/include/linux/libc-compat.h']
751+
- args: ['cp', '-r', 'usr/include', '@THIS_COLLECT_DIR@/usr']
752+
734753
- name: mlibc-headers
735754
from_source: mlibc
736755
implict_package: true
756+
pkgs_required:
757+
- linux-headers
737758
configure:
738759
- args:
739760
- 'meson'
761+
- 'setup'
740762
- '--cross-file'
741763
- '@SOURCE_ROOT@/userland/cross-file.ini'
742764
- '--prefix=/usr'
743765
- '-Dheaders_only=true'
744766
- '-Ddisable_iconv_option=true'
745767
- '-Dbuildtype=debug'
768+
- '-Dlinux_kernel_headers=@BUILD_ROOT@/packages/linux-headers/usr/include'
746769
- '@THIS_SOURCE_DIR@'
747770
build:
748771
- args: ['ninja']
@@ -758,16 +781,19 @@ packages:
758781
implict_package: true
759782
pkgs_required:
760783
- mlibc-headers
784+
- linux-headers
761785
configure:
762786
- args:
763787
- 'meson'
788+
- 'setup'
764789
- '--cross-file'
765790
- '@SOURCE_ROOT@/userland/cross-file.ini'
766791
- '--prefix=/usr'
767792
- '--libdir=lib'
768793
- '-Dmlibc_no_headers=true'
769794
- '-Ddisable_iconv_option=true'
770795
- '-Dbuildtype=debug'
796+
- '-Dlinux_kernel_headers=@BUILD_ROOT@/packages/linux-headers/usr/include'
771797
- '@THIS_SOURCE_DIR@'
772798
build:
773799
- args: ['ninja']

0 commit comments

Comments
 (0)