# compiler flags

Published articles for compiler flags.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## ESP-IDF: Propagating compiler flags to ExternalProject builds

DevFeed: [ESP-IDF: Propagating compiler flags to ExternalProject builds](<https://devfeed.tech/articles/esp-idf-propagating-compiler-flags-to-externalproject-builds-13766.md>)

Original publisher: [Read original article](<https://developer.espressif.com/blog/2026/04/propagating-compiler-flags-to-externalproject/>)

Author: John Lee

Published: 2026-04-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [Blog on Developer Portal](<https://devfeed.tech/sources/blog-on-developer-portal.md>)

Topics: [ESP-IDF](<https://devfeed.tech/topics/esp-idf.md>), [CMake](<https://devfeed.tech/topics/cmake.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [build](<https://devfeed.tech/tags/build.md>), [build-system](<https://devfeed.tech/tags/build-system.md>), [cmake](<https://devfeed.tech/tags/cmake.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compiler-flags](<https://devfeed.tech/tags/compiler-flags.md>), [esp-idf](<https://devfeed.tech/tags/esp-idf.md>)

### AI overview

This ESP-IDF post explains why compiler options driven by Kconfig and components do not automatically propagate to ExternalProject_Add() builds. It describes using response files tied to the appropriate build context to keep compiler flags aligned between the outer and nested CMake projects.

### Source excerpt

When an ESP-IDF project uses ExternalProject_Add(), compiler options driven by Kconfig and components do not flow into the nested build on their own. This post walks through why that happens and how to keep the outer and inner CMake worlds aligned.

## This Shit is Hard: Hardening glibc

DevFeed: [This Shit is Hard: Hardening glibc](<https://devfeed.tech/articles/this-shit-is-hard-hardening-glibc-13281.md>)

Original publisher: [Read original article](<https://www.chainguard.dev/unchained/this-shit-is-hard-hardening-glibc>)

Published: 2025-08-20T00:00:00Z

Content type: article

Language: en

Sources: [Chainguard: Unchained](<https://devfeed.tech/sources/chainguard-unchained.md>)

Topics: [Security](<https://devfeed.tech/topics/security.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [gcc](<https://devfeed.tech/topics/gcc.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [chainguard](<https://devfeed.tech/topics/chainguard.md>), [chainguard packages](<https://devfeed.tech/topics/chainguard-packages.md>), [C](<https://devfeed.tech/topics/c.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-c-plus-plus](<https://devfeed.tech/tags/c-c-plus-plus.md>), [chainguard](<https://devfeed.tech/tags/chainguard.md>), [chainguard-containers](<https://devfeed.tech/tags/chainguard-containers.md>), [chainguard-security](<https://devfeed.tech/tags/chainguard-security.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compiler-flags](<https://devfeed.tech/tags/compiler-flags.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [glibc](<https://devfeed.tech/tags/glibc.md>), [hardening](<https://devfeed.tech/tags/hardening.md>), [openssf](<https://devfeed.tech/tags/openssf.md>), [security](<https://devfeed.tech/tags/security.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>)

### AI overview

Chainguard describes its effort to build glibc with hardened compiler flags. The work involved collaboration with the upstream GCC and glibc projects to resolve complex issues and ship a hardened version of the library.

### Source excerpt

Chainguard uses compiler flags to be proactive in the security of our products. See how our compiler flag usage helped us catch a complex bug in glibc.

## Mitigating a rsync Vulnerability: A Lesson in Compiler Hardening

DevFeed: [Mitigating a rsync Vulnerability: A Lesson in Compiler Hardening](<https://devfeed.tech/articles/mitigating-a-rsync-vulnerability-a-lesson-in-compiler-hardening-13161.md>)

Original publisher: [Read original article](<https://www.chainguard.dev/unchained/mitigating-a-rsync-vulnerability-a-lesson-in-compiler-hardening>)

Published: 2025-03-19T00:00:00Z

Content type: article

Language: en

Sources: [Chainguard: Unchained](<https://devfeed.tech/sources/chainguard-unchained.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [chainguard](<https://devfeed.tech/topics/chainguard.md>), [Security](<https://devfeed.tech/topics/security.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [vulnerability](<https://devfeed.tech/topics/vulnerability.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [chainguard](<https://devfeed.tech/tags/chainguard.md>), [compiler-flags](<https://devfeed.tech/tags/compiler-flags.md>), [compiler-hardening](<https://devfeed.tech/tags/compiler-hardening.md>), [cves](<https://devfeed.tech/tags/cves.md>), [defense-in-depth](<https://devfeed.tech/tags/defense-in-depth.md>), [hardening](<https://devfeed.tech/tags/hardening.md>), [linux](<https://devfeed.tech/tags/linux.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [product-security](<https://devfeed.tech/tags/product-security.md>), [rsync](<https://devfeed.tech/tags/rsync.md>), [security](<https://devfeed.tech/tags/security.md>), [x86-64](<https://devfeed.tech/tags/x86-64.md>)

### AI overview

Chainguard describes how compiler hardening in its C/C++ toolchain helped protect against an rsync vulnerability before public disclosure. The article presents compiler hardening flags as layers of defense for memory-unsafe software and discusses Chainguard's implementation of recommendations from OpenSSF and GCC.

### Source excerpt

Chainguard's defense-in-depth security strategy protected against multiple rsync CVEs before they were even reported. See how we did it, using compiler flags.

## Using Compiler Flags to Secure Your Code

DevFeed: [Using Compiler Flags to Secure Your Code](<https://devfeed.tech/articles/using-compiler-flags-to-secure-your-code-13310.md>)

Original publisher: [Read original article](<https://www.chainguard.dev/unchained/using-compiler-flags-to-secure-your-code>)

Published: 2025-01-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [Chainguard: Unchained](<https://devfeed.tech/sources/chainguard-unchained.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [Code](<https://devfeed.tech/topics/code.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [Security](<https://devfeed.tech/topics/security.md>), [C](<https://devfeed.tech/topics/c.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [gcc](<https://devfeed.tech/topics/gcc.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [chainguard-images](<https://devfeed.tech/tags/chainguard-images.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compiler-flags](<https://devfeed.tech/tags/compiler-flags.md>), [container](<https://devfeed.tech/tags/container.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [memory-safety](<https://devfeed.tech/tags/memory-safety.md>), [open-ssf](<https://devfeed.tech/tags/open-ssf.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

This tutorial examines OpenSSF-recommended compiler flags for C and C++ code, focusing on how hardened standard-library calls and related protections affect memory safety and buffer-overflow behavior. It demonstrates the examples using a Docker-based development environment.

### Source excerpt

Open SSF's recommended compiler flags are a great way to improve memory safety and security. Check out what effect using these flags can have.

## Enhanced Compiler Flags for Building Chainguard's Guarded Images

DevFeed: [Enhanced Compiler Flags for Building Chainguard's Guarded Images](<https://devfeed.tech/articles/enhanced-compiler-flags-for-building-chainguard-s-guarded-images-13030.md>)

Original publisher: [Read original article](<https://www.chainguard.dev/unchained/enhanced-compiler-flags-for-building-chainguards-guarded-images>)

Published: 2024-11-19T00:00:00Z

Content type: article

Language: en

Sources: [Chainguard: Unchained](<https://devfeed.tech/sources/chainguard-unchained.md>)

Topics: [chainguard images](<https://devfeed.tech/topics/chainguard-images.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [Security](<https://devfeed.tech/topics/security.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [Exploit](<https://devfeed.tech/topics/exploit.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [chainguard-images](<https://devfeed.tech/tags/chainguard-images.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compiler-flags](<https://devfeed.tech/tags/compiler-flags.md>), [compiler-hardening](<https://devfeed.tech/tags/compiler-hardening.md>), [memory-safety](<https://devfeed.tech/tags/memory-safety.md>), [openssf](<https://devfeed.tech/tags/openssf.md>), [secure-by-default](<https://devfeed.tech/tags/secure-by-default.md>), [security](<https://devfeed.tech/tags/security.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>), [vulnerability](<https://devfeed.tech/tags/vulnerability.md>)

### AI overview

Chainguard Images now use enhanced compiler flags for C/C++ projects. The OpenSSF-recommended hardening is implemented through clang configuration files and gcc spec files in Wolfi, helping mitigate memory-safety vulnerabilities such as stack-based buffer overflows and unsafe memory usage.

### Source excerpt

Chainguard Images are now built using enhanced compiler flags for C/C++ projects. See how this strengthens the security posture of Chainguard's build systems.

## Animated line drawings with OpenCV

DevFeed: [Animated line drawings with OpenCV](<https://devfeed.tech/articles/animated-line-drawings-with-opencv-21653.md>)

Original publisher: [Read original article](<https://www.windytan.com/2017/12/animated-line-drawings-with-opencv.html>)

Author: Oona Räisänen (noreply@blogger.com)

Published: 2017-12-30T12:15:00Z

Content type: tutorial

Language: en

Sources: [Oona Räisänen](<https://devfeed.tech/sources/oona-raisanen.md>)

Topics: [OpenCV](<https://devfeed.tech/topics/opencv.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Computer vision](<https://devfeed.tech/topics/computer-vision.md>), [CMake](<https://devfeed.tech/topics/cmake.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [art](<https://devfeed.tech/tags/art.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [cmake](<https://devfeed.tech/tags/cmake.md>), [compiler-flags](<https://devfeed.tech/tags/compiler-flags.md>), [computer-vision](<https://devfeed.tech/tags/computer-vision.md>), [gaussian](<https://devfeed.tech/tags/gaussian.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [gui](<https://devfeed.tech/tags/gui.md>), [make](<https://devfeed.tech/tags/make.md>), [music](<https://devfeed.tech/tags/music.md>), [plotting](<https://devfeed.tech/tags/plotting.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rgb](<https://devfeed.tech/tags/rgb.md>), [rotation](<https://devfeed.tech/tags/rotation.md>), [subpixel](<https://devfeed.tech/tags/subpixel.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [vector](<https://devfeed.tech/tags/vector.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

This tutorial shows how to use OpenCV and C++ to create pixel-level animated graphics and save them as video. It covers project setup with CMake, drawing rotating concentric rings on an RGB canvas, subpixel antialiasing, and a Gaussian blur glow effect.

### Source excerpt

OpenCV is a pretty versatile C++ computer vision library. Because I use it every day it has also become my go-to tool for creating simple animations at pixel level, for fun, and saving them as video files. This is not one of its core functions but happens to be possible using its GUI drawing tools. Below we'll take a look at some video art I wrote for a music project. It goes a bit further than just line drawings but the rest is pretty much just flavouring. As you'll see, creating images in OpenCV has a lot in common with how you would work with layers and filters in an image editor like GIMP or Photoshop. Setting it up It doesn't take a lot of boilerplate to initialize an OpenCV project. Here's my minimal CMakeLists.txt: cmake_minimum_required (VERSION 2.8) project (marmalade) find_package (OpenCV REQUIRED) add_executable (marmalade marmalade.cc) target_link_libraries (marmalade ${OpenCV_LIBS}) I also like to set compiler flags to enforce the C++11 standard, but this is not necessary. In the main .cc file I have: #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" Now you can build the project by just typing cmake . && make in the terminal. Basic shapes First, we'll need an empty canvas. It will be a matrix (cv::Mat) with three unsigned char channels for RGB at Full HD resolution: const cv::Size video_size(1920, 1080); cv::Mat mat_frame = cv::Mat::zeros(video_size, CV_8UC3); This will also initialize everything to zero, i.e. black. Now we can draw our graphics! I had an initial idea of an endless cascade of concentric rings each rotating at a different speed. There might be color and brightness variations as well but otherwise it would stay static the whole time. You can't see a circle's rotation around its center, so we'll add some features to them as well, maybe some kind of bars or spokes. A simplified render method for a ring would look like this: void Ring::RenderTo(cv::Mat& mat_output) const { cv::circle(mat_output, 8 * center_, 8 *