RHEL8.4: make mcinspect and eclair fPIE for RPM, clear build_ldflags in mckernel.spec
Change-Id: I06f09628629c2afb0d36ad6ab2e2ed2cc716a980
This commit is contained in:
@ -31,9 +31,13 @@ else()
|
||||
target_link_libraries(mcinspect ${LIBDWARF})
|
||||
endif()
|
||||
target_link_libraries(mcinspect ${LIBBFD})
|
||||
set_property(TARGET mcinspect PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET mcinspect PROPERTY LINK_FLAGS "-fPIE -pie")
|
||||
|
||||
add_executable(eclair eclair.c arch/${ARCH}/arch-eclair.c)
|
||||
target_link_libraries(eclair ${LIBBFD})
|
||||
set_property(TARGET eclair PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET eclair PROPERTY LINK_FLAGS "-fPIE -pie")
|
||||
|
||||
add_library(sched_yield SHARED libsched_yield.c)
|
||||
target_link_libraries(sched_yield dl)
|
||||
|
||||
@ -71,6 +71,8 @@ This package contains headers and libraries required for build apps using IHK/Mc
|
||||
|
||||
# We need to remove ld flags like relro for the final mckernel.img link, as well as remove cflags for mckernel
|
||||
# ideally mckernel should use different environment variables for the user tools and the kernel tools altogether...
|
||||
%undefine _hardened_build
|
||||
%define build_ldflags ""
|
||||
%define __global_ldflags ""
|
||||
%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic
|
||||
|
||||
|
||||
Reference in New Issue
Block a user