1
0
gentoo-repo/app-arch/7zip/files/7zip-24.07-respect-build-env.patch

45 lines
1.3 KiB
Diff
Raw Normal View History

2024-05-16 17:34:59 +02:00
Respect build environment settings
Bug: https://bugs.gentoo.org/913186
Bug: https://bugs.gentoo.org/913188
Bug: https://bugs.gentoo.org/913189
--- a/CPP/7zip/7zip_gcc.mak
+++ b/CPP/7zip/7zip_gcc.mak
@@ -103,14 +103,14 @@ SHARED_EXT=.dll
LDFLAGS = -shared -DEF $(DEF_FILE) $(LDFLAGS_STATIC)
else
SHARED_EXT=.so
-LDFLAGS = -shared -fPIC $(LDFLAGS_STATIC)
+LDFLAGS = -shared -fPIC $(G_LDFLAGS) $(LDFLAGS_STATIC)
CC_SHARED=-fPIC
endif
else
-LDFLAGS = $(LDFLAGS_STATIC)
+LDFLAGS = $(LDFLAGS_STATIC) $(G_LDFLAGS)
# -z force-bti
# -s is not required for clang, do we need it for GCC ???
@@ -169,7 +169,7 @@ endif
-CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CC_SHARED) -o $@
+CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CC_SHARED) $(G_CFLAGS) -o $@
ifdef IS_MINGW
@@ -209,7 +209,7 @@ CXX_WARN_FLAGS =
#-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) $(CXX_INCLUDE_FLAGS) -o $@
+CXXFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CXXFLAGS_EXTRA) $(CC_SHARED) $(CXX_WARN_FLAGS) $(CXX_STD_FLAGS) $(CXX_INCLUDE_FLAGS) $(G_CXXFLAGS) -o $@
STATIC_TARGET=
ifdef COMPL_STATIC