cmake: Remove -nostdinc from link commandline

nostdinc is a compile time argument and doesn't have any effect when
being passed to the linker.

Signed-off-by: Kent McLeod <kent@kry10.com>
This commit is contained in:
Kent McLeod
2021-11-25 16:52:10 +11:00
committed by Gerwin Klein
parent fcbb15ce3f
commit b09a890157

View File

@@ -128,7 +128,7 @@ macro(KernelCommonFlags)
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${common_flag} ")
endforeach()
endmacro(KernelCommonFlags)
KernelCommonFlags(-nostdinc -nostdlib ${KernelOptimisation} -DHAVE_AUTOCONF)
KernelCommonFlags(-nostdlib ${KernelOptimisation} -DHAVE_AUTOCONF)
if(KernelFWholeProgram)
KernelCommonFlags(-fwhole-program)
endif()
@@ -162,6 +162,7 @@ if(KernelArchRiscV)
endif()
KernelCommonFlags(-fno-pic -fno-pie)
add_compile_options(
-nostdinc
-fno-stack-protector
-fno-asynchronous-unwind-tables
-std=c99