mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-17 15:36:50 +00:00
flto flag
This commit is contained in:
parent
9e9354c6d3
commit
d7176f0a27
29
configure
vendored
29
configure
vendored
@ -24,6 +24,7 @@ compile=no
|
|||||||
install=no
|
install=no
|
||||||
silentopt=no
|
silentopt=no
|
||||||
try_libmusl=no
|
try_libmusl=no
|
||||||
|
no_flto=no
|
||||||
|
|
||||||
# default optimization goal, speed = -O2, size = -Os
|
# default optimization goal, speed = -O2, size = -Os
|
||||||
optitype=size
|
optitype=size
|
||||||
@ -271,9 +272,9 @@ do
|
|||||||
greet ) ft_greet=no ;;
|
greet ) ft_greet=no ;;
|
||||||
hostinfo ) ft_hostinfo=no ;;
|
hostinfo ) ft_hostinfo=no ;;
|
||||||
ircd_ext ) ft_ircd_ext=no ;;
|
ircd_ext ) ft_ircd_ext=no ;;
|
||||||
libmusl ) try_libmusl=no ;;
|
libmusl ) try_libmusl=no ;;
|
||||||
md5 ) ft_md5=no ;;
|
md5 ) ft_md5=no ;;
|
||||||
netcfg ) ft_netcfg=no ;;
|
netcfg ) ft_netcfg=no ;;
|
||||||
newbie ) ft_newbie=no ;;
|
newbie ) ft_newbie=no ;;
|
||||||
note ) ft_note=no ;;
|
note ) ft_note=no ;;
|
||||||
notify ) ft_notify=no ;;
|
notify ) ft_notify=no ;;
|
||||||
@ -317,6 +318,8 @@ do
|
|||||||
--no-pipeflag) cc_pipe_opt=no ;;
|
--no-pipeflag) cc_pipe_opt=no ;;
|
||||||
--use-ofp) cc_ofp_opt=yes ;;
|
--use-ofp) cc_ofp_opt=yes ;;
|
||||||
--no-ofp) cc_ofp_opt=no ;;
|
--no-ofp) cc_ofp_opt=no ;;
|
||||||
|
--use-flto) no_flto=no ;;
|
||||||
|
--no-flto) no_flto=yes ;;
|
||||||
--default-yes) ft_default=yes set_feature_defaults ;;
|
--default-yes) ft_default=yes set_feature_defaults ;;
|
||||||
--default-no) ft_default=no set_feature_defaults ;;
|
--default-no) ft_default=no set_feature_defaults ;;
|
||||||
--help | -h)
|
--help | -h)
|
||||||
@ -335,6 +338,8 @@ Features and packages:
|
|||||||
--sha=internal Use internal routines for SHA password hashes instead of system libraries
|
--sha=internal Use internal routines for SHA password hashes instead of system libraries
|
||||||
--use-ofp Try to use compiler flag -fomit-frame-pointer
|
--use-ofp Try to use compiler flag -fomit-frame-pointer
|
||||||
--no-ofp Do not use compiler flag -fomit-frame-pointer
|
--no-ofp Do not use compiler flag -fomit-frame-pointer
|
||||||
|
--use-flto Try to compile with Link-Time Optimizatons
|
||||||
|
--no-flto Dont use Link-Time Optimizations
|
||||||
--with-alias ALIAS support
|
--with-alias ALIAS support
|
||||||
--with-botnet Botnet support
|
--with-botnet Botnet support
|
||||||
--with-bounce
|
--with-bounce
|
||||||
@ -624,6 +629,9 @@ if [ -z "$cf_cflags" -a -n "$cf_GNUCC" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# test for -pipe flag
|
||||||
|
#
|
||||||
if [ -z "$cf_cflags" -a -z "$cc_pipe_opt" ]; then
|
if [ -z "$cf_cflags" -a -z "$cc_pipe_opt" ]; then
|
||||||
if $CC -pipe -c -o $TESTO $TESTC 1> /dev/null 2> /dev/null && test -r $TESTO; then
|
if $CC -pipe -c -o $TESTO $TESTC 1> /dev/null 2> /dev/null && test -r $TESTO; then
|
||||||
cc_pipe_flag="-pipe"
|
cc_pipe_flag="-pipe"
|
||||||
@ -631,6 +639,20 @@ if [ -z "$cf_cflags" -a -z "$cc_pipe_opt" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# test -flto (link-time optimizations)
|
||||||
|
#
|
||||||
|
if [ -z "$no_flto" -o "$no_flto" = no ]; then
|
||||||
|
if [ -z "$cf_cflags" ]; then
|
||||||
|
if $CC -flto -c -o $TESTO $TESTC 1> /dev/null 2> /dev/null && test -r $TESTO; then
|
||||||
|
cc_flto_flag="-flto"
|
||||||
|
echo $ac_n "-flto "$ac_c
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cc_flto_flag=
|
||||||
|
fi
|
||||||
|
|
||||||
oflag="-O2"
|
oflag="-O2"
|
||||||
if [ "$optitype" = size ]; then
|
if [ "$optitype" = size ]; then
|
||||||
oflag="-Os"
|
oflag="-Os"
|
||||||
@ -1455,7 +1477,7 @@ cprof="$cc_pg_flag $cc_pg_define"
|
|||||||
lprof="$cc_pg_flag $cc_pg_define $libpgdl"
|
lprof="$cc_pg_flag $cc_pg_define $libpgdl"
|
||||||
|
|
||||||
if [ -z "$cf_cflags" ]; then
|
if [ -z "$cf_cflags" ]; then
|
||||||
cf_cflags='$(PIPEFLAG) $(GDBFLAG) $(WARNFLAG) $(OPTIMIZE)'
|
cf_cflags='$(PIPEFLAG) $(GDBFLAG) $(FLTO_FLAG) $(WARNFLAG) $(OPTIMIZE)'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo '# This file is generated from Makefile.in' > src/Makefile
|
echo '# This file is generated from Makefile.in' > src/Makefile
|
||||||
@ -1464,6 +1486,7 @@ s%@CC@%$CCshort%;
|
|||||||
s%@ldscript@%$ldscript%;
|
s%@ldscript@%$ldscript%;
|
||||||
s%@pipeflag@%$cc_pipe_flag%;
|
s%@pipeflag@%$cc_pipe_flag%;
|
||||||
s%@gdbflag@%$cc_g_flag%;
|
s%@gdbflag@%$cc_g_flag%;
|
||||||
|
s%@flto_flag@%$cc_flto_flag%;
|
||||||
/@cprof@/ { s,@cprof@,$cprof,; };
|
/@cprof@/ { s,@cprof@,$cprof,; };
|
||||||
/@lprof@/ { s,@lprof@,$lprof,; };
|
/@lprof@/ { s,@lprof@,$lprof,; };
|
||||||
/@lflags@/ { s,@lflags@,$lflags,; };
|
/@lflags@/ { s,@lflags@,$lflags,; };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user