Initial commit
This commit is contained in:
34
pp/oppai-ng/cflags
Normal file
34
pp/oppai-ng/cflags
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
cflags="-std=c89 -pedantic"
|
||||
cflags="$cflags -O3"
|
||||
cflags="$cflags -fno-strict-aliasing"
|
||||
cflags="$cflags -Wno-variadic-macros -Wno-long-long -Wall"
|
||||
cflags="$cflags -ffunction-sections -fdata-sections"
|
||||
cflags="$cflags -g0 -fno-unwind-tables -s"
|
||||
cflags="$cflags -fno-asynchronous-unwind-tables"
|
||||
|
||||
ldflags="-lm"
|
||||
|
||||
cflags="$cflags $CFLAGS"
|
||||
ldflags="$ldflags $LDFLAGS"
|
||||
|
||||
cc="$CC"
|
||||
|
||||
if [ $(uname) = "Darwin" ]; then
|
||||
cc=${cc:-clang}
|
||||
else
|
||||
cc=${cc:-gcc}
|
||||
fi
|
||||
|
||||
uname -a > flags.log
|
||||
echo $cc >> flags.log
|
||||
echo $cflags >> flags.log
|
||||
echo $ldflags >> flags.log
|
||||
$cc --version >> flags.log
|
||||
$cc -dumpmachine >> flags.log
|
||||
|
||||
export cflags="$cflags"
|
||||
export ldflags="$ldflags"
|
||||
export cc="$cc"
|
||||
|
Reference in New Issue
Block a user