Closed RFDAJE closed 7 months ago
This works just fine here:
clipmenu develop % cc -std=gnu11 -O2 -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wstrict-overflow -Wformat=2 -Wwrite-strings -Warray-bounds -Wstrict-prototypes -Werror -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/xxx/.cache/yay/clipmenu-git/src=/usr/src/debug/clipmenu-git -flto=auto -I/usr/X11R6/include -L/usr/X11R6/lib src/clipmenu.c src/config.o src/store.o src/util.o src/x.o -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -lX11 -lXfixes -o src/clipmenu clipmenu develop % echo $? 0
Please give your full CFLAGS/CPPFLAGS/LDFLAGS/LDLIBS for the entire build process and compiler.
{{{ CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/abc/.cache/yay/clipmenu-git/src=/usr/src/debug/clipmenu-git -flto=auto CPPFLAGS: LDFLAGS: -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto LDLIBS:
gcc version 13.2.1 20230801 (GCC) }}}
IMO a better fix would've been to move -Werror
to debug flags and leave it out of "release" builds. See: https://flameeyes.blog/2009/02/25/future-proof-your-code-dont-use-werror/
it is built with aur script. https://aur.archlinux.org/packages/clipmenu-git