fix: pass CPPFLAGS and LDFLAGS to the fusermount and mount helpers

- c8f32f9f added CPPFLAGS to the libfuse object rules but not to the
  rules building mergerfs-fusermount and mount.mergerfs, and the
  fusermount rule never used LDFLAGS. So the setuid fusermount missed
  the distro's -D_FORTIFY_SOURCE and relro/now link flags, and neither
  helper got the release target's -DNDEBUG.
- Use CPPFLAGS in both rules and LDFLAGS in the fusermount one. With
  Debian-style flags the helper now links with BIND_NOW.
This commit is contained in:
Antonio S. Musumeci 2026-11-22 01:29:03 -05:00
parent 9586fd9dbd
commit 6e9bdd9564

View file

@ -146,13 +146,13 @@ $(BUILDDIR)/libfuse.a: $(OBJS) | $(BUILDDIR)/stamp
utils: mergerfs-fusermount mount.mergerfs
$(BUILDDIR)/mergerfs-fusermount: util/fusermount.cpp | $(BUILDDIR)/stamp
$(CXX) $(CXXFLAGS) $(FUSE_FLAGS) -Ilib -o $(BUILDDIR)/mergerfs-fusermount util/fusermount.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUSE_FLAGS) -Ilib -o $(BUILDDIR)/mergerfs-fusermount util/fusermount.cpp $(LDFLAGS)
mergerfs-fusermount: $(BUILDDIR)/mergerfs-fusermount
$(BUILDDIR)/mount.mergerfs: $(BUILDDIR)/libfuse.a util/mount.mergerfs.cpp
echo STATIC=$(STATIC) $(STATIC_FLAGS)
$(CXX) $(CXXFLAGS) $(FUSE_FLAGS) -o $(BUILDDIR)/mount.mergerfs util/mount.mergerfs.cpp $(BUILDDIR)/libfuse.a $(LDFLAGS)
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUSE_FLAGS) -o $(BUILDDIR)/mount.mergerfs util/mount.mergerfs.cpp $(BUILDDIR)/libfuse.a $(LDFLAGS)
mount.mergerfs: $(BUILDDIR)/mount.mergerfs