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

Commit

Permalink
Downgrade compilers for old debian
Browse files Browse the repository at this point in the history
  • Loading branch information
pudelkoM committed Feb 7, 2020
1 parent bd7a7f4 commit 72b587a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
23 changes: 12 additions & 11 deletions .circleci/build-sdklt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ cd $SDK/appl/demo
make TARGET_PLATFORM=xlr_linux clean -j
make TARGET_PLATFORM=xlr_linux -j 2

TARFOLDER=mktemp -d

cp $SDKLT/src/appl/linux/build/xlr_linux/lkm/knet/linux_ngknet.ko \
$SDKLT/src/appl/linux/build/xlr_linux/lkm/bde/linux_ngbde.ko \
$SDKLT/src/appl/demo/build/xlr_linux/sdklt \
$SDKLT/src/appl/sdklib/build/xlr_linux/include/sdklt \
$SDKLT/src/appl/sdklib/build/xlr_linux/lib/libsdklt.a \
$SDKLT/src/appl/sdklib/build/xlr_linux/lib/libsdklt.so \
${TARFOLDER}

tar czf $HOME/sdklt-${KERNEL_VERSION}.tgz ${TARFOLDER}
TAR_FOLDER=/tmp/sdklt-${KERNEL_VERSION}
mkdir -p ${TAR_FOLDER}

cp -r $SDKLT/src/appl/linux/build/xlr_linux/lkm/knet/linux_ngknet.ko \
$SDKLT/src/appl/linux/build/xlr_linux/lkm/bde/linux_ngbde.ko \
$SDKLT/src/appl/demo/build/xlr_linux/sdklt \
$SDKLT/src/appl/sdklib/build/xlr_linux/include \
$SDKLT/src/appl/sdklib/build/xlr_linux/lib \
${TAR_FOLDER}

tar czf $HOME/sdklt-${KERNEL_VERSION}.tgz \
-C /tmp sdklt-${KERNEL_VERSION}
33 changes: 23 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ commands:
name: Setup build environment
command: |
apt update
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
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 10
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
apt install -y --no-install-recommends libyaml-dev python python-pip python-setuptools libelf-dev wget make git ca-certificates ssh
pip install pyyaml
- run:
name: Get Kernel sources
Expand All @@ -42,23 +39,23 @@ commands:
popd
- checkout
- run:
name: Create build directory
command: mkdir -p ~/build
name: Create staging directory
command: mkdir -p ~/staging
- run:
name: Build SDKLT
command: |
export ADD_CFLAGS="-fomit-frame-pointer -O3"
KERNEL_VERSION=<< parameters.kernel_version >> .circleci/build-sdklt.sh
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/build/sdklt-<< parameters.kernel_version >>.tgz
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/staging/sdklt-<< parameters.kernel_version >>.tgz
- run:
name: Build SDKLT debug
command: |
export ADD_CFLAGS="-g -fno-omit-frame-pointer -O0 -fsanitize=address"
export ADD_LDFLAGS="-fsanitize=address"
KERNEL_VERSION=<< parameters.kernel_version >> .circleci/build-sdklt.sh
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/build/sdklt-debug-<< parameters.kernel_version >>.tgz
mv ~/sdklt-<< parameters.kernel_version >>.tgz ~/staging/sdklt-debug-<< parameters.kernel_version >>.tgz
- persist_to_workspace:
root: ~/build/
root: ~/staging/
paths:
- sdklt-<< parameters.kernel_version >>.tgz
- sdklt-debug-<< parameters.kernel_version >>.tgz
Expand All @@ -68,13 +65,29 @@ jobs:
docker:
- image: debian:testing
steps:
- run:
name: Setup compiler
command: |
apt update
apt install -y --no-install-recommends clang-8 gcc-9
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 10
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
- build-sdklt:
kernel_version: "4.14.49"

build-3-16-56:
docker:
- image: debian:buster
- image: debian:stretch
steps:
- run:
name: Setup compiler
command: |
apt update
apt install -y --no-install-recommends clang-4.0 gcc-6
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 10
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
- build-sdklt:
kernel_version: "3.16.56"

Expand Down

0 comments on commit 72b587a

Please sign in to comment.