diff --git a/setup.py b/setup.py index 8383492..fd2ea07 100644 --- a/setup.py +++ b/setup.py @@ -53,7 +53,9 @@ # Sandboxed compilers: 'gcc4_8_2_c99 = sio.compilers.gcc:run_c_gcc4_8_2_c99', + 'gcc12_2_0_c17 = sio.compilers.gcc:run_c_gcc12_2_0_c17', 'g++4_8_2_cpp11 = sio.compilers.gcc:run_cpp_gcc4_8_2_cpp11', + 'g++12_2_0_cpp20 = sio.compilers.gcc:run_cpp_gcc12_2_0_cpp20', 'fpc2_6_2 = sio.compilers.fpc:run_pas_fpc2_6_2', 'java1_8 = sio.compilers.java:run_java1_8', diff --git a/sio/compilers/gcc.py b/sio/compilers/gcc.py index af72464..41686b8 100644 --- a/sio/compilers/gcc.py +++ b/sio/compilers/gcc.py @@ -11,6 +11,12 @@ def gcc_4_8_2_c99(cls): obj.options = ['-std=gnu99', '-static', '-O2', '-s', '-lm'] return obj + @classmethod + def gcc_12_2_0_c17(cls): + obj = cls('gcc.12_2_0') + obj.options = ['-std=c17', '-static', '-O3', '-lm'] + return obj + class CPPCompiler(CStyleCompiler): lang = 'cpp' @@ -22,24 +28,41 @@ def gcc_4_8_2_cpp11(cls): obj.options = ['-std=c++11', '-static', '-O2', '-s', '-lm'] return obj + @classmethod + def gcc_12_2_0_cpp20(cls): + obj = cls('gcc.12_2_0') + obj.compiler = 'g++' + obj.options = ['-std=c++20', '-static', '-O3'] + return obj + def run_gcc4_8_2_c99(environ): return CCompiler.gcc_4_8_2_c99().compile(environ) +def run_gcc12_2_0_c17(environ): + return CCompiler.gcc_12_2_0_c17().compile(environ) + + def run_gcc_default(environ): - return CCompiler.gcc_4_8_2_c99().compile(environ) + return CCompiler.gcc_12_2_0_c17().compile(environ) def run_gplusplus4_8_2_cpp11(environ): return CPPCompiler.gcc_4_8_2_cpp11().compile(environ) +def run_gplusplus12_2_0_cpp20(environ): + return CPPCompiler.gcc_12_2_0_cpp20().compile(environ) + + def run_gplusplus_default(environ): - return CPPCompiler.gcc_4_8_2_cpp11().compile(environ) + return CPPCompiler.gcc_12_2_0_cpp20().compile(environ) run_c_default = run_gcc_default run_c_gcc4_8_2_c99 = run_gcc4_8_2_c99 +run_c_gcc12_2_0_c17 = run_gcc12_2_0_c17 run_cpp_default = run_gplusplus_default run_cpp_gcc4_8_2_cpp11 = run_gplusplus4_8_2_cpp11 +run_cpp_gcc12_2_0_cpp20 = run_gplusplus12_2_0_cpp20 diff --git a/sio/workers/executors.py b/sio/workers/executors.py index cdb60d4..31b5aa7 100644 --- a/sio/workers/executors.py +++ b/sio/workers/executors.py @@ -800,7 +800,7 @@ class PRootExecutor(BaseExecutor): def __init__(self, sandbox): """``sandbox`` has to be a sandbox name.""" self.chroot = get_sandbox(sandbox) - self.proot = SandboxExecutor('proot-sandbox') + self.proot = SandboxExecutor('proot-sandbox_amd64') self.options = [] with self.chroot: diff --git a/sio/workers/test/sources/inwer_argument.c b/sio/workers/test/sources/inwer_argument.c index 6283f69..4bfd05a 100644 --- a/sio/workers/test/sources/inwer_argument.c +++ b/sio/workers/test/sources/inwer_argument.c @@ -1,4 +1,5 @@ #include +#include int main(int argc, char *argv[]) { if (argc != 2) { diff --git a/sio/workers/test/sources/output-too-long.c b/sio/workers/test/sources/output-too-long.c index e26881e..150aee0 100644 --- a/sio/workers/test/sources/output-too-long.c +++ b/sio/workers/test/sources/output-too-long.c @@ -1,4 +1,3 @@ -#include #include #include