Browse Source

change: disable stack protector

greatbridf 3 years ago
parent
commit
d1816c9600
2 changed files with 4 additions and 2 deletions
  1. 2 0
      .gitignore
  2. 2 2
      CMakeLists.txt

+ 2 - 0
.gitignore

@@ -5,3 +5,5 @@ build/
 test/
 
 bx_enh_dbg.ini
+
+.cache/

+ 2 - 2
CMakeLists.txt

@@ -24,9 +24,9 @@ add_custom_command(OUTPUT extracted_bootloader
 project(kernel_main)
 
 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-    set(CMAKE_C_FLAGS "-nostdinc -m32 -nostdlib -Wall -g -O0 -fverbose-asm -fno-exceptions -fno-pic")
+    set(CMAKE_C_FLAGS "-nostdinc -m32 -nostdlib -Wall -g -O0 -fverbose-asm -fno-exceptions -fno-pic -fno-stack-protector")
 elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
-    set(CMAKE_C_FLAGS "-nostdinc -m32 -nostdlib -Wall -O -fverbose-asm -fno-exceptions -fno-pic")
+    set(CMAKE_C_FLAGS "-nostdinc -m32 -nostdlib -Wall -O -fverbose-asm -fno-exceptions -fno-pic -fno-stack-protector")
 endif()
 
 include_directories(${PROJECT_SOURCE_DIR}/include)