Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] OpenSSL build system knowledge somewhere ?
Date: Wed, 15 Apr 2009 15:41:03 +0200	[thread overview]
Message-ID: <20090415154103.53f867d1@surf> (raw)
In-Reply-To: <87ab6i9irh.fsf@macbook.be.48ers.dk>

Le Wed, 15 Apr 2009 14:57:38 +0200,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> 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).

How do I know, in a proper way, what these <extra flags> are ? (I mean,
without hardcoding them in Buildroot's .mk file)

> The question is why is all of a sudden failed?

I have no idea, I've never myself compiled openssl with external
toolchain.

> 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'd say that something like
http://sources.busybox.net/index.py/trunk/buildroot/package/openssl/openssl.mk?revision=22690&view=markup
(before the Makefile.autotools.in conversion) was probably working
since the Configure script was patched with the value of
$(TARGET_CFLAGS).

What's your suggestion to work around the issue ?

> 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.

-I$(STAGING_DIR)/include and -I$(STAGING_DIR)/usr/include are not
needed when --sysroot $(STAGING) is given.

Moreover, the --sysroot option is just part of $(TARGET_CFLAGS), which
might as well contain other flags (march, mtune, mcpu, Os, O2 or
whatever), so the .mk should be written so that the build process of
all packages really take into account $(TARGET_CFLAGS). And if they do,
then there's no point in adding a wrapper script specially for the
--sysroot case.

Cheers,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2009-04-15 13:41 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
2009-04-15 13:41               ` Thomas Petazzoni [this message]
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=20090415154103.53f867d1@surf \
    --to=thomas.petazzoni@free-electrons.com \
    --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