mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 02:46:58 +00:00
Add LTM_CFLAGS configure argument
This commit is contained in:
parent
cda8070898
commit
54a90ddac5
6
SMALL
6
SMALL
@ -47,4 +47,10 @@ deciding.
|
|||||||
|
|
||||||
Of course using small C libraries such as uClibc and dietlibc can also help.
|
Of course using small C libraries such as uClibc and dietlibc can also help.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Libtommath has its own default CFLAGS to improve speed. You can use
|
||||||
|
./configure LTM_CFLAGS=-O2
|
||||||
|
to reduce size at the expense of speed.
|
||||||
|
|
||||||
If you have any queries, mail me and I'll see if I can help.
|
If you have any queries, mail me and I'll see if I can help.
|
||||||
|
16
configure
vendored
16
configure
vendored
@ -672,6 +672,8 @@ build_vendor
|
|||||||
build_cpu
|
build_cpu
|
||||||
build
|
build
|
||||||
STATIC
|
STATIC
|
||||||
|
DROPBEAR_LTM_CFLAGS
|
||||||
|
LTM_CFLAGS
|
||||||
LD
|
LD
|
||||||
OBJEXT
|
OBJEXT
|
||||||
EXEEXT
|
EXEEXT
|
||||||
@ -754,6 +756,7 @@ CFLAGS
|
|||||||
LDFLAGS
|
LDFLAGS
|
||||||
LIBS
|
LIBS
|
||||||
CPPFLAGS
|
CPPFLAGS
|
||||||
|
LTM_CFLAGS
|
||||||
CXX
|
CXX
|
||||||
CXXFLAGS
|
CXXFLAGS
|
||||||
CCC
|
CCC
|
||||||
@ -1417,6 +1420,8 @@ Some influential environment variables:
|
|||||||
LIBS libraries to pass to the linker, e.g. -l<library>
|
LIBS libraries to pass to the linker, e.g. -l<library>
|
||||||
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
|
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
|
||||||
you have headers in a nonstandard directory <include dir>
|
you have headers in a nonstandard directory <include dir>
|
||||||
|
LTM_CFLAGS CFLAGS for bundled libtommath. Default -O3 -funroll-loops
|
||||||
|
-fomit-frame-pointer
|
||||||
CXX C++ compiler command
|
CXX C++ compiler command
|
||||||
CXXFLAGS C++ compiler flags
|
CXXFLAGS C++ compiler flags
|
||||||
CPP C preprocessor
|
CPP C preprocessor
|
||||||
@ -3990,6 +3995,17 @@ printf "%s\n" "$as_me: No \$CFLAGS set... using \"-Os -W -Wall\" for GCC" >&6;}
|
|||||||
CFLAGS="-Os -W -Wall"
|
CFLAGS="-Os -W -Wall"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# LTM_CFLAGS is given to ./configure by the user,
|
||||||
|
# DROPBEAR_LTM_CFLAGS is substituted in the LTM Makefile.in
|
||||||
|
DROPBEAR_LTM_CFLAGS="$LTM_CFLAGS"
|
||||||
|
if test -z "$DROPBEAR_LTM_CFLAGS"; then
|
||||||
|
DROPBEAR_LTM_CFLAGS="-O3 -funroll-loops -fomit-frame-pointer"
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Setting LTM_CFLAGS to $DROPBEAR_LTM_CFLAGS" >&5
|
||||||
|
printf "%s\n" "$as_me: Setting LTM_CFLAGS to $DROPBEAR_LTM_CFLAGS" >&6;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking if compiler '$CC' supports -Wno-pointer-sign" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking if compiler '$CC' supports -Wno-pointer-sign" >&5
|
||||||
printf "%s\n" "$as_me: Checking if compiler '$CC' supports -Wno-pointer-sign" >&6;}
|
printf "%s\n" "$as_me: Checking if compiler '$CC' supports -Wno-pointer-sign" >&6;}
|
||||||
|
|
||||||
|
10
configure.ac
10
configure.ac
@ -42,6 +42,16 @@ if test -z "$ORIGCFLAGS" && test "$GCC" = "yes"; then
|
|||||||
CFLAGS="-Os -W -Wall"
|
CFLAGS="-Os -W -Wall"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# LTM_CFLAGS is given to ./configure by the user,
|
||||||
|
# DROPBEAR_LTM_CFLAGS is substituted in the LTM Makefile.in
|
||||||
|
DROPBEAR_LTM_CFLAGS="$LTM_CFLAGS"
|
||||||
|
if test -z "$DROPBEAR_LTM_CFLAGS"; then
|
||||||
|
DROPBEAR_LTM_CFLAGS="-O3 -funroll-loops -fomit-frame-pointer"
|
||||||
|
fi
|
||||||
|
AC_MSG_NOTICE(Setting LTM_CFLAGS to $DROPBEAR_LTM_CFLAGS)
|
||||||
|
AC_ARG_VAR(LTM_CFLAGS, CFLAGS for bundled libtommath. Default -O3 -funroll-loops -fomit-frame-pointer)
|
||||||
|
AC_SUBST(DROPBEAR_LTM_CFLAGS)
|
||||||
|
|
||||||
AC_MSG_NOTICE([Checking if compiler '$CC' supports -Wno-pointer-sign])
|
AC_MSG_NOTICE([Checking if compiler '$CC' supports -Wno-pointer-sign])
|
||||||
DB_TRYADDCFLAGS([-Wno-pointer-sign])
|
DB_TRYADDCFLAGS([-Wno-pointer-sign])
|
||||||
|
|
||||||
|
@ -25,8 +25,14 @@ endif
|
|||||||
|
|
||||||
coverage: LIBNAME:=-Wl,--whole-archive $(LIBNAME) -Wl,--no-whole-archive
|
coverage: LIBNAME:=-Wl,--whole-archive $(LIBNAME) -Wl,--no-whole-archive
|
||||||
|
|
||||||
|
# Dropbear sets its own flags below
|
||||||
|
IGNORE_SPEED=1
|
||||||
|
|
||||||
include $(srcdir)/makefile_include.mk
|
include $(srcdir)/makefile_include.mk
|
||||||
|
|
||||||
|
# override makefile_include.mk flags
|
||||||
|
LTM_CFLAGS += @DROPBEAR_LTM_CFLAGS@
|
||||||
|
|
||||||
%.o: %.c $(HEADERS)
|
%.o: %.c $(HEADERS)
|
||||||
ifneq ($V,1)
|
ifneq ($V,1)
|
||||||
@echo " * ${CC} $@"
|
@echo " * ${CC} $@"
|
||||||
|
Loading…
Reference in New Issue
Block a user