Source: firebird3.0 Version: 3.0.11.33703.ds4-2 Tags: patch User: [email protected] Usertags: pac-bti
Dear Maintainer, Whilst trying to figure out why a rebuild of firebird3.0 on arm64 does not fully enable BTI [1] I have noticed that there is an issue with the way the build process uses CXXFLAGS on arm64. CFLAGS seems to be respected, and all hardening flags such as -fstack-clash-protection and -mbranch-protection=standard are there: cc -c -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter -g -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -fno-strict-aliasing -O3 -Wdate-time -D_FORTIFY_SOURCE=2 src/tests/test1/CTest.c -o /<<PKGBUILDDIR>>/temp/Release/cloop/release/tests/test1/CTest.o The same cannot be said about CXXFLAGS, no hardening flag is in use: g++ -c -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter -std=gnu++03 -Wdate-time -D_FORTIFY_SOURCE=2 -O3 src/cloop/Expr.cpp -o /<<PKGBUILDDIR>>/temp/Release/cloop/release/cloop/Expr.o To fix this, honour-buildflags.patch needs to be updated to ensure CXXFLAGS is not overridden in prefix.linux_arm64. See attached patch.
diff -Nru firebird3.0-3.0.11.33703.ds4/debian/changelog firebird3.0-3.0.11.33703.ds4/debian/changelog --- firebird3.0-3.0.11.33703.ds4/debian/changelog 2023-09-26 12:25:06.000000000 +0200 +++ firebird3.0-3.0.11.33703.ds4/debian/changelog 2024-02-27 16:31:04.000000000 +0100 @@ -1,3 +1,10 @@ +firebird3.0 (3.0.11.33703.ds4-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Do not override CXXFLAGS on arm64. (Closes: #-1) + + -- Emanuele Rocca <[email protected]> Tue, 27 Feb 2024 16:31:04 +0100 + firebird3.0 (3.0.11.33703.ds4-2) unstable; urgency=medium * Bump policy-compliance version to 4.6.2 (no changes needed) diff -Nru firebird3.0-3.0.11.33703.ds4/debian/patches/out/honour-buildflags.patch firebird3.0-3.0.11.33703.ds4/debian/patches/out/honour-buildflags.patch --- firebird3.0-3.0.11.33703.ds4/debian/patches/out/honour-buildflags.patch 2023-09-26 12:10:03.000000000 +0200 +++ firebird3.0-3.0.11.33703.ds4/debian/patches/out/honour-buildflags.patch 2024-02-27 16:31:04.000000000 +0100 @@ -8,8 +8,10 @@ linking. Author: Damyan Ivanov <[email protected]> ---- a/builds/posix/Makefile.in -+++ b/builds/posix/Makefile.in +Index: firebird3.0-3.0.11.33703.ds4/builds/posix/Makefile.in +=================================================================== +--- firebird3.0-3.0.11.33703.ds4.orig/builds/posix/Makefile.in ++++ firebird3.0-3.0.11.33703.ds4/builds/posix/Makefile.in @@ -641,7 +641,7 @@ MAKE_HEADER_Src = $(addprefix $(SRC_ROOT MAKE_HEADER_Bin = ./makeHeader @@ -19,8 +21,10 @@ $(CP) $^ . $(MAKE_HEADER_Bin) <ibase.h >$@ $(RM) -f ibase.h ---- a/extern/btyacc/Makefile -+++ b/extern/btyacc/Makefile +Index: firebird3.0-3.0.11.33703.ds4/extern/btyacc/Makefile +=================================================================== +--- firebird3.0-3.0.11.33703.ds4.orig/extern/btyacc/Makefile ++++ firebird3.0-3.0.11.33703.ds4/extern/btyacc/Makefile @@ -42,7 +42,7 @@ OTHERS = README README.BYACC \ all: $(PROGRAM) @@ -30,8 +34,10 @@ clean:; rm -f $(OBJS) ---- a/builds/posix/make.defaults -+++ b/builds/posix/make.defaults +Index: firebird3.0-3.0.11.33703.ds4/builds/posix/make.defaults +=================================================================== +--- firebird3.0-3.0.11.33703.ds4.orig/builds/posix/make.defaults ++++ firebird3.0-3.0.11.33703.ds4/builds/posix/make.defaults @@ -166,8 +166,8 @@ LD = @CXX@ LIB_LINK = $(CXX) $(GLOB_OPTIONS) $(CXXFLAGS) @@ -43,8 +49,10 @@ LINK_LIBS = @LIBS@ STATICLINK_LIBS = @LIBS@ ---- a/builds/posix/prefix.linux -+++ b/builds/posix/prefix.linux +Index: firebird3.0-3.0.11.33703.ds4/builds/posix/prefix.linux +=================================================================== +--- firebird3.0-3.0.11.33703.ds4.orig/builds/posix/prefix.linux ++++ firebird3.0-3.0.11.33703.ds4/builds/posix/prefix.linux @@ -19,7 +19,7 @@ # 2 Oct 2002, Nickolay Samofatov - Major cleanup @@ -54,8 +62,10 @@ OPTIMIZE_FLAGS=-O3 -march=i586 -mtune=i686 -fno-omit-frame-pointer WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -Wno-narrowing ---- a/builds/posix/prefix.linux_amd64 -+++ b/builds/posix/prefix.linux_amd64 +Index: firebird3.0-3.0.11.33703.ds4/builds/posix/prefix.linux_amd64 +=================================================================== +--- firebird3.0-3.0.11.33703.ds4.orig/builds/posix/prefix.linux_amd64 ++++ firebird3.0-3.0.11.33703.ds4/builds/posix/prefix.linux_amd64 @@ -19,7 +19,7 @@ # 2 Oct 2002, Nickolay Samofatov - Major cleanup @@ -65,8 +75,10 @@ OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -Wno-invalid-offsetof -Wno-narrowing -Wno-unused-local-typedefs -Wno-class-memaccess ---- a/builds/posix/prefix.linux_generic -+++ b/builds/posix/prefix.linux_generic +Index: firebird3.0-3.0.11.33703.ds4/builds/posix/prefix.linux_generic +=================================================================== +--- firebird3.0-3.0.11.33703.ds4.orig/builds/posix/prefix.linux_generic ++++ firebird3.0-3.0.11.33703.ds4/builds/posix/prefix.linux_generic @@ -19,7 +19,7 @@ # 2 Oct 2002, Nickolay Samofatov - Major cleanup @@ -76,3 +88,16 @@ PROD_FLAGS=-ggdb -O3 $(COMMON_FLAGS) DEV_FLAGS=-ggdb -p -Wall -Wno-switch $(COMMON_FLAGS) -Wno-non-virtual-dtor +Index: firebird3.0-3.0.11.33703.ds4/builds/posix/prefix.linux_arm64 +=================================================================== +--- firebird3.0-3.0.11.33703.ds4.orig/builds/posix/prefix.linux_arm64 ++++ firebird3.0-3.0.11.33703.ds4/builds/posix/prefix.linux_arm64 +@@ -22,7 +22,7 @@ + #DEV_FLAGS=-ggdb -DLINUX -DARM64 -pipe -p -MMD -fPIC -Wall -fsigned-char -fmessage-length=0 -Wno-non-virtual-dtor -DFB_SEND_FLAGS=MSG_NO + + COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DARM64 -pipe -p -MMD -fPIC -fmessage-length=0 -fno-delete-null-pointer-checks -fsigned-char +-CXXFLAGS=-std=gnu++03 ++CXXFLAGS+=-std=gnu++03 + OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer + WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -Wno-invalid-offsetof -Wno-narrowing -Wno-unused-local-typedefs -Wno-non-virtual-dtor +

