Closed ouankou closed 6 months ago
I suppose we must remove -s
also in that case:
ifdef DEBUG_BUILD
CFLAGS_DEBUG = -g
else
CFLAGS_DEBUG = -DNDEBUG
ifneq ($(CC), $(CROSS_COMPILE)clang)
LFLAGS_STRIP = -s
endif
endif
CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \
$(CFLAGS_DEBUG) -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-fPIC
Sure, I'll confirm the changes locally and then open a PR.
Local building and packaging work fine.
cd CPP/7zip/Bundles/Alone2
DEBUG_BUILD=1 make -j -f ../../cmpl_gcc.mak
file b/g/7zz
b/g/7zz: ELF 64-bit LSB pie executable, ..., with debug_info, not stripped
It's been fixed in the release 24.05.
I'm packaging 7-zip to a Linux distro. I'm not sure if I missed anything, but it seems that we can't create a DEBUG build unless hacking the makefile. I also see a few similar requests in Sourceforge.
https://github.com/ip7z/7zip/blob/5b39dc76f1bc82f941d5c800ab9f34407a06b53a/CPP/7zip/7zip_gcc.mak#L35-L37
May I open a PR to add an env flag here? like:
By default, this change won't make any difference.