Skip to content

Commit

Permalink
Add clang-13, clang-14, clang-15 support
Browse files Browse the repository at this point in the history
Refers to #10
  • Loading branch information
a13xp0p0v committed Apr 2, 2023
1 parent bd52206 commit 2691cdf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ __Supported gcc versions:__

__Supported clang versions:__
- clang-12
- clang-13
- clang-14
- clang-15

## Usage

Expand All @@ -44,7 +47,10 @@ Created containers:

```console
$ sudo docker image list | grep kernel-build-container
kernel-build-container gcc-12 283a273fa54d 11 minutes ago 3.03GB
kernel-build-container clang-15 317bcc9cbe7e 19 minutes ago 2.34GB
kernel-build-container clang-14 2801a41dc153 54 minutes ago 1.69GB
kernel-build-container clang-13 155ea2d3f4ad 2 hours ago 2.28GB
kernel-build-container gcc-12 283a273fa54d 3 hours ago 3.03GB
kernel-build-container clang-12 b4891e3c38aa 6 months ago 3.68GB
kernel-build-container gcc-11 443c02ccc2eb 6 months ago 1.01GB
kernel-build-container gcc-10 e1ad5c23c709 6 months ago 1.25GB
Expand Down Expand Up @@ -98,7 +104,7 @@ Get help:
```console
$ python3 make_linux.py -h
usage: make_linux.py [-h] -a {x86_64,i386,arm64,arm} [-k kconfig] -s src -o out
-c {gcc-4.9,gcc-5,gcc-6,gcc-7,gcc-8,gcc-9,gcc-10,gcc-11,gcc-12,clang-12,all}
-c {gcc-4.9,gcc-5,gcc-6,gcc-7,gcc-8,gcc-9,gcc-10,gcc-11,gcc-12,clang-12,clang-13,clang-14,clang-15,all}
...

Build Linux kernel using kernel-build-containers
Expand All @@ -113,7 +119,7 @@ options:
-k kconfig path to kernel kconfig file
-s src Linux kernel sources directory
-o out Build output directory
-c {gcc-4.9,gcc-5,gcc-6,gcc-7,gcc-8,gcc-9,gcc-10,gcc-11,gcc-12,clang-12,all}
-c {gcc-4.9,gcc-5,gcc-6,gcc-7,gcc-8,gcc-9,gcc-10,gcc-11,gcc-12,clang-12,clang-13,clang-14,clang-15,all}
building compiler ('all' to build with each of them)
```

Expand Down
14 changes: 14 additions & 0 deletions build_containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,17 @@ GCC_VERSION="10"
UBUNTU_VERSION="22.04"
build_clang_container ${CLANG_VERSION} ${GCC_VERSION} ${UBUNTU_VERSION}

CLANG_VERSION="13"
GCC_VERSION="11"
UBUNTU_VERSION="22.04"
build_clang_container ${CLANG_VERSION} ${GCC_VERSION} ${UBUNTU_VERSION}

CLANG_VERSION="14"
GCC_VERSION="11"
UBUNTU_VERSION="22.04"
build_clang_container ${CLANG_VERSION} ${GCC_VERSION} ${UBUNTU_VERSION}

CLANG_VERSION="15"
GCC_VERSION="11"
UBUNTU_VERSION="22.04"
build_clang_container ${CLANG_VERSION} ${GCC_VERSION} ${UBUNTU_VERSION}
2 changes: 1 addition & 1 deletion make_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

supported_archs = ['x86_64', 'i386', 'arm64', 'arm']
supported_compilers = ['gcc-4.9', 'gcc-5', 'gcc-6', 'gcc-7', 'gcc-8', 'gcc-9', 'gcc-10', 'gcc-11', 'gcc-12',
'clang-12',
'clang-12', 'clang-13', 'clang-14', 'clang-15',
'all']

NAME_DELIMITER = '__'
Expand Down
3 changes: 3 additions & 0 deletions rm_containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ $SUDO_CMD docker rmi kernel-build-container:gcc-10
$SUDO_CMD docker rmi kernel-build-container:gcc-11
$SUDO_CMD docker rmi kernel-build-container:gcc-12
$SUDO_CMD docker rmi kernel-build-container:clang-12
$SUDO_CMD docker rmi kernel-build-container:clang-13
$SUDO_CMD docker rmi kernel-build-container:clang-14
$SUDO_CMD docker rmi kernel-build-container:clang-15
$SUDO_CMD docker ps -a
$SUDO_CMD docker image ls

0 comments on commit 2691cdf

Please sign in to comment.