Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] ilixi: new package
Date: Thu, 7 Apr 2016 23:24:47 +0300	[thread overview]
Message-ID: <20160407202447.GC3088@tarshish> (raw)
In-Reply-To: <CAPWb3NT=hjjpgdxq-kwf7VD+Sko7VJz=aChNUvk3LW-bUQhXzQ@mail.gmail.com>

On Thu, Apr 07, 2016 at 02:10:37PM -0600, Justin Berger wrote:
> Ah. That makes sense, I feel somewhat chagrined for never realizing that
> CPPFLAGS was C Pre-Processor as opposed to C++.
> 
> Would it be better to patch out configure.ac here instead of using CFLAGS?

If you push such a patch upstream that would be best. Upstream takes pull 
requests at https://github.com/ilixi/ilixi, so that shouldn't be hard.

> I imagine the main way people learn to prepare packages is by looking at
> other packages, and so this might throw people off.

baruch

> On Thu, Apr 7, 2016 at 1:50 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> > On Thu, Apr 07, 2016 at 11:37:03AM -0600, Justin Berger wrote:
> > > What is the reason for CXXFLAGS over CPPFLAGS?
> >
> > CPPFLAGS is usually for options that affect the C pre-processor. The most
> > common pre-processor options are -I (include path), and -D (for macros).
> > CXXFLAGS is for C++ options like -std=c++11. See
> > http://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html.
> >
> > > I'm not sure why exactly but this package in particular doesn't seem to
> > look
> > > at CXXFLAGS if CPPFLAGS is present (which it is due to the
> > autotools-package
> > > internals it seems), and so doesn't catch the C++11 flag and won't
> > compile
> > > after that.
> >
> > Unfortunately configure.ac does
> >
> >   CXXFLAGS="$CFLAGS"
> >
> > which overwrites the environment CXXFLAGS. It should have been
> >
> >   CXXFLAGS="$CXXFLAGS $CFLAGS"
> >
> > In this case I think you should use CFLAGS.
> >
> > > I was a little unsure on best practice for setting that flag, so I
> > > basically just copied what directfb.mk does on line 132; where it uses
> > > CPPFLAGS.
> >
> > That's because this line adds a pre-processor -I option.
> >
> > > Although searching through I see sort of an even spread of CXX vs CPP
> > among
> > > autotools packages. But if there is a way to go with CXXFLAGS and have it
> > > work, I have no preference one way or the other.
> >
> > baruch
> >
> > > On Tue, Apr 5, 2016 at 10:33 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> > > > On Tue, Apr 05, 2016 at 08:47:16PM -0600, Justin Berger wrote:
> > > > >
> > > >
> > +################################################################################
> > > > > +#
> > > > > +# ilixi
> > > > > +#
> > > > >
> > > >
> > +################################################################################
> > > > > +
> > > > > +ILIXI_VERSION = 1.0.0
> > > > > +ILIXI_SITE = http://ilixi.org/releases
> > > > > +ILIXI_LICENSE = LGPLv3+, GPLV3+ (osk utf8-decoder)
> > > > > +ILIXI_LICENSE_FILES = COPYING.LESSER COPYING
> > > > > +ILIXI_INSTALL_STAGING = YES
> > > > > +
> > > > > +ILIXI_DEPENDENCIES =         \
> > > > > +     libsigc         \
> > > > > +     libxml2         \
> > > > > +     directfb        \
> > > > > +     fontconfig      \
> > > > > +
> > > > > +ifeq ($(BR2_PACKAGE_SAWMAN),y)
> > > > > +     ILIXI_CONF_OPTS += --enable-sawman
> > > > > +     ILIXI_DEPENDENCIES += sawman
> > > > > +else
> > > > > +     ILIXI_CONF_OPTS += --disable-sawman
> > > > > +endif
> > > > > +
> > > > > +ILIXI_CONF_ENV = CPPFLAGS="$(TARGET_CPPFLAGS) -std=c++11"
> > > >
> > > > Should be CXXFLAGS and TARGET_CXXFLAGS.

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  reply	other threads:[~2016-04-07 20:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06  2:47 [Buildroot] [PATCH] ilixi: new package Justin Berger
2016-04-06  2:55 ` Justin Berger
2016-04-06 21:47   ` Arnout Vandecappelle
2016-04-06  4:33 ` Baruch Siach
2016-04-07 17:37   ` Justin Berger
2016-04-07 19:50     ` Baruch Siach
2016-04-07 20:10       ` Justin Berger
2016-04-07 20:24         ` Baruch Siach [this message]
2016-04-08  3:00 ` 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=20160407202447.GC3088@tarshish \
    --to=baruch@tkos.co.il \
    --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