mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 14:16:31 +00:00
Remove -fPIC on x86_64
The -fPIC breaks the purgatory of kexec (= the code that passes command-line arguments to the kernel): kexec doesn't know how to handle the GOT and PLT relocation entries. There is also no reason at all to pass -fPIC. Shared libraries that require it will add it to their local Makefiles, and normal executables have no business with -fPIC (plus it adds overhead...). The -fPIC was added by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> in commit 8027784c. That commit adds sysroot parameters to CFLAGS. There is no explanation why -fPIC is also added for x86_64. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
b8b57bb683
commit
7ea1e92bdd
@ -87,12 +87,6 @@ endif
|
|||||||
|
|
||||||
TARGET_CFLAGS=$(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
|
TARGET_CFLAGS=$(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
|
||||||
|
|
||||||
ifneq ($(BR2_PREFER_STATIC_LIB),y)
|
|
||||||
ifeq ($(BR2_x86_64),y)
|
|
||||||
TARGET_CFLAGS+=-fPIC -DPIC
|
|
||||||
endif # PIC for dynamic objects on x86_64
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(findstring yy,$(BR2_mips)$(BR2_MIPS_ABI64)),yy)
|
ifeq ($(findstring yy,$(BR2_mips)$(BR2_MIPS_ABI64)),yy)
|
||||||
TARGET_CFLAGS+=-fno-pic -mno-abicalls
|
TARGET_CFLAGS+=-fno-pic -mno-abicalls
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user