59 lines
1.9 KiB
Diff
59 lines
1.9 KiB
Diff
adapted from https://sources.debian.org/patches/7zip/22.01+dfsg-4/0001-Accept-Debian-build-flags.patch/
|
|
and https://gitlab.alpinelinux.org/alpine/aports/-/raw/291a2b61d6e613fbe3ed057c1f2ee41fd2aea9ac/community/7zip/7-zip-flags.patch
|
|
--- a/CPP/7zip/7zip_gcc.mak
|
|
+++ b/CPP/7zip/7zip_gcc.mak
|
|
@@ -24,7 +24,7 @@
|
|
|
|
|
|
ifneq ($(CC), xlc)
|
|
-CFLAGS_WARN_WALL = -Werror -Wall -Wextra
|
|
+CFLAGS_WARN_WALL = -Wall -Wextra
|
|
endif
|
|
|
|
# for object file
|
|
@@ -32,7 +32,7 @@
|
|
# -save-temps
|
|
CFLAGS_BASE_LIST = -c
|
|
# CFLAGS_BASE_LIST = -S
|
|
-CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \
|
|
+CFLAGS_BASE = $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \
|
|
-DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
|
-fPIC
|
|
|
|
@@ -94,7 +94,7 @@
|
|
|
|
else
|
|
|
|
-LDFLAGS = $(LDFLAGS_STATIC)
|
|
+LDFLAGS = $(VOID_LDFLAGS) $(LDFLAGS_STATIC)
|
|
# -s is not required for clang, do we need it for GCC ???
|
|
|
|
#-static -static-libgcc -static-libstdc++
|
|
@@ -149,7 +149,7 @@
|
|
|
|
|
|
|
|
-CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CC_SHARED) -o $@
|
|
+CFLAGS = $(VOID_CFLAGS) $(VOID_CPPFLAGS) $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CC_SHARED) -o $@
|
|
|
|
|
|
ifdef IS_MINGW
|
|
@@ -190,7 +190,7 @@
|
|
#-Wno-invalid-offsetof
|
|
#-Wno-reorder
|
|
|
|
-CXXFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CXXFLAGS_EXTRA) $(CC_SHARED) $(CXX_WARN_FLAGS) $(CXX_STD_FLAGS) -o $@
|
|
+CXXFLAGS = $(VOID_CXXFLAGS) $(VOID_CPPFLAGS) $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CXXFLAGS_EXTRA) $(CC_SHARED) $(CXX_WARN_FLAGS) $(CXX_STD_FLAGS) -o $@
|
|
|
|
STATIC_TARGET=
|
|
ifdef COMPL_STATIC
|
|
@@ -208,7 +208,7 @@
|
|
# -Wl,--print-gc-sections
|
|
|
|
ifneq ($(CC), $(CROSS_COMPILE)clang)
|
|
-LFLAGS_STRIP = -s
|
|
+LFLAGS_STRIP =
|
|
endif
|
|
|
|
LFLAGS_ALL = $(LFLAGS_STRIP) $(MY_ARCH_2) $(LDFLAGS) $(FLAGS_FLTO) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2)
|