You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fedora and RHEL requires compile C/C++ code with strict options for security enhance. So, executables must be linked with '-pie' flag. That needs the C/C++ files compiled with '-fPIC' flag.
Please consider apply this patch.
$ cat add-fPIC-flag.patch
diff --git a/Makerules/Target.LINUX.GNU.X86_64 b/Makerules/Target.LINUX.GNU.X86_64
index 5a852b3..194a8b2 100755
--- a/Makerules/Target.LINUX.GNU.X86_64
+++ b/Makerules/Target.LINUX.GNU.X86_64
@@ -77,8 +77,8 @@ SHLIB_SONAME=$(notdir $(CMD_TARGETS_SHLIB))
# ----------------------------
# -fcheck-new does the opposite of what the manual implies.
# -fcheck-new DISABLES the run-time test of return value from new
-CMACH = -pipe -DTARGET_CPU_FAMILY_X86 -Wall -Werror=format-security -D__X86_64__ -DCPU_LE -m64 -fno-strict-aliasing -fstack-protector
-CCMACH = -pipe -DTARGET_CPU_FAMILY_X86 -Wall -Werror=format-security -D__X86_64__ -DCPU_LE -m64 -fno-strict-aliasing -fstack-protector -fcheck-new -Wno-ctor-dtor-privacy
+CMACH = -fPIC -pipe -DTARGET_CPU_FAMILY_X86 -Wall -Werror=format-security -D__X86_64__ -DCPU_LE -m64 -fno-strict-aliasing -fstack-protector
+CCMACH = -fPIC -pipe -DTARGET_CPU_FAMILY_X86 -Wall -Werror=format-security -D__X86_64__ -DCPU_LE -m64 -fno-strict-aliasing -fstack-protector -fcheck-new -Wno-ctor-dtor-privacy
ifeq ($(shell expr $(GCC_MAJOR_VERSION) \>= 7), 1)
ifeq ($(shell expr $(GCC_MINOR_VERSION) \>= 0), 1)
CMACH+= -std=gnu90 -Wno-misleading-indentation -Wno-format-truncation
The text was updated successfully, but these errors were encountered:
Fedora and RHEL requires compile C/C++ code with strict options for security enhance. So, executables must be linked with '-pie' flag. That needs the C/C++ files compiled with '-fPIC' flag.
Please consider apply this patch.
The text was updated successfully, but these errors were encountered: