mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-24 05:56:26 +02:00
Updated to GCC 12.2.0
This commit is contained in:
parent
86d897d580
commit
96b7fab22a
9 changed files with 107 additions and 0 deletions
29
packages/gcc/12.2.0/compile
vendored
Normal file
29
packages/gcc/12.2.0/compile
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Put instructions to compile source code, remove this file if the language does not require this stage
|
||||
|
||||
|
||||
case "${PISTON_LANGUAGE}" in
|
||||
c)
|
||||
rename 's/$/\.c/' "$@" # Add .c extension
|
||||
gcc -std=c11 *.c -lm
|
||||
;;
|
||||
c++)
|
||||
rename 's/$/\.cpp/' "$@" # Add .cpp extension
|
||||
g++ -std=c++17 *.cpp
|
||||
;;
|
||||
d)
|
||||
rename 's/.code$/\.d/' "$@" # Add .d extension
|
||||
gdc *.d
|
||||
;;
|
||||
fortran)
|
||||
rename 's/.code$/\.f90/' "$@" # Add .f90 extension
|
||||
gfortran *.f90
|
||||
;;
|
||||
*)
|
||||
echo "How did you get here? (${PISTON_LANGUAGE})"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
chmod +x a.out
|
Loading…
Add table
Add a link
Reference in a new issue