-
Notifications
You must be signed in to change notification settings - Fork 127
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
Conversation
Codecov Report
@@ 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
|
.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 ; |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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.
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>
Merged. |
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