Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 72b587a

Browse files
committed
Downgrade compilers for old debian
1 parent bd7a7f4 commit 72b587a

File tree

2 files changed

+35
-21
lines changed

2 files changed

+35
-21
lines changed

.circleci/build-sdklt.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ cd $SDK/appl/demo
2727
make TARGET_PLATFORM=xlr_linux clean -j
2828
make TARGET_PLATFORM=xlr_linux -j 2
2929

30-
TARFOLDER=mktemp -d
31-
32-
cp $SDKLT/src/appl/linux/build/xlr_linux/lkm/knet/linux_ngknet.ko \
33-
$SDKLT/src/appl/linux/build/xlr_linux/lkm/bde/linux_ngbde.ko \
34-
$SDKLT/src/appl/demo/build/xlr_linux/sdklt \
35-
$SDKLT/src/appl/sdklib/build/xlr_linux/include/sdklt \
36-
$SDKLT/src/appl/sdklib/build/xlr_linux/lib/libsdklt.a \
37-
$SDKLT/src/appl/sdklib/build/xlr_linux/lib/libsdklt.so \
38-
${TARFOLDER}
39-
40-
tar czf $HOME/sdklt-${KERNEL_VERSION}.tgz ${TARFOLDER}
30+
TAR_FOLDER=/tmp/sdklt-${KERNEL_VERSION}
31+
mkdir -p ${TAR_FOLDER}
32+
33+
cp -r $SDKLT/src/appl/linux/build/xlr_linux/lkm/knet/linux_ngknet.ko \
34+
$SDKLT/src/appl/linux/build/xlr_linux/lkm/bde/linux_ngbde.ko \
35+
$SDKLT/src/appl/demo/build/xlr_linux/sdklt \
36+
$SDKLT/src/appl/sdklib/build/xlr_linux/include \
37+
$SDKLT/src/appl/sdklib/build/xlr_linux/lib \
38+
${TAR_FOLDER}
39+
40+
tar czf $HOME/sdklt-${KERNEL_VERSION}.tgz \
41+
-C /tmp sdklt-${KERNEL_VERSION}

.circleci/config.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ commands:
2727
name: Setup build environment
2828
command: |
2929
apt update
30-
apt install -y --no-install-recommends libyaml-dev python python-pip python-setuptools libelf-dev wget clang-8 gcc-9 make git ca-certificates ssh
31-
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
32-
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 10
33-
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
30+
apt install -y --no-install-recommends libyaml-dev python python-pip python-setuptools libelf-dev wget make git ca-certificates ssh
3431
pip install pyyaml
3532
- run:
3633
name: Get Kernel sources
@@ -42,23 +39,23 @@ commands:
4239
popd
4340
- checkout
4441
- run:
45-
name: Create build directory
46-
command: mkdir -p ~/build
42+
name: Create staging directory
43+
command: mkdir -p ~/staging
4744
- run:
4845
name: Build SDKLT
4946
command: |
5047
export ADD_CFLAGS="-fomit-frame-pointer -O3"
5148
KERNEL_VERSION=<< parameters.kernel_version >> .circleci/build-sdklt.sh
52-
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/build/sdklt-<< parameters.kernel_version >>.tgz
49+
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/staging/sdklt-<< parameters.kernel_version >>.tgz
5350
- run:
5451
name: Build SDKLT debug
5552
command: |
5653
export ADD_CFLAGS="-g -fno-omit-frame-pointer -O0 -fsanitize=address"
5754
export ADD_LDFLAGS="-fsanitize=address"
5855
KERNEL_VERSION=<< parameters.kernel_version >> .circleci/build-sdklt.sh
59-
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/build/sdklt-debug-<< parameters.kernel_version >>.tgz
56+
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/staging/sdklt-debug-<< parameters.kernel_version >>.tgz
6057
- persist_to_workspace:
61-
root: ~/build/
58+
root: ~/staging/
6259
paths:
6360
- sdklt-<< parameters.kernel_version >>.tgz
6461
- sdklt-debug-<< parameters.kernel_version >>.tgz
@@ -68,13 +65,29 @@ jobs:
6865
docker:
6966
- image: debian:testing
7067
steps:
68+
- run:
69+
name: Setup compiler
70+
command: |
71+
apt update
72+
apt install -y --no-install-recommends clang-8 gcc-9
73+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
74+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 10
75+
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
7176
- build-sdklt:
7277
kernel_version: "4.14.49"
7378

7479
build-3-16-56:
7580
docker:
76-
- image: debian:buster
81+
- image: debian:stretch
7782
steps:
83+
- run:
84+
name: Setup compiler
85+
command: |
86+
apt update
87+
apt install -y --no-install-recommends clang-4.0 gcc-6
88+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10
89+
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 10
90+
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
7891
- build-sdklt:
7992
kernel_version: "3.16.56"
8093

0 commit comments

Comments
 (0)