opa-fm/SOURCES/add-fPIC-flag.patch

16 lines
1.2 KiB
Diff
Raw Normal View History

2022-05-17 10:36:38 +00:00
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