modals
[vg.git] / vg_build.h
index 37f00338019419ce20cdbc5556881fc9995d8a4e..873eb3981e41464b486026581762dad063e2c286 100644 (file)
@@ -111,7 +111,13 @@ void vg_build_add_link_for_graphics(void)
    else
    {
       vg_build_link( "-lmingw32 -lSDL2main -lSDL2 -lopengl32 -mwindows \\\n" );
-      vg_build_link( "   -Wl,--dynamicbase -Wl,--nxcompat " );
+      vg_build_link( "   -Wl,--dynamicbase -Wl,--nxcompat \\\n" );
+
+      /* + 26.05.23: Suddenly something is pulling in winpthread. 
+       *             cant work out whats doing it or why. */
+      vg_build_link( "   -Wl,-Bstatic,--whole-archive \\\n" );
+      vg_build_link( "      -lwinpthread \\\n" );
+      vg_build_link( "   -Wl,--no-whole-archive " );
    }
 
    vg_build_object( "vg/dep/glad/glad.c " );
@@ -211,7 +217,8 @@ void vg_build(void)
       if( (vg_compiler.compiler == k_compiler_gcc) ||
           (vg_compiler.compiler == k_compiler_clang ) )
       {
-         strcat( cmd, "-rdynamic -fsanitize=address " );
+         strcat( cmd, "-rdynamic -fsanitize=address "
+                      "-fPIE -fstack-protector-strong " );
       }
 
       strcat( cmd, "\\\n" );