X-Git-Url: http://git.thejh.net/?p=cwebfiles.git;a=blobdiff_plain;f=compile;h=1137363e082f7747f32e12527e8dad9b26d7ac0f;hp=251fa4ac3d49352a288a46b9f1791359ece3b54e;hb=HEAD;hpb=613a08c6febb5126b81b313311b939dbae7290c9 diff --git a/compile b/compile index 251fa4a..1137363 100755 --- a/compile +++ b/compile @@ -1,7 +1,13 @@ #!/bin/bash -for cgi in login checkstatus listdir; do +for cgi in checkstatus listdir; do echo -e "\ncompiling $cgi.c..." - diet gcc -O3 -std=gnu99 -Wall -Werror -g -o $cgi $cgi.c cgistuff.c hex.c -lcrypt -lowfat + diet gcc -O3 -fwhole-program -flto -std=gnu99 -Wall -Werror -g -o $cgi $cgi.c cgistuff.c hex.c -lcrypt -lowfat sudo chown root:root $cgi sudo chmod u+s $cgi done + +# diet doesn't work here because crypt() doesn't support modern hashes +echo -e "\ncompiling login.c..." +gcc -O3 -fwhole-program -flto -std=gnu99 -Wall -Werror -g -o login login.c cgistuff.c hex.c -lcrypt -lowfat +sudo chown root:root login +sudo chmod u+s login