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 @@ -45,7 +45,6 @@ else CFLAGS_DEBUG = -DNDEBUG ifneq ($(CC), $(CROSS_COMPILE)clang) -LFLAGS_STRIP = -s endif endif @@ -104,14 +103,14 @@ 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 = $(G_LDFLAGS) $(LDFLAGS_STATIC) # -z force-bti # -s is not required for clang, do we need it for GCC ??? @@ -169,7 +168,7 @@ -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 @@ -210,7 +209,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) $(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