Browse Source

fix build bug in gblibc

shao 4 months ago
parent
commit
6ecf5b4237
1 changed files with 4 additions and 1 deletions
  1. 4 1
      gblibc/CMakeLists.txt

+ 4 - 1
gblibc/CMakeLists.txt

@@ -45,9 +45,12 @@ add_library(crt0_32 OBJECT
     src/crt0.s
 )
 
-target_compile_options(gblibc_32 PRIVATE "-m32")
+target_compile_options(gblibc_32 PRIVATE "-fno-pic")
 target_compile_options(gblibc_32 PRIVATE "-mcmodel=32")
+target_compile_options(gblibc_32 PRIVATE "-m32")
+target_compile_options(crt0_32 PRIVATE "-fno-pic")
 target_compile_options(crt0_32 PRIVATE "-m32")
+target_compile_options(crt0_32 PRIVATE "-mcmodel=32")
 target_link_options(gblibc_32 PRIVATE "LINKER:-melf_i386")
 target_link_options(crt0_32 PRIVATE "LINKER:-melf_i386")