Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH v5] travis: build DPDK with clang if it was selected #439

Closed
wants to merge 1 commit into from

Conversation

lumag
Copy link

@lumag lumag commented Jan 31, 2018

gcc-built DPDK is not fully compatible with clang (see
https://travis-ci.org/lumag/odp/jobs/335324053 for example). Use clang
to compile DPDK if selected compiler is clang.

Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org

@muvarov muvarov changed the title travis: build DPDK with clang if it was selected [PATCH v1] travis: build DPDK with clang if it was selected Jan 31, 2018
@muvarov muvarov changed the title [PATCH v1] travis: build DPDK with clang if it was selected [PATCH v2] travis: build DPDK with clang if it was selected Jan 31, 2018
@muvarov muvarov changed the title [PATCH v2] travis: build DPDK with clang if it was selected [PATCH v3] travis: build DPDK with clang if it was selected Jan 31, 2018
@codecov
Copy link

codecov bot commented Jan 31, 2018

Codecov Report

Merging #439 into master will decrease coverage by 0.016%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##            master      #439       +/-   ##
=============================================
- Coverage   77.774%   77.758%   -0.017%     
=============================================
  Files          199       199               
  Lines        35766     35766               
=============================================
- Hits         27817     27811        -6     
- Misses        7949      7955        +6
Impacted Files Coverage Δ
example/generator/odp_generator.c 42.151% <0%> (-0.887%) ⬇️
test/validation/api/time/time.c 95.278% <0%> (-0.859%) ⬇️
platform/linux-generic/odp_traffic_mngr.c 79.108% <0%> (+0.127%) ⬆️

.travis.yml Outdated
@@ -158,33 +158,40 @@ install:
if [ "${CACHED_DPDK_VERS}" != "${DPDK_VERS}" ]; then
rm -rf dpdk
fi
- if [ "${CC#clang}" != "${CC}" ] ;
then
DPDKCC=clang ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this and not just $CC ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used to:

  • set DPDK target directory (...-clang vs ...-gcc)
  • set DPDK configuration items based on the toolchain selected

@@ -193,6 +200,7 @@ install:
sed -i -e 's/40900/40800/g' lib/librte_eal/common/include/arch/arm/rte_vect.h
sed -i -e 's/!(/!(defined(__arm__) \&\& defined(__clang__) || /g' lib/librte_eal/common/include/arch/arm/rte_byteorder.h
sed -i -e 's/__GNUC__/defined(__arm__) \&\& defined(__clang__) || __GNUC__/' lib/librte_eal/common/include/generic/rte_byteorder.h
sed -i -e 's,\$(CC),\0 $(EXTRA_CFLAGS),g' lib/librte_acl/Makefile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this go to dpdk instead of odp?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know nothing about contributing to DPDK. Also what is the chance of fixing old DPDK releases (which we use)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we push this to dpdk then we will not need to fix it with new releases.

@muvarov muvarov changed the title [PATCH v3] travis: build DPDK with clang if it was selected [PATCH v4] travis: build DPDK with clang if it was selected Jan 31, 2018
gcc-built DPDK is not fully compatible with clang (see
https://travis-ci.org/lumag/odp/jobs/335324053 for example). Use clang
to compile DPDK if selected compiler is clang.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
@muvarov muvarov changed the title [PATCH v4] travis: build DPDK with clang if it was selected [PATCH v5] travis: build DPDK with clang if it was selected Jan 31, 2018
@muvarov
Copy link
Contributor

muvarov commented Feb 2, 2018

Merged.

@muvarov muvarov closed this Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants