diff --git a/judge/judgedaemon.main.php b/judge/judgedaemon.main.php index eb0574fdf0..bf8fcc8569 100644 --- a/judge/judgedaemon.main.php +++ b/judge/judgedaemon.main.php @@ -463,10 +463,10 @@ function fetch_executable_internal( } switch ($execlang) { case 'c': - $buildscript .= "gcc -Wall -O2 -std=gnu11 $source -o run -lm\n"; + $buildscript .= "gcc -Wall -O2 -static -std=gnu11 $source -o run -lm\n"; break; case 'cpp': - $buildscript .= "g++ -Wall -O2 -std=gnu++20 $source -o run\n"; + $buildscript .= "g++ -Wall -O2 -static -std=gnu++20 $source -o run\n"; break; case 'java': $buildscript .= "javac -cp . -d . $source\n"; diff --git a/sql/files/defaultdata/compare/build b/sql/files/defaultdata/compare/build index 31bb255097..f9275e2544 100755 --- a/sql/files/defaultdata/compare/build +++ b/sql/files/defaultdata/compare/build @@ -1,2 +1,2 @@ #!/bin/sh -g++ -std=c++11 -pedantic -g -O1 -Wall -fstack-protector -D_FORTIFY_SOURCE=2 -fPIE -Wformat -Wformat-security -fPIE -Wl,-z,relro -Wl,-z,now compare.cc -o run +g++ -std=c++11 -pedantic -g -O1 -static -Wall -fstack-protector -D_FORTIFY_SOURCE=2 -fPIE -Wformat -Wformat-security -fPIE -Wl,-z,relro -Wl,-z,now compare.cc -o run