openwrt ugps compile command log

openwrt ugps compile command log

 

vmuser@ubuntu-vm:~/openwrt-mod$ make package/utils/ugps/clean V=s
make[2]: Entering directory '/home/vmuser/openwrt-mod/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/vmuser/openwrt-mod/scripts/config'
make[1]: Entering directory '/home/vmuser/openwrt-mod'
make[2]: Entering directory '/home/vmuser/openwrt-mod/package/utils/ugps'
rm -rf /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41
/home/vmuser/openwrt-mod/scripts/ipkg-remove ugps /home/vmuser/openwrt-mod/bin/packages/x86_64/base/ugps-2025.10.04~9a351d41-r1.apk
removed '/home/vmuser/openwrt-mod/bin/packages/x86_64/base/ugps-2025.10.04~9a351d41-r1.apk'
rm -f /home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/stamp/.ugps_installed
rm -f /home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/packages/ugps.list
make[2]: Leaving directory '/home/vmuser/openwrt-mod/package/utils/ugps'
time: package/utils/ugps/clean#0.15#0.17#0.35
make[1]: Leaving directory '/home/vmuser/openwrt-mod'
vmuser@ubuntu-vm:~/openwrt-mod$ 

 

vmuser@ubuntu-vm:~/openwrt-mod$ make package/utils/ugps/compile V=s
###############
make[2]: Entering directory '/home/vmuser/openwrt-mod/package/utils/ugps' touch /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/.prepared_b7ac9cdd3339efd377261456e8a11afb_6664517399ebbbc92a37c5bb081b5c53_check . /home/vmuser/openwrt-mod/include/shell.sh; zstdcat /home/vmuser/openwrt-mod/dl/ugps-2025.10.04~9a351d41.tar.zst | tar -C /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/.. -xf - [ ! -d ./src/ ] || cp -fpR ./src/. /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41 touch /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/.prepared_b7ac9cdd3339efd377261456e8a11afb_6664517399ebbbc92a37c5bb081b5c53 rm -f /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/.configured_* rm -f /home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/stamp/.ugps_installed mkdir -p "/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41"
############### (cd /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41; CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include " CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects " LDFLAGS="-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro " cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_C_COMPILER_LAUNCHER="" -DCMAKE_C_COMPILER="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc" -DCMAKE_CXX_COMPILER_LAUNCHER="" -DCMAKE_CXX_COMPILER="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-g++" -DCMAKE_ASM_COMPILER_LAUNCHER="" -DCMAKE_ASM_COMPILER="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc" -DCMAKE_EXE_LINKER_FLAGS:STRING="-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro" -DCMAKE_MODULE_LINKER_FLAGS:STRING="-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,-Bsymbolic-functions" -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,-Bsymbolic-functions" -DCMAKE_AR="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ar" -DCMAKE_NM="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-nm" -DCMAKE_RANLIB="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ranlib" -DCMAKE_FIND_ROOT_PATH="/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr;/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_STRIP=: -DCMAKE_INSTALL_PREFIX=/usr -DDL_LIBRARY=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl -DCMAKE_PREFIX_PATH=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl -DCMAKE_SKIP_RPATH=TRUE -DCMAKE_EXPORT_PACKAGE_REGISTRY=FALSE -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE -DCMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE -DCMAKE_GENERATOR="Ninja" /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41 ) Not searching for unused variables given on the command line. -- The C compiler identification is GNU 14.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Configuring done (0.7s) CMake Warning (dev) at CMakeLists.txt:20 (ADD_EXECUTABLE): Policy CMP0115 is not set: Source file extensions must be explicit. Run "cmake --help-policy CMP0115" for policy details. Use the cmake_policy command to set the policy and suppress this warning. File: /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/nmea.c This warning is for project developers. Use -Wno-dev to suppress it. -- Generating done (0.1s) -- Build files have been written to: /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41 touch /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/.configured_68b329da9893e34099c7d8ad5cb9c940 rm -f /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/.built touch /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/.built_check ###############
MAKEFLAGS="" /home/vmuser/openwrt-mod/staging_dir/host/bin/ninja -j1 -C /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41 ninja: Entering directory `/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41' [3/3] Linking C executable ugps DESTDIR="/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/ipkg-install" MAKEFLAGS="" /home/vmuser/openwrt-mod/staging_dir/host/bin/ninja -j1 -C /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41 install ninja: Entering directory `/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41' [0/1] Install the project... -- Install configuration: "Release" -- Installing: /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/ipkg-install/usr/sbin/ugps
###############

 

cd /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41; 
CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include " \
CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects " \
LDFLAGS="-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro " \
cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_VERSION=1 -DCMAKE_SYSTEM_PROCESSOR=x86_64 \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_C_COMPILER_LAUNCHER="" -DCMAKE_C_COMPILER="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc" \
-DCMAKE_CXX_COMPILER_LAUNCHER="" -DCMAKE_CXX_COMPILER="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-g++" \
-DCMAKE_ASM_COMPILER_LAUNCHER="" -DCMAKE_ASM_COMPILER="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc" \
-DCMAKE_EXE_LINKER_FLAGS:STRING="-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro" \
-DCMAKE_MODULE_LINKER_FLAGS:STRING="-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,-Bsymbolic-functions" \
-DCMAKE_SHARED_LINKER_FLAGS:STRING="-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,-Bsymbolic-functions" \
-DCMAKE_AR="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ar" \
-DCMAKE_NM="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-nm" \
-DCMAKE_RANLIB="/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ranlib" \
-DCMAKE_FIND_ROOT_PATH="/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr;/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl" \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_STRIP=: \
-DCMAKE_INSTALL_PREFIX=/usr \
-DDL_LIBRARY=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl \
-DCMAKE_PREFIX_PATH=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl \
-DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_EXPORT_PACKAGE_REGISTRY=FALSE \
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE \
-DCMAKE_FIND_USE_PACKAGE_REGISTRY=FALSE \
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE \
-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE \
-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE \
-DCMAKE_GENERATOR="Ninja" \
/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41

 

MAKEFLAGS="" \
/home/vmuser/openwrt-mod/staging_dir/host/bin/ninja  -j1 -C /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41 

DESTDIR="/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/ipkg-install" \
MAKEFLAGS="" \
/home/vmuser/openwrt-mod/staging_dir/host/bin/ninja  -j1 -C /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41 install

 

[
{
  "directory": "/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41",
  "command": "/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include -DNDEBUG   -Os -ggdb -Wextra -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unused-parameter -o CMakeFiles/ugps.dir/main.c.o -c \"/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/main.c\"",
  "file": "/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/main.c",
  "output": "CMakeFiles/ugps.dir/main.c.o"
},
{
  "directory": "/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41",
  "command": "/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include -DNDEBUG   -Os -ggdb -Wextra -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unused-parameter -o CMakeFiles/ugps.dir/nmea.c.o -c \"/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/nmea.c\"",
  "file": "/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/nmea.c",
  "output": "CMakeFiles/ugps.dir/nmea.c.o"
}
]

 

vmuser@ubuntu-vm:~/openwrt-mod$ echo | /home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc -v -x c -E -
Reading specs from /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/specs
COLLECT_GCC=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc
Target: x86_64-openwrt-linux-musl
Configured with: /home/vmuser/openwrt-mod/build_dir/toolchain-x86_64_gcc-14.3.0_musl/gcc-14.3.0/configure --with-bugurl=http://bugs.openwrt.org/ --with-pkgversion='OpenWrt GCC 14.3.0 r35130-06a9f13a1a' --prefix=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-openwrt-linux-musl --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-libmpx --disable-nls --disable-libssp --without-isl --without-cloog --with-host-libstdcxx=-lstdc++ --with-system-zlib=/home/vmuser/openwrt-mod/staging_dir/host --with-zstd=/home/vmuser/openwrt-mod/staging_dir/host --with-gmp=/home/vmuser/openwrt-mod/staging_dir/host --with-mpfr=/home/vmuser/openwrt-mod/staging_dir/host --with-mpc=/home/vmuser/openwrt-mod/staging_dir/host --disable-decimal-float --with-diagnostics-color=auto-if-env --enable-__cxa_atexit --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new CFLAGS='-O2 -I/home/vmuser/openwrt-mod/staging_dir/host/include -pipe' CXXFLAGS='-O2 -I/home/vmuser/openwrt-mod/staging_dir/host/include -pipe' 'CFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro' 'CXXFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro' 'GOCFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro' --with-headers=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/include --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib --enable-plugins --enable-lto --with-libelf=/home/vmuser/openwrt-mod/staging_dir/host --disable-libsanitizer
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.3.0 (OpenWrt GCC 14.3.0 r35130-06a9f13a1a) 
x86_64-openwrt-linux-musl-gcc: warning: environment variable 'STAGING_DIR' not defined
COLLECT_GCC_OPTIONS='-v' '-E' '-mtune=generic' '-march=x86-64'
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../libexec/gcc/x86_64-openwrt-linux-musl/14.3.0/cc1 -E -quiet -v -iprefix /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/ -idirafter /usr/include - -mtune=generic -march=x86-64 -dumpbase -
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/sys-include"
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include"
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/sys-include
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/include
 /usr/include
End of search list.
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "<stdin>"
COMPILER_PATH=/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../libexec/gcc/x86_64-openwrt-linux-musl/14.3.0/:/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../libexec/gcc/:/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/bin/
LIBRARY_PATH=/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/:/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/:/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/lib/
COLLECT_GCC_OPTIONS='-v' '-E' '-mtune=generic' '-march=x86-64'
vmuser@ubuntu-vm:~/openwrt-mod$ 
vmuser@ubuntu-vm:~/openwrt-mod$ 
vmuser@ubuntu-vm:~/openwrt-mod$ 
vmuser@ubuntu-vm:~/openwrt-mod$ 
vmuser@ubuntu-vm:~/openwrt-mod$ echo | /home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc -v -x c++ -E -
Reading specs from /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/specs
COLLECT_GCC=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc
Target: x86_64-openwrt-linux-musl
Configured with: /home/vmuser/openwrt-mod/build_dir/toolchain-x86_64_gcc-14.3.0_musl/gcc-14.3.0/configure --with-bugurl=http://bugs.openwrt.org/ --with-pkgversion='OpenWrt GCC 14.3.0 r35130-06a9f13a1a' --prefix=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-openwrt-linux-musl --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-libmpx --disable-nls --disable-libssp --without-isl --without-cloog --with-host-libstdcxx=-lstdc++ --with-system-zlib=/home/vmuser/openwrt-mod/staging_dir/host --with-zstd=/home/vmuser/openwrt-mod/staging_dir/host --with-gmp=/home/vmuser/openwrt-mod/staging_dir/host --with-mpfr=/home/vmuser/openwrt-mod/staging_dir/host --with-mpc=/home/vmuser/openwrt-mod/staging_dir/host --disable-decimal-float --with-diagnostics-color=auto-if-env --enable-__cxa_atexit --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new CFLAGS='-O2 -I/home/vmuser/openwrt-mod/staging_dir/host/include -pipe' CXXFLAGS='-O2 -I/home/vmuser/openwrt-mod/staging_dir/host/include -pipe' 'CFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro' 'CXXFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro' 'GOCFLAGS_FOR_TARGET=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro' --with-headers=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/include --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib --enable-plugins --enable-lto --with-libelf=/home/vmuser/openwrt-mod/staging_dir/host --disable-libsanitizer
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.3.0 (OpenWrt GCC 14.3.0 r35130-06a9f13a1a) 
x86_64-openwrt-linux-musl-gcc: warning: environment variable 'STAGING_DIR' not defined
COLLECT_GCC_OPTIONS='-v' '-E' '-mtune=generic' '-march=x86-64'
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../libexec/gcc/x86_64-openwrt-linux-musl/14.3.0/cc1plus -E -quiet -v -iprefix /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/ -D_GNU_SOURCE -idirafter /usr/include - -mtune=generic -march=x86-64 -dumpbase -
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include/c++/14.3.0"
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include/c++/14.3.0/x86_64-openwrt-linux-musl"
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include/c++/14.3.0/backward"
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/sys-include"
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include"
ignoring duplicate directory "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/../../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include/c++/14.3.0
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include/c++/14.3.0/x86_64-openwrt-linux-musl
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include/c++/14.3.0/backward
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/sys-include
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/include
 /mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/include
 /usr/include
End of search list.
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "<stdin>"
COMPILER_PATH=/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../libexec/gcc/x86_64-openwrt-linux-musl/14.3.0/:/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../libexec/gcc/:/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/bin/
LIBRARY_PATH=/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/:/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/:/mnt/data/openwrt-staging/toolchain-x86_64_gcc-14.3.0_musl/bin/../lib/gcc/x86_64-openwrt-linux-musl/14.3.0/../../../../x86_64-openwrt-linux-musl/lib/
COLLECT_GCC_OPTIONS='-v' '-E' '-mtune=generic' '-march=x86-64'
vmuser@ubuntu-vm:~/openwrt-mod$ 
vmuser@ubuntu-vm:~/openwrt-mod$ 
vmuser@ubuntu-vm:~/openwrt-mod$ vi ~/.local/share/CMakeTools/cmake-tools-kits.json 
vmuser@ubuntu-vm:~/openwrt-mod$ 
vmuser@ubuntu-vm:~/openwrt-mod$ cat ~/.local/share/CMakeTools/cmake-tools-kits.json 
[
  {
    "name": "Clang 18.1.8 x86_64-pc-linux-gnu",
    "compilers": {
      "C": "/usr/bin/clang",
      "CXX": "/usr/bin/clang++"
    },
    "isTrusted": true
  },
  {
    "name": "GCC 12.3.0 x86_64-linux-gnu",
    "compilers": {
      "C": "/usr/bin/gcc",
      "CXX": "/usr/bin/g++"
    },
    "isTrusted": true
  },
  {
    "name": "GCC 13.3.0 x86_64-linux-gnu",
    "compilers": {
      "C": "/usr/bin/gcc-13",
      "CXX": "/usr/bin/g++-13"
    },
    "isTrusted": true
  },
  {
    "name": "GCC 14.3.0 x86_64-openwrt-linux-musl",
    "compilers": {
      "C": "/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc",
      "CXX": "/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-g++"
    },
    "isTrusted": true,
    "environmentVariables": {
      "PATH": "/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin;/home/vmuser/openwrt-mod/staging_dir/host/bin;/home/vmuser/openwrt-mod/staging_dir/hostpkg//bin;${env:PATH}"
    }
  }
]
vmuser@ubuntu-vm:~/openwrt-mod$ 

 

vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ 
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ tree -a ./
./
├── apk-x86_64
│   └── ugps
│       ├── post-install
│       ├── post-upgrade
│       └── pre-deinstall
├── build.ninja
├── .built
├── .built_check
├── CMakeCache.txt
├── CMakeFiles
│   ├── 3.31.5
│   │   ├── CMakeCCompiler.cmake
│   │   ├── CMakeDetermineCompilerABI_C.bin
│   │   ├── CMakeSystem.cmake
│   │   └── CompilerIdC
│   │       ├── a.out
│   │       ├── CMakeCCompilerId.c
│   │       └── tmp
│   ├── cmake.check_cache
│   ├── CMakeConfigureLog.yaml
│   ├── CMakeScratch
│   ├── pkgRedirects
│   ├── rules.ninja
│   ├── TargetDirectories.txt
│   └── ugps.dir
│       ├── main.c.o
│       └── nmea.c.o
├── cmake_install.cmake
├── CMakeLists.txt
├── compile_commands.json
├── .configured_68b329da9893e34099c7d8ad5cb9c940
├── install_manifest.txt
├── ipkg-install
│   └── usr
│       └── sbin
│           └── ugps
├── ipkg-x86_64
│   └── ugps
│       ├── etc
│       │   ├── config
│       │   │   └── gps
│       │   └── init.d
│       │       └── ugps
│       ├── lib
│       │   └── apk
│       │       └── packages
│       │           ├── ugps.conffiles
│       │           ├── ugps.conffiles_static
│       │           └── ugps.list
│       └── usr
│           └── sbin
│               └── ugps
├── log.h
├── main.c
├── .ninja_deps
├── .ninja_log
├── nmea.c
├── nmea.h
├── .pkgdir
│   ├── ugps
│   │   ├── etc
│   │   │   ├── config
│   │   │   │   └── gps
│   │   │   └── init.d
│   │   │       └── ugps
│   │   └── usr
│   │       └── sbin
│   │           └── ugps
│   └── ugps.installed
├── .prepared_b7ac9cdd3339efd377261456e8a11afb_6664517399ebbbc92a37c5bb081b5c53
├── .prepared_b7ac9cdd3339efd377261456e8a11afb_6664517399ebbbc92a37c5bb081b5c53_check
└── ugps

30 directories, 43 files
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ 
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ 
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ 
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.10)

PROJECT(ugps C)
ADD_DEFINITIONS(-Os -ggdb -Wextra -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unused-parameter)

SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")

SET(SOURCES main.c nmea)

IF(DEBUG)
  ADD_DEFINITIONS(-DDEBUG -g3)
ENDIF()

FIND_LIBRARY(ubus NAMES ubus)
FIND_LIBRARY(ubox NAMES ubox)
FIND_PATH(ubus_include_dir NAMES libubus.h)
FIND_PATH(ubox_include_dir NAMES libubox/usock.h)
INCLUDE_DIRECTORIES(${ubox_include_dir} ${ubus_include_dir})

ADD_EXECUTABLE(ugps ${SOURCES})

TARGET_LINK_LIBRARIES(ugps ${ubox} ${ubus} m)

INSTALL(TARGETS ugps
	RUNTIME DESTINATION sbin
)
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ 
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ 
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ cat CMakeCache.txt 
# This is the CMakeCache file.
# For build in directory: /home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41
# It was generated by CMake: /mnt/data/openwrt-staging/host/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.

########################
# EXTERNAL cache entries
########################

//Path to a program.
CMAKE_ADDR2LINE:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-addr2line

//Path to a program.
CMAKE_AR:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ar

//No help, variable specified on the command line.
CMAKE_ASM_COMPILER:UNINITIALIZED=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc

//No help, variable specified on the command line.
CMAKE_ASM_COMPILER_LAUNCHER:UNINITIALIZED=

//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=Release

//No help, variable specified on the command line.
CMAKE_CXX_COMPILER:UNINITIALIZED=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-g++

//No help, variable specified on the command line.
CMAKE_CXX_COMPILER_LAUNCHER:UNINITIALIZED=

//No help, variable specified on the command line.
CMAKE_CXX_FLAGS_RELEASE:UNINITIALIZED=-DNDEBUG

//C compiler
CMAKE_C_COMPILER:STRING=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc

//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_AR:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ar

//No help, variable specified on the command line.
CMAKE_C_COMPILER_LAUNCHER:UNINITIALIZED=

//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_RANLIB:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ranlib

//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include

//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g

//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG

//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//Path to a program.
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND

//No help, variable specified on the command line.
CMAKE_EXE_LINKER_FLAGS:STRING=-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro

//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Enable/Disable output of build database during the build.
CMAKE_EXPORT_BUILD_DATABASE:BOOL=

//No help, variable specified on the command line.
CMAKE_EXPORT_COMPILE_COMMANDS:UNINITIALIZED=ON

//No help, variable specified on the command line.
CMAKE_EXPORT_NO_PACKAGE_REGISTRY:UNINITIALIZED=TRUE

//No help, variable specified on the command line.
CMAKE_EXPORT_PACKAGE_REGISTRY:UNINITIALIZED=FALSE

//No help, variable specified on the command line.
CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY:UNINITIALIZED=TRUE

//No help, variable specified on the command line.
CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY:UNINITIALIZED=TRUE

//Value Computed by CMake.
CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/CMakeFiles/pkgRedirects

//No help, variable specified on the command line.
CMAKE_FIND_ROOT_PATH:UNINITIALIZED=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr;/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl

//No help, variable specified on the command line.
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE:UNINITIALIZED=ONLY

//No help, variable specified on the command line.
CMAKE_FIND_ROOT_PATH_MODE_LIBRARY:UNINITIALIZED=ONLY

//No help, variable specified on the command line.
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM:UNINITIALIZED=BOTH

//No help, variable specified on the command line.
CMAKE_FIND_USE_PACKAGE_REGISTRY:UNINITIALIZED=FALSE

//No help, variable specified on the command line.
CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY:UNINITIALIZED=FALSE

//No help, variable specified on the command line.
CMAKE_GENERATOR:UNINITIALIZED=Ninja

//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr

//Path to a program.
CMAKE_LINKER:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-ld

//Program used to build from build.ninja files.
CMAKE_MAKE_PROGRAM:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/host/bin/ninja

//No help, variable specified on the command line.
CMAKE_MODULE_LINKER_FLAGS:STRING=-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,-Bsymbolic-functions

//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_NM:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-nm

//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-objcopy

//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-objdump

//No help, variable specified on the command line.
CMAKE_PREFIX_PATH:UNINITIALIZED=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl

//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=

//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=

//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=ugps

//Path to a program.
CMAKE_RANLIB:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ranlib

//Path to a program.
CMAKE_READELF:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-readelf

//No help, variable specified on the command line.
CMAKE_SHARED_LINKER_FLAGS:STRING=-L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L/home/vmuser/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,-Bsymbolic-functions

//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=TRUE

//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=

//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program.
CMAKE_STRIP:FILEPATH=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41/:

//No help, variable specified on the command line.
CMAKE_SYSTEM_NAME:UNINITIALIZED=Linux

//No help, variable specified on the command line.
CMAKE_SYSTEM_PROCESSOR:UNINITIALIZED=x86_64

//No help, variable specified on the command line.
CMAKE_SYSTEM_VERSION:UNINITIALIZED=1

//Path to a program.
CMAKE_TAPI:FILEPATH=CMAKE_TAPI-NOTFOUND

//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make.  This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

//No help, variable specified on the command line.
DL_LIBRARY:UNINITIALIZED=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl

//Path to a library.
ubox:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/lib/libubox.so

//Path to a file.
ubox_include_dir:PATH=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include

//Path to a library.
ubus:FILEPATH=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/lib/libubus.so

//Path to a file.
ubus_include_dir:PATH=/home/vmuser/openwrt-mod/staging_dir/target-x86_64_musl/usr/include

//Value Computed by CMake
ugps_BINARY_DIR:STATIC=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41

//Value Computed by CMake
ugps_IS_TOP_LEVEL:STATIC=ON

//Value Computed by CMake
ugps_SOURCE_DIR:STATIC=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41


########################
# INTERNAL cache entries
########################

//ADVANCED property for variable: CMAKE_ADDR2LINE
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_AR
CMAKE_AR-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=31
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=5
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/mnt/data/openwrt-staging/host/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/mnt/data/openwrt-staging/host/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/mnt/data/openwrt-staging/host/bin/ctest
//ADVANCED property for variable: CMAKE_C_COMPILER
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_DLLTOOL
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=/mnt/data/openwrt-staging/host/bin/ccmake
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_BUILD_DATABASE
CMAKE_EXPORT_BUILD_DATABASE-ADVANCED:INTERNAL=1
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/home/vmuser/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_NM
CMAKE_NM-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJCOPY
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_OBJDUMP
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RANLIB
CMAKE_RANLIB-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_READELF
CMAKE_READELF-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/mnt/data/openwrt-staging/host/share/cmake-3.31
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STRIP
CMAKE_STRIP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_TAPI
CMAKE_TAPI-ADVANCED:INTERNAL=1
//uname command
CMAKE_UNAME:INTERNAL=/usr/bin/uname
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//linker supports push/pop state
_CMAKE_C_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE
//linker supports push/pop state
_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE

vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ 
vmuser@ubuntu-vm:~/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41$ 

 

===========

[
  {
    "name": "GCC 11.2.0 x86_64-w64-mingw32",
    "compilers": {
      "C": "C:\\mingw64\\bin\\gcc.exe",
      "CXX": "C:\\mingw64\\bin\\g++.exe"
    },
    "isTrusted": true,
    "environmentVariables": {
      "CMT_MINGW_PATH": "C:\\mingw64\\bin",
      "MSYSTEM": "MINGW64",
      "MSYSTEM_PREFIX": "/mingw64",
      "PATH": "C:\\mingw64\\bin;C:\\usr\\bin;${env:PATH}"
    },
    "preferredGenerator": {
      "name": "MinGW Makefiles"
    }
  },
  {
    "name": "Visual Studio Community 2022 Release - amd64",
    "visualStudio": "25f7ee7e",
    "visualStudioArchitecture": "x64",
    "isTrusted": true,
    "preferredGenerator": {
      "name": "Visual Studio 17 2022",
      "platform": "x64",
      "toolset": "host=x64"
    }
  },
  {
    "name": "Visual Studio Community 2022 Release - amd64_x86",
    "visualStudio": "25f7ee7e",
    "visualStudioArchitecture": "x64",
    "isTrusted": true,
    "preferredGenerator": {
      "name": "Visual Studio 17 2022",
      "platform": "win32",
      "toolset": "host=x64"
    }
  },
  {
    "name": "Visual Studio Community 2022 Release - x86",
    "visualStudio": "25f7ee7e",
    "visualStudioArchitecture": "x86",
    "isTrusted": true,
    "preferredGenerator": {
      "name": "Visual Studio 17 2022",
      "platform": "win32",
      "toolset": "host=x86"
    }
  },
  {
    "name": "Visual Studio Community 2022 Release - x86_amd64",
    "visualStudio": "25f7ee7e",
    "visualStudioArchitecture": "x86",
    "isTrusted": true,
    "preferredGenerator": {
      "name": "Visual Studio 17 2022",
      "platform": "x64",
      "toolset": "host=x86"
    }
  }
]

 

{
  "version": 7,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 23,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "config-openwrt",
      "displayName": "Configure Preset for OpenWrt",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}",
      "cacheVariables": {
        "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
        "CMAKE_SYSTEM_NAME": "Linux",
        "CMAKE_SYSTEM_VERSION": "1",
        "CMAKE_SYSTEM_PROCESSOR": "x86_64",
        "CMAKE_BUILD_TYPE": "Release",
        "CMAKE_C_FLAGS_RELEASE": "-DNDEBUG",
        "CMAKE_CXX_FLAGS_RELEASE": "-DNDEBUG",
        "CMAKE_C_COMPILER_LAUNCHER": "",
        "CMAKE_C_COMPILER": "$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc",
        "CMAKE_CXX_COMPILER_LAUNCHER": "",
        "CMAKE_CXX_COMPILER": "$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-g++",
        "CMAKE_ASM_COMPILER_LAUNCHER": "",
        "CMAKE_ASM_COMPILER": "$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc",
        "CMAKE_EXE_LINKER_FLAGS:STRING": "-L$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro",
        "CMAKE_MODULE_LINKER_FLAGS:STRING": "-L$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,-Bsymbolic-functions",
        "CMAKE_SHARED_LINKER_FLAGS:STRING": "-L$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro -Wl,-Bsymbolic-functions",
        "CMAKE_AR": "$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ar",
        "CMAKE_NM": "$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-nm",
        "CMAKE_RANLIB": "$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc-ranlib",
        "CMAKE_FIND_ROOT_PATH": "$env{HOME}/openwrt-mod/staging_dir/target-x86_64_musl/usr;$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl",
        "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM": "BOTH",
        "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY": "ONLY",
        "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE": "ONLY",
        "CMAKE_STRIP": ":",
        "CMAKE_INSTALL_PREFIX": "/usr",
        "DL_LIBRARY": "$env{HOME}/openwrt-mod/staging_dir/target-x86_64_musl",
        "CMAKE_PREFIX_PATH": "$env{HOME}/openwrt-mod/staging_dir/target-x86_64_musl",
        "CMAKE_SKIP_RPATH": "TRUE",
        "CMAKE_EXPORT_PACKAGE_REGISTRY": "FALSE",
        "CMAKE_EXPORT_NO_PACKAGE_REGISTRY": "TRUE",
        "CMAKE_FIND_USE_PACKAGE_REGISTRY": "FALSE",
        "CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY": "TRUE",
        "CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY": "FALSE",
        "CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY": "TRUE"
      },
      "environment": {
        "MY_ENVIRONMENT_VARIABLE": "Test",
        "PATH": "$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/bin:$env{HOME}/openwrt-mod/staging_dir/host/bin:$env{HOME}/openwrt-mod/staging_dir/hostpkg/bin:$penv{PATH}",
        "STAGING_DIR": "$env{HOME}/openwrt-mod/staging_dir",
        "CFLAGS": "-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=$env{HOME}/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I$env{HOME}/openwrt-mod/staging_dir/target-x86_64_musl/usr/include ",
        "CXXFLAGS": "-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=$env{HOME}/openwrt-mod/build_dir/target-x86_64_musl/ugps-2025.10.04~9a351d41=ugps-2025.10.04~9a351d41 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I$env{HOME}/openwrt-mod/staging_dir/target-x86_64_musl/usr/include -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects ",
        "LDFLAGS": "-L$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/usr/lib -L$env{HOME}/openwrt-mod/staging_dir/toolchain-x86_64_gcc-14.3.0_musl/lib -fuse-ld=bfd -Wl,--gc-sections -flto=auto -fuse-linker-plugin -znow -zrelro ",
        "SRCDIR": "${sourceDir}",
        "DESTDIR": "${sourceDir}/ipkg-install"
      }
    }
  ],
  "buildPresets": [
    {
      "name": "build-openwrt",
      "displayName": "Build Preset for OpenWrt",
      "configurePreset": "config-openwrt",
      "jobs": 1
    }
  ]
}

 

#!/usr/bin/env bash
#filename: build.sh

BUILD_NINJA_FILE=build.ninja
CMAKE_PRESETS_FILE=CMakePresets.json
CMAKE_PRESETS_CONFIG=config-openwrt
CMAKE_PRESETS_BUILD=build-openwrt

[ -e ${BUILD_NINJA_FILE} ] && echo "### cleaning..." && cmake --build --preset ${CMAKE_PRESETS_BUILD} --target clean

files=("build.ninja" "install_manifest.txt" "compile_commands.json" "CMakeCache.txt" "cmake_install.cmake")
for file in "${files[@]}"; do [ -f "$file" ] && echo "removing file ${file}" && rm -f "$file"; done

dirs=("CMakeFiles")
for dir in "${dirs[@]}"; do [ -d "$dir" ] && echo "removing dir ${dir}" && rm -rf "$dir"; done

[ -e ${CMAKE_PRESETS_FILE} ] && echo "### configuring..." && cmake --preset ${CMAKE_PRESETS_CONFIG}

[ -e ${BUILD_NINJA_FILE} ] && echo "### building..." && cmake --build --preset ${CMAKE_PRESETS_BUILD} --target all

 

=========== End

 

posted @ 2022-12-18 00:41  lsgxeva  阅读(657)  评论(0)    收藏  举报