Skip to content

Conversation

@rockdrilla
Copy link
Contributor

@rockdrilla rockdrilla commented Jan 13, 2026

  • build: drop remnant
  • build: respect bin/lib paths
  • build: adjust flags and definitions
  • zlib: make chunk size configurable
  • debian: refresh packaging
  • debian: adjust LTO build
  • debian: build "digest" and "zlib" modules

@rockdrilla
Copy link
Contributor Author

Examining build logs of Debian-based package.

(formatted) build log before:

[ 39%] Building C object CMakeFiles/fs_lib.dir/lib/fs.c.o
/usr/bin/cc
  -DHAVE_ARRAY_EXT
  -DHAVE_JSON_UINT64
  -DHAVE_PARSE_END
  -DLIB_SEARCH_PATH="\"/usr/lib/ucode/*.so\", \"/usr/share/ucode/*.uc\", \"./*.so\", \"./*.uc\""
  -DNDEBUG
  -D_GNU_SOURCE
  -Dfs_lib_EXPORTS
  -I/build/ucode-eS9Xgw/ucode-0.0.20250529/include
  -I/usr/include/json-c
  -g
  -O2
  -Werror=implicit-function-declaration
  -ffile-prefix-map=/build/ucode-eS9Xgw/ucode-0.0.20250529=.
  -fstack-protector-strong
  -fstack-clash-protection
  -Wformat
  -Werror=format-security
  -fcf-protection
  -Wdate-time
  -D_FORTIFY_SOURCE=2
  -fPIC
  -Os
  -Wall
  -Werror
  --std=gnu99
  -ffunction-sections
  -fwrapv
  -Wextra
  -Werror=implicit-function-declaration
  -Wformat
  -Werror=format-security
  -Werror=format-nonliteral
  -Wmissing-declarations
  -Wno-error=unused-variable
  -Wno-unused-parameter
  -MD
  -MT CMakeFiles/fs_lib.dir/lib/fs.c.o
  -MF CMakeFiles/fs_lib.dir/lib/fs.c.o.d
  -o CMakeFiles/fs_lib.dir/lib/fs.c.o
  -c /build/ucode-eS9Xgw/ucode-0.0.20250529/lib/fs.c

(formatted) build log after:

[ 35%] Building C object CMakeFiles/fs_lib.dir/lib/fs.c.o
/usr/bin/cc
-DNDEBUG
-D_GNU_SOURCE
-Dfs_lib_EXPORTS
-I/build/ucode-2wdTDA/ucode-0.0.20250529/include
-I/usr/include/json-c
-g
-O2
-Werror=implicit-function-declaration
-ffile-prefix-map=/build/ucode-2wdTDA/ucode-0.0.20250529=.
-fstack-protector-strong
-fstack-clash-protection
-Wformat
-Werror=format-security
-fcf-protection
-g
-flto=2
-fuse-linker-plugin
-ffat-lto-objects
-flto-partition=none
-gdescribe-dies
-ginline-points
-Wdate-time
-D_FORTIFY_SOURCE=2
-std=gnu99
-fPIC
-Wall
-Werror
-Wmissing-declarations
-Wno-error=unused-variable
-Wno-unused-parameter
-fwrapv
-ffunction-sections
-Wextra
-Wformat
-Werror=implicit-function-declaration
-Werror=format-security
-Werror=format-nonliteral
-MD
-MT CMakeFiles/fs_lib.dir/lib/fs.c.o
-MF CMakeFiles/fs_lib.dir/lib/fs.c.o.d
-o CMakeFiles/fs_lib.dir/lib/fs.c.o
-c /build/ucode-2wdTDA/ucode-0.0.20250529/lib/fs.c

Result: no conflicting flags (-O2 vs -Os), no unneeded definitions (e.g. -DLIB_SEARCH_PATH=...).

@rockdrilla rockdrilla force-pushed the update branch 2 times, most recently from e0a9829 to 9b035be Compare January 14, 2026 22:27
@rockdrilla
Copy link
Contributor Author

I've reverted cmake version requirement change.

This change was missing in fb1da71 "ubus: remove broken implied await when calling defer() outside of uloop.run()".

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
This change allows one to configure "bin" path via CMAKE_INSTALL_BINDIR and "lib" path via CMAKE_INSTALL_LIBDIR.

This change is mostly wanted for Debian-based packaging where debhelper passes "-DCMAKE_INSTALL_LIBDIR=lib/${DEB_HOST_MULTIARCH}" to cmake in "dh_auto_configure" stage.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
This change should improve build flags handling under certain conditions, e.g. Debian-based packaging.

Also make almost all definitions "private" (i.e. local) in order to not spoil argument list (for those who reads build logs).

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Default size (16K) is fine enough but let's allow to tune it without patching source.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
- bump Standards-Version to 4.7.2
- bump debhelper to 13
- install shared libraries in appropriate place
- fix/override lintian warnings

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Build with LTO by default only for specified architectures.

Also provide sane LTO build flags.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Adjust zlib chunk size to be 128KiB for full-blown (non-embedded) systems.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
@rockdrilla
Copy link
Contributor Author

@jow- PTAL again. I've tested build manually with both clang and gcc.

@jow- jow- merged commit 8592205 into jow-:master Jan 16, 2026
2 checks passed
@jow-
Copy link
Owner

jow- commented Jan 16, 2026

Merged, thanks!

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