Skip to content

Commit b09a890

Browse files
kent-mcleodlsf37
authored andcommitted
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 <[email protected]>
1 parent fcbb15c commit b09a890

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ macro(KernelCommonFlags)
128128
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${common_flag} ")
129129
endforeach()
130130
endmacro(KernelCommonFlags)
131-
KernelCommonFlags(-nostdinc -nostdlib ${KernelOptimisation} -DHAVE_AUTOCONF)
131+
KernelCommonFlags(-nostdlib ${KernelOptimisation} -DHAVE_AUTOCONF)
132132
if(KernelFWholeProgram)
133133
KernelCommonFlags(-fwhole-program)
134134
endif()
@@ -162,6 +162,7 @@ if(KernelArchRiscV)
162162
endif()
163163
KernelCommonFlags(-fno-pic -fno-pie)
164164
add_compile_options(
165+
-nostdinc
165166
-fno-stack-protector
166167
-fno-asynchronous-unwind-tables
167168
-std=c99

0 commit comments

Comments
 (0)