[Buildroot] OpenSSL build system knowledge somewhere ?
gustavo at zacarias.com.ar
Wed Apr 15 13:59:00 UTC 2009
Peter Korsgaard wrote:
> From a quick look it seems to just be a matter of adding
> CFLAG='$(TARGET_CFLAGS) <extra flags>' on the make command line, where
> <extra flags> are the flags openssl uses internally (something like
> -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLCFN -DHAVE_DLFCN_H -DTERMIO).
> The question is why is all of a sudden failed? I thought I had seen
> positive reports with external toolchains after r23458, where openssl
> was changed to Makefile.autotools.in format. Notice that we used to
> patch up the Makefile with sed to change the compiler flags.
> I'm wondering if it wouldn't be simpler to use a wrapper script around
> gcc / g++ when using external toolchains, which would add -sysroot
> and -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include to the
> argument list instead of all of this.
Adding this in $(OPENSSL_TARGET_CONFIGURE) just before the end:
$(SED) "s:-march=[-a-z0-9] ::" -e "s:-mcpu=[-a-z0-9] ::g"
$(SED) "s:-O[0-9]:$(TARGET_CFLAGS):" $(OPENSSL_DIR)/Makefile
Gets rid of the "guesstimate" optimizations openssl does and we win on
size optimization while at it.
For ARM EABI old size:
More information about the buildroot