Skip to content

Commit

Permalink
Update gcc toolset to 14
Browse files Browse the repository at this point in the history
  • Loading branch information
ondj committed Nov 19, 2024
1 parent 5d0804f commit 294f4a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ FROM $BASE_IMAGE AS base
# Some packages requires building, so use different stage for that
FROM base AS builder
COPY su-exec.c /tmp/
RUN dnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False gcc-toolset-13 make && \
source scl_source enable gcc-toolset-13 && \
RUN dnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False gcc-toolset-14 make && \
source scl_source enable gcc-toolset-14 && \
gcc -Wall -Werror -g -o /usr/local/bin/su-exec /tmp/su-exec.c

# Build PHP extensions that are not included in packages
Expand Down
7 changes: 5 additions & 2 deletions bin/misp_compile_php_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Unfortunately, PHP packages from CentOS repos missing some required extensions, so we have to build them
set -e

# Enable GCC Toolset version 13
source scl_source enable gcc-toolset-13
# Enable GCC Toolset version 14
source scl_source enable gcc-toolset-14

set -o xtrace

Expand All @@ -18,6 +18,9 @@ download_and_check () {
# Install required packages for build
dnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=False php-devel brotli-devel diffutils file ssdeep-devel

# Fix PHP for GCC 14
sed -i "s/#if __has_feature(c_atomic)/#if __has_feature(c_atomic) \&\& defined(__clang__)/" /usr/include/php/Zend/zend_atomic.h

# Build modules with march optimised for x86-64-v2
NPROC=$(nproc)
ARCH=$(uname -i)
Expand Down
4 changes: 2 additions & 2 deletions bin/misp_compile_zlib_ng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Copyright (C) 2024 National Cyber and Information Security Agency of the Czech Republic
set -e

# Enable GCC Toolset version 13
source scl_source enable gcc-toolset-13
# Enable GCC Toolset version 14
source scl_source enable gcc-toolset-14

set -o xtrace

Expand Down

0 comments on commit 294f4a0

Please sign in to comment.