Skip to content

SDL flags update#4070

Open
rasapala wants to merge 4 commits intomainfrom
sdl_flags_update
Open

SDL flags update#4070
rasapala wants to merge 4 commits intomainfrom
sdl_flags_update

Conversation

@rasapala
Copy link
Collaborator

🛠 Summary

SDL flags update
JIRA CVS-181516

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

Copilot AI review requested due to automatic review settings March 19, 2026 11:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the compiler “SDL” flag sets used during container builds (and OpenCV-from-source install) to align with the new baseline.

Changes:

  • Bumps _FORTIFY_SOURCE from 1 to 3 in multiple build flag definitions.
  • Adds -D_GLIBCXX_USE_CXX11_ABI=1 and -Wuninitialized to the shared flag sets used by OpenCV/Azure/tokenizers/custom-nodes builds.
  • Removes -Wno-error=deprecated-declarations from the Azure Storage CMake invocation on Ubuntu.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
third_party/opencv/install_opencv.sh Updates the CMake C++ flags used to build OpenCV from source.
src/custom_nodes/Dockerfile.ubuntu Updates compiler flags used when building the sample custom node (Ubuntu).
src/custom_nodes/Dockerfile.redhat Updates compiler flags used when building the sample custom node (Red Hat/UBI).
Dockerfile.ubuntu Updates SDL flags for building cpprestsdk and OpenVINO tokenizers; adjusts Azure Storage build flags on Ubuntu.
Dockerfile.redhat Updates SDL flags for building cpprestsdk and OpenVINO tokenizers on Red Hat.


WORKDIR /azure/azure-storage-cpp/Microsoft.WindowsAzure.Storage/build.release
RUN CASABLANCA_DIR=/azure/cpprestsdk cmake .. -DCMAKE_CXX_FLAGS="${SDL_OPS} -Wno-error=deprecated-declarations" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBoost_USE_STATIC_RUNTIME=ON -DBoost_USE_STATIC_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=ON && make --jobs=$JOBS && make --jobs=$JOBS install
RUN CASABLANCA_DIR=/azure/cpprestsdk cmake .. -DCMAKE_CXX_FLAGS="${SDL_OPS}" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBoost_USE_STATIC_RUNTIME=ON -DBoost_USE_STATIC_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=ON && make --jobs=$JOBS && make --jobs=$JOBS install
patch -d /azure/azure-storage-cpp/ -p1 </ovms/third_party/azure/azure_sdk.patch

ARG SDL_OPS="-fpic -O2 -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer -D_FORTIFY_SOURCE=1 -fno-strict-overflow -Wall -Wno-unknown-pragmas -Wno-error=sign-compare -fno-delete-null-pointer-checks -fwrapv -fstack-clash-protection -Wformat -Wformat-security -Werror=format-security"
ARG SDL_OPS="-fpic -O2 -U_FORTIFY_SOURCE -fstack-protector -D_FORTIFY_SOURCE=3 -fno-strict-overflow -Wall -Wno-unknown-pragmas -Wno-error=sign-compare -fno-delete-null-pointer-checks -fwrapv -fstack-clash-protection -Wformat -Wformat-security -Werror=format-security -D_GLIBCXX_USE_CXX11_ABI=1 -Wuninitialized"
opencv_branch=${opencv_branch:-4.12.0}
work_dir=${work_dir:-/opt}
SDL_OPS="-fpic -O2 -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer -D_FORTIFY_SOURCE=1 -fno-strict-overflow -Wall -Wno-unknown-pragmas -Wno-error=sign-compare -fno-delete-null-pointer-checks -fwrapv -fstack-clash-protection -Wformat -Wformat-security -Werror=format-security"
SDL_OPS="-fpic -O2 -U_FORTIFY_SOURCE -fstack-protector -D_FORTIFY_SOURCE=3 -fno-strict-overflow -Wall -Wno-unknown-pragmas -Wno-error=sign-compare -fno-delete-null-pointer-checks -fwrapv -fstack-clash-protection -Wformat -Wformat-security -Werror=format-security -D_GLIBCXX_USE_CXX11_ABI=1 -Wuninitialized"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants