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

Fixed gcc strict prototype and other build errors #611

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

mnjdhl
Copy link
Contributor

@mnjdhl mnjdhl commented Sep 22, 2023

While building CNDP project (https://github.com/CloudNativeDataPlane/cndp) along with sse2neon.h on aarch64 architecture on Ubuntu 18.04.6 LTS the following build errors were encountered:

../lib/core/arm/sse2neon.h:547:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _MM_GET_ROUNDING_MODE();
^~~~~~~~~~~~
../lib/core/arm/sse2neon.h:563:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE __m128i _mm_setzero_si128();
^~~~~~~~~~~~
../lib/core/arm/sse2neon.h:1761:23: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE uint64_t _sse2neon_get_fpcr()
^~~~~~~~~~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_get_fpcr':
../lib/core/arm/sse2neon.h:1761:23: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:1785:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _sse2neon_mm_get_flush_zero_mode()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_mm_get_flush_zero_mode':
../lib/core/arm/sse2neon.h:1785:27: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:1809:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _MM_GET_ROUNDING_MODE()
^~~~~~~~~~~~~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_MM_GET_ROUNDING_MODE':
../lib/core/arm/sse2neon.h:1809:27: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:2484:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _mm_getcsr()
^~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_mm_getcsr':
../lib/core/arm/sse2neon.h:2484:27: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:4803:19: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE void _mm_pause()
^~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_mm_pause':
../lib/core/arm/sse2neon.h:4803:19: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:7639:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
const static uint16_t ALIGN_STRUCT(16) _sse2neon_cmpestr_mask16b[8] = {
^~~~~
../lib/core/arm/sse2neon.h:7642:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
const static uint8_t ALIGN_STRUCT(16) _sse2neon_cmpestr_mask8b[16] = {
^~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_clz':
../lib/core/arm/sse2neon.h:8107:5: error: "_MSC_VER" is not defined, evaluates to 0 [-Werror=undef]
#if _MSC_VER
^~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_ctz':
../lib/core/arm/sse2neon.h:8119:5: error: "_MSC_VER" is not defined, evaluates to 0 [-Werror=undef]
#if _MSC_VER
^~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_ctzll':
../lib/core/arm/sse2neon.h:8131:5: error: "_MSC_VER" is not defined, evaluates to 0 [-Werror=undef]
#if _MSC_VER
^~~~~~~~
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:9067:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _sse2neon_mm_get_denormals_zero_mode()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_mm_get_denormals_zero_mode':
../lib/core/arm/sse2neon.h:9067:27: error: old-style function definition [-Werror=old-style-definition]
image

The patch is to fix these build errors.

Acked-by: Andrija Kranjec andrija.kranjec@sartura.hr
Signed-off-by: Manoj Dahal manoj.dahal@sartura.hr

Acked-by: Andrija Kranjec andrija.kranjec@sartura.hr
Signed-off-by: Manoj Dahal <manoj.dahal@sartura.hr>
@jserv jserv merged commit bbe1b6f into DLTcollab:master Sep 22, 2023
14 checks passed
@jserv
Copy link
Member

jserv commented Sep 22, 2023

Thank @mnjdhl for contributing!

@mnjdhl
Copy link
Contributor Author

mnjdhl commented Sep 22, 2023

Thanks for reviewing @jserv

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.

2 participants