[Buildroot] OpenSSL build system knowledge somewhere ?

Peter Korsgaard jacmet at uclibc.org
Wed Apr 15 12:57:38 UTC 2009

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

 Thomas> Le Tue, 14 Apr 2009 10:41:34 +0200,
 Thomas> Thomas Petazzoni <thomas.petazzoni at free-electrons.com> a écrit :

 >> Here, using CC="$(TARGET_CC) $(TARGET_CFLAGS)" allows openssl to find
 >> zlib.h properly. However, it fails later with make thinking that the
 >> -Os and --sysroot options are for him (and not for gcc). The openssl
 >> build system looks strange, I don't have the time to look at time now.
 >> Maybe tomorrow.

 Thomas> I had a quick look, and the openssl build system is
 Thomas> definitely strange.  I don't see how one can pass custom
 Thomas> CFLAGS to this build system (and this is needed to pass
 Thomas> --sysroot $(STAGING_DIR)).

>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

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.

Bye, Peter Korsgaard

More information about the buildroot mailing list