From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v2 00/11] Fix build errors related to exported headers Date: Tue, 5 Jul 2016 13:35:03 +0200 Message-ID: <20160705113503.GK7621@6wind.com> References: <1459865290-10248-1-git-send-email-adrien.mazarguil@6wind.com> <20160705111523.5861459.30261.5810@rehivetech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Jan Viktorin Return-path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 2001A5689 for ; Tue, 5 Jul 2016 13:35:06 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id 187so26422224wmz.1 for ; Tue, 05 Jul 2016 04:35:06 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20160705111523.5861459.30261.5810@rehivetech.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Jan, On Tue, Jul 05, 2016 at 01:15:23PM +0200, Jan Viktorin wrote: > Hi Adrien, >=20 > I am the only one in CC and only in the 00/11 patch. Is it a mistake? O= r what is the purpose? It was on purpose to draw your attention to my comment regarding #include= s within extern "C" blocks. > Regards=E2=80=8E > Jan=C2=A0Viktorin > RehiveTech > Sent=C2=A0from=C2=A0a=C2=A0mobile=C2=A0device > =C2=A0 P=C5=AFvodn=C3=AD zpr=C3=A1va =C2=A0 > Od: Adrien Mazarguil > Odesl=C3=A1no: =C3=BAter=C3=BD, 5. =C4=8Dervence 2016 12:45 > Komu: dev@dpdk.org > Kopie: Jan Viktorin > P=C5=99edm=C4=9Bt: [PATCH v2 00/11] Fix build errors related to exporte= d headers >=20 > DPDK uses GNU C language extensions in most of its code base. This is f= ine > for internal source files whose compilation flags are controlled by DPD= K, > however user applications that use exported "public" headers may experi= ence > compilation failures when enabling strict error/standard checks (-std a= nd > -pedantic for instance). >=20 > Exported headers are installed system-wide and must be as clean as poss= ible > so applications do not have to resort to workarounds. >=20 > This patchset affects exported headers only, compilation problems are > addressed as follows: >=20 > - Adding the __extension__ keyword to nonstandard constructs (same meth= od > as existing libraries when there is no other choice). > - Adding the __extension__ keyword to C11 constructs to remain compatib= le > with pure C99. > - Adding missing includes so exported files can be included out of orde= r > and on their own. > - Fixing GNU printf-like variadic macros as there is no magic keyword f= or > these. >=20 > Changes in v2: >=20 > - Rebased on top of the current HEAD. > - Added script to check headers automatically (check-includes.sh), for = both > C and C++ compilation. > - Updated test-build.sh to use it. > - Fixed consistency of new #include directives, now inside extern "C" > blocks for files that already do that (Jan, fixing these was too much > work for this patchset so I settled on this solution in the meantime). > - Updated headlines to address check-git-log.sh complaints. >=20 > Adrien Mazarguil (11): > lib: work around braced-groups within expressions > lib: work around large enum values > lib: use C99 syntax for zero-size arrays > lib: work around nonstandard bit-fields > lib: work around structs with no members > lib: work around unnamed structs/unions > lib: add missing include dependencies > lib: work around forward reference to enum types > lib: remove named variadic macros in exported headers > lib: hide static functions never defined > scripts: check compilation of exported header files >=20 > MAINTAINERS | 1 + > lib/librte_acl/rte_acl.h | 2 +- > lib/librte_cfgfile/rte_cfgfile.h | 2 + > lib/librte_cmdline/cmdline.h | 1 + > lib/librte_cmdline/cmdline_parse_portlist.h | 1 + > lib/librte_cmdline/cmdline_socket.h | 3 + > lib/librte_cryptodev/rte_crypto.h | 2 + > lib/librte_cryptodev/rte_crypto_sym.h | 3 + > lib/librte_cryptodev/rte_cryptodev.h | 40 ++- > lib/librte_cryptodev/rte_cryptodev_pmd.h | 6 +- > .../common/include/arch/arm/rte_byteorder.h | 2 + > .../common/include/arch/arm/rte_memcpy_32.h | 3 +- > .../common/include/arch/arm/rte_prefetch_32.h | 1 + > .../common/include/arch/arm/rte_prefetch_64.h | 1 + > .../common/include/arch/arm/rte_vect.h | 1 + > .../common/include/arch/ppc_64/rte_atomic.h | 1 + > .../common/include/arch/ppc_64/rte_byteorder.h | 1 + > .../common/include/arch/ppc_64/rte_cycles.h | 2 + > .../common/include/arch/ppc_64/rte_memcpy.h | 3 +- > .../common/include/arch/ppc_64/rte_prefetch.h | 1 + > .../common/include/arch/x86/rte_atomic.h | 2 + > .../common/include/arch/x86/rte_atomic_32.h | 9 + > .../common/include/arch/x86/rte_atomic_64.h | 8 + > .../common/include/arch/x86/rte_byteorder.h | 2 + > .../common/include/arch/x86/rte_byteorder_32.h | 7 + > .../common/include/arch/x86/rte_byteorder_64.h | 7 + > .../common/include/arch/x86/rte_cycles.h | 2 + > .../common/include/arch/x86/rte_memcpy.h | 4 +- > .../common/include/arch/x86/rte_prefetch.h | 1 + > .../common/include/arch/x86/rte_rtm.h | 1 + > .../common/include/arch/x86/rte_vect.h | 8 +- > .../common/include/generic/rte_atomic.h | 1 + > .../common/include/generic/rte_byteorder.h | 2 + > .../common/include/generic/rte_cpuflags.h | 3 + > .../common/include/generic/rte_memcpy.h | 4 + > lib/librte_eal/common/include/rte_common.h | 22 +- > lib/librte_eal/common/include/rte_devargs.h | 1 + > lib/librte_eal/common/include/rte_eal.h | 1 + > lib/librte_eal/common/include/rte_interrupts.h | 2 + > lib/librte_eal/common/include/rte_memory.h | 4 + > lib/librte_eal/common/include/rte_memzone.h | 2 + > lib/librte_eal/common/include/rte_time.h | 8 + > lib/librte_eal/common/include/rte_version.h | 1 + > .../eal/include/exec-env/rte_interrupts.h | 1 + > .../eal/include/exec-env/rte_kni_common.h | 6 +- > lib/librte_ether/rte_dev_info.h | 2 + > lib/librte_ether/rte_eth_ctrl.h | 4 + > lib/librte_ether/rte_ethdev.h | 4 + > lib/librte_hash/rte_fbk_hash.h | 2 +- > lib/librte_hash/rte_thash.h | 3 + > lib/librte_ip_frag/rte_ip_frag.h | 2 +- > lib/librte_lpm/rte_lpm.h | 7 +- > lib/librte_lpm/rte_lpm_neon.h | 1 + > lib/librte_lpm/rte_lpm_sse.h | 1 + > lib/librte_mbuf/rte_mbuf.h | 9 + > lib/librte_mempool/rte_mempool.h | 3 + > lib/librte_pdump/rte_pdump.h | 4 + > lib/librte_pipeline/rte_pipeline.h | 4 +- > lib/librte_reorder/rte_reorder.h | 2 + > lib/librte_ring/rte_ring.h | 2 +- > lib/librte_sched/rte_bitmap.h | 3 +- > lib/librte_sched/rte_reciprocal.h | 2 + > lib/librte_sched/rte_sched_common.h | 1 + > lib/librte_timer/rte_timer.h | 2 + > scripts/check-includes.sh | 286 +++++++++++++++++++ > scripts/test-build.sh | 14 + > 66 files changed, 511 insertions(+), 33 deletions(-) > create mode 100755 scripts/check-includes.sh >=20 > --=20 > 2.1.4 >=20 --=20 Adrien Mazarguil 6WIND