Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] OpenSSL build system knowledge somewhere ?
Date: Wed, 15 Apr 2009 14:57:38 +0200	[thread overview]
Message-ID: <87ab6i9irh.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20090415110647.1bf85daa@surf> (Thomas Petazzoni's message of "Wed\, 15 Apr 2009 11\:06\:47 +0200")

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

 Thomas> Le Tue, 14 Apr 2009 10:41:34 +0200,
 Thomas> Thomas Petazzoni <thomas.petazzoni@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
-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.

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2009-04-15 12:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-12  3:46 [Buildroot] buildroot openssl compile error Brad Johnson
2009-04-13 18:03 ` Peter Korsgaard
2009-04-13 20:08   ` Thomas Petazzoni
2009-04-14  3:10     ` Brad Johnson
2009-04-14  7:09       ` Thomas Petazzoni
2009-04-14  8:41         ` Thomas Petazzoni
2009-04-15  9:06           ` [Buildroot] OpenSSL build system knowledge somewhere ? Thomas Petazzoni
2009-04-15 12:57             ` Peter Korsgaard [this message]
2009-04-15 13:41               ` Thomas Petazzoni
2009-04-15 13:50                 ` Peter Korsgaard
2009-04-15 19:28                   ` Gustavo Zacarias
2009-04-15 13:59               ` Gustavo Zacarias
2009-04-14  2:00   ` [Buildroot] buildroot openssl compile error Brad Johnson
2009-04-28 21:06 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ab6i9irh.fsf@macbook.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox