Fix C++ flags handling (fix relocation error on Fedora 41)
This commit is contained in:
3 files changed
+5
-4
No files matched your search
@@ -177,6 +177,7 @@ ifneq ($(NOHARDENING),1)
|
|||||||
CFLAGS += -fcf-protection=full
|
CFLAGS += -fcf-protection=full
|
||||||
endif
|
endif
|
||||||
DEFCFLAGS += -fPIE
|
DEFCFLAGS += -fPIE
|
||||||
|
DEFCXXFLAGS += -fPIE
|
||||||
DEFLDFLAGS += -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -pie
|
DEFLDFLAGS += -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -pie
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
+3
-3
@@ -472,7 +472,7 @@ endif
|
|||||||
|
|
||||||
PM3CFLAGS += -DHAVE_SNPRINTF
|
PM3CFLAGS += -DHAVE_SNPRINTF
|
||||||
|
|
||||||
CXXFLAGS ?= -Wall -Werror
|
CXXFLAGS ?= $(DEFCXXFLAGS)
|
||||||
CXXFLAGS += $(MYDEFS) $(MYCXXFLAGS) $(MYINCLUDES)
|
CXXFLAGS += $(MYDEFS) $(MYCXXFLAGS) $(MYINCLUDES)
|
||||||
|
|
||||||
PM3CXXFLAGS = $(CXXFLAGS)
|
PM3CXXFLAGS = $(CXXFLAGS)
|
||||||
@@ -483,10 +483,10 @@ ifeq ($(QT_FOUND),1)
|
|||||||
PM3CXXFLAGS += -DQT_NO_DEBUG
|
PM3CXXFLAGS += -DQT_NO_DEBUG
|
||||||
ifeq ($(QT6_FOUND),1)
|
ifeq ($(QT6_FOUND),1)
|
||||||
# Qt6 is claiming for a C++17 compiler
|
# Qt6 is claiming for a C++17 compiler
|
||||||
PM3CXXFLAGS += -fPIC -std=c++17
|
PM3CXXFLAGS += -std=c++17
|
||||||
else
|
else
|
||||||
# On OSX Qt6 is claiming for a C++11 compiler (gnu++14 works too, but if nothing it fails)
|
# On OSX Qt6 is claiming for a C++11 compiler (gnu++14 works too, but if nothing it fails)
|
||||||
PM3CXXFLAGS += -fPIC -std=c++11
|
PM3CXXFLAGS += -std=c++11
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ endif
|
|||||||
|
|
||||||
# macOS needs c++14 standard when compiling c++
|
# macOS needs c++14 standard when compiling c++
|
||||||
ifeq ($(platform),Darwin)
|
ifeq ($(platform),Darwin)
|
||||||
MYCXXFLAGS = -std=c++14
|
MYCXXFLAGS += -std=c++14
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(findstring MINGW,$(platform)))
|
ifneq (,$(findstring MINGW,$(platform)))
|
||||||
|
|||||||
Reference in new issue
Block a user