🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #3677

Bug#1153355: cmake: CPPFLAGS are ignored when compiling Objective-C++

#3677
From: Yavor Doganov
Date: Sat, 07 Nov 2026 17:00
52 lines
3988 bytes
Package: cmake
Version: 4.4.5-1
Severity: normal

I am working on a package which uses CMake as its build system and
contains files in C, C++, Objective-C and Objective-C++.  CPPFLAGS, as
set for a hardened build of a Debian package, are not used when
compiling Objective-C++ so blhc rightfully complains:

CPPFLAGS missing (-D_FORTIFY_SOURCE=2): [34/463] /usr/lib/ccache/clang++ -DCXA_ALLOCATE_EXCEPTION_SPECIFIER=noexcept -DGNUSTEP -DNO_LEGACY -DOLDABI_COMPAT=1 -DTYPE_DEPENDENT_DISPATCH -D__OBJC_RUNTIME_INTERNAL__=1 -Dobjc_EXPORTS  -x objective-c++ -g -O2 -ffile-prefix-map=/build/reproducible-path/libobjc2-2.2.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -std=gnu++17 -fPIC -Wno-deprecated-objc-isa-usage -Wno-objc-root-class -fobjc-runtime=gnustep-2.0 -MD -MT CMakeFiles/objc.dir/arc.mm.o -MF CMakeFiles/objc.dir/arc.mm.o.d -o CMakeFiles/objc.dir/arc.mm.o -c /build/reproducible-path/libobjc2-2.2.1/arc.mm

A workaround is to include buildflags.mk and then set

export DEB_OBJCXXFLAGS_MAINT_APPEND := $(CPPFLAGS)

-- System Information:
Debian Release: forky/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, x32

Kernel: Linux 7.2.15+deb14-amd64 (SMP w/6 CPU threads; PREEMPT)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8), LANGUAGE=bg:ru:mk
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cmake depends on:
ii  libarchive13t64  3.8.10-2
ii  libc6            2.43-7
ii  libcurl4t64      8.23.0-1
ii  libexpat1        2.10.0-1
ii  libgcc-s1        16.2.0-4
ii  libjsoncpp26     1.9.8-2
ii  librhash1        1.4.6-1.1+b1
ii  libstdc++6       16.2.0-4
ii  libuv1t64        1.53.0-1
ii  procps           2:4.0.7-1.1
ii  zlib1g           1:1.3.dfsg+really1.3.2-4

Versions of packages cmake recommends:
ii  gcc   4:16.2.0-1
ii  make  4.4.1-3

Versions of packages cmake suggests:
ii  cmake-doc        4.4.5-1
ii  cmake-format     0.6.13-7
ii  elpa-cmake-mode  4.4.0+ds-1
ii  ninja-build      1.13.2-1

-- no debconf information
Technical Details
Message-ID: <NWRVM-aqmF-19@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Yavor Doganov <yavor@gnu.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1153355: cmake: CPPFLAGS are ignored when compiling Objective-C++
Date: Sat, 07 Nov 2026 18:00:02 +0100
Message-ID: <NWRVM-aqmF-19@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sat Nov  7 16:55:18 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.45
Reply-To: Yavor Doganov <yavor@gnu.org>, 1153355@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-gnustep-maintainers@lists.alioth.debian.org, pkg-cmake-team@lists.alioth.debian.org
X-Debian-Pr-Message: report 1153355
X-Debian-Pr-Package: cmake
X-Debian-Pr-Source: cmake
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue)
 FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.2
 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
Organization: The GNU Emacs Church (Bulgarian Eparchy)
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: text/plain; charset=US-ASCII
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2001302
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 52
Sender: robomod@news.nic.it
X-Original-Date: Sat, 07 Nov 2026 18:54:13 +0200
X-Original-Message-ID: <87cxsgd1l6.GNU's_not_UNIX!-yavor@gnu.org>