From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Dan Kan <dan@nyansa.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Changes to makefiles to allow building apps using g++
Date: Tue, 14 Jan 2014 12:29:27 +0100 [thread overview]
Message-ID: <201401141229.27614.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <CA+RRbcr0u3NhCDw5Kv5okk=Wbv4CGxKWC+5dnbto6S2Ke1k+3Q@mail.gmail.com>
Hello Dan,
13/01/2014 23:45, Dan Kan:
> I made changes to makefiles to at least allow app development to be in done
> C++. I'm wondering if the community is interested in getting these changes
> as a patch.
If you need it, it's an excellent reason to integrate it.
Moreover we can guess that you're not alone to have this need.
> The dpdk library must still be compiled using gcc. However, the
> applications can be compiled using g++ by setting CC=g++, e.g. "make
> CC=g++". With g++, non-trivial designated initializers will no longer be
> allowed among others. As a result, most sample apps cannot be compiled
> using g++ without modifications; hello world app works with g++. You will
> also need to specify your c++ file extension if it's not named cpp, e.g.
> make CC=g++ CXX-suffix=cc. The behavior for gcc or icc compilation remains
> unmodified. Anyway, let me know if it's worthwhile to submit a patch.
I think that it should be documented.
What about a file doc/build-app.rst ?
You could start documenting how it is different for C++.
> +ifeq ($(CC), $(CROSS)g++)
> +TOOLCHAIN_CFLAGS += -D__STDC_LIMIT_MACROS
> +WERROR_FLAGS := -W -Wall -Werror
> +WERROR_FLAGS += -Wmissing-declarations -Wpointer-arith
> +WERROR_FLAGS += -Wcast-align -Wcast-qual
> +else
> WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
> WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition
> -Wpointer-arith
> WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
> +endif
> WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
Could you factorize the common flags, please ?
Thank you
--
Thomas
prev parent reply other threads:[~2014-01-14 11:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 22:45 Dan Kan
2014-01-14 11:29 ` Thomas Monjalon [this message]
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=201401141229.27614.thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dan@nyansa.com \
--cc=dev@dpdk.org \
/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;
as well as URLs for NNTP newsgroup(s).