Message ID | 1456183877-9490-1-git-send-email-anders.roxell@linaro.org |
---|---|
State | New |
Headers | show |
On 23 February 2016 at 00:31, Anders Roxell <anders.roxell@linaro.org> wrote: > Fix build error while building an application against ODP > /media/data/src/install-odp-api-next/include/odp/api/cpu.h:20:26: fatal > error: odp/cpu_arch.h: No such file or directory > #include <odp/cpu_arch.h> > > compilation terminated. > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > --- > platform/linux-generic/Makefile.am | 2 +- > .../linux-generic/arch/linux/odp/api/cpu_arch.h | 22 ++++++++++++++++++ > platform/linux-generic/arch/linux/odp/cpu_arch.h | 22 ------------------ > .../linux-generic/arch/mips64/odp/api/cpu_arch.h | 26 +++++++++++++++++++++ > platform/linux-generic/arch/mips64/odp/cpu_arch.h | 26 --------------------- > .../linux-generic/arch/powerpc/odp/api/cpu_arch.h | 1 + > platform/linux-generic/arch/powerpc/odp/cpu_arch.h | 1 - > platform/linux-generic/arch/x86/odp/api/cpu_arch.h | 27 ++++++++++++++++++++++ > platform/linux-generic/arch/x86/odp/cpu_arch.h | 27 ---------------------- > platform/linux-generic/include/odp/api/cpu.h | 2 +- > 10 files changed, 78 insertions(+), 78 deletions(-) > create mode 100644 platform/linux-generic/arch/linux/odp/api/cpu_arch.h > delete mode 100644 platform/linux-generic/arch/linux/odp/cpu_arch.h > create mode 100644 platform/linux-generic/arch/mips64/odp/api/cpu_arch.h > delete mode 100644 platform/linux-generic/arch/mips64/odp/cpu_arch.h > create mode 120000 platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h > delete mode 120000 platform/linux-generic/arch/powerpc/odp/cpu_arch.h > create mode 100644 platform/linux-generic/arch/x86/odp/api/cpu_arch.h > delete mode 100644 platform/linux-generic/arch/x86/odp/cpu_arch.h Bah... forgot -M option... will send a v2 soon. Cheers, Anders > > diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am > index 00c8ac9..d0e1641 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -56,7 +56,7 @@ odpapiinclude_HEADERS = \ > $(srcdir)/include/odp/api/timer.h \ > $(srcdir)/include/odp/api/traffic_mngr.h \ > $(srcdir)/include/odp/api/version.h \ > - $(srcdir)/arch/@ARCH@/odp/cpu_arch.h > + $(srcdir)/arch/@ARCH@/odp/api/cpu_arch.h > > odpapiplatincludedir= $(includedir)/odp/api/plat > odpapiplatinclude_HEADERS = \ > diff --git a/platform/linux-generic/arch/linux/odp/api/cpu_arch.h b/platform/linux-generic/arch/linux/odp/api/cpu_arch.h > new file mode 100644 > index 0000000..1c79f87 > --- /dev/null > +++ b/platform/linux-generic/arch/linux/odp/api/cpu_arch.h > @@ -0,0 +1,22 @@ > +/* Copyright (c) 2016, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +#ifndef ODP_PLAT_CPU_ARCH_H_ > +#define ODP_PLAT_CPU_ARCH_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +static inline void odp_cpu_pause(void) > +{ > +} > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > diff --git a/platform/linux-generic/arch/linux/odp/cpu_arch.h b/platform/linux-generic/arch/linux/odp/cpu_arch.h > deleted file mode 100644 > index 1c79f87..0000000 > --- a/platform/linux-generic/arch/linux/odp/cpu_arch.h > +++ /dev/null > @@ -1,22 +0,0 @@ > -/* Copyright (c) 2016, Linaro Limited > - * All rights reserved. > - * > - * SPDX-License-Identifier: BSD-3-Clause > - */ > - > -#ifndef ODP_PLAT_CPU_ARCH_H_ > -#define ODP_PLAT_CPU_ARCH_H_ > - > -#ifdef __cplusplus > -extern "C" { > -#endif > - > -static inline void odp_cpu_pause(void) > -{ > -} > - > -#ifdef __cplusplus > -} > -#endif > - > -#endif > diff --git a/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h > new file mode 100644 > index 0000000..3bfa0dc > --- /dev/null > +++ b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h > @@ -0,0 +1,26 @@ > +/* Copyright (c) 2016, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +#ifndef ODP_PLAT_CPU_ARCH_H_ > +#define ODP_PLAT_CPU_ARCH_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +static inline void odp_cpu_pause(void) > +{ > + __asm__ __volatile__ ("nop"); > + __asm__ __volatile__ ("nop"); > + __asm__ __volatile__ ("nop"); > + __asm__ __volatile__ ("nop"); > +} > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > diff --git a/platform/linux-generic/arch/mips64/odp/cpu_arch.h b/platform/linux-generic/arch/mips64/odp/cpu_arch.h > deleted file mode 100644 > index 3bfa0dc..0000000 > --- a/platform/linux-generic/arch/mips64/odp/cpu_arch.h > +++ /dev/null > @@ -1,26 +0,0 @@ > -/* Copyright (c) 2016, Linaro Limited > - * All rights reserved. > - * > - * SPDX-License-Identifier: BSD-3-Clause > - */ > - > -#ifndef ODP_PLAT_CPU_ARCH_H_ > -#define ODP_PLAT_CPU_ARCH_H_ > - > -#ifdef __cplusplus > -extern "C" { > -#endif > - > -static inline void odp_cpu_pause(void) > -{ > - __asm__ __volatile__ ("nop"); > - __asm__ __volatile__ ("nop"); > - __asm__ __volatile__ ("nop"); > - __asm__ __volatile__ ("nop"); > -} > - > -#ifdef __cplusplus > -} > -#endif > - > -#endif > diff --git a/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h > new file mode 120000 > index 0000000..0617d7f > --- /dev/null > +++ b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h > @@ -0,0 +1 @@ > +../../linux/odp/cpu_arch.h > \ No newline at end of file > diff --git a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h > deleted file mode 120000 > index 0617d7f..0000000 > --- a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h > +++ /dev/null > @@ -1 +0,0 @@ > -../../linux/odp/cpu_arch.h > \ No newline at end of file > diff --git a/platform/linux-generic/arch/x86/odp/api/cpu_arch.h b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h > new file mode 100644 > index 0000000..997a954 > --- /dev/null > +++ b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h > @@ -0,0 +1,27 @@ > +/* Copyright (c) 2016, Linaro Limited > + * All rights reserved. > + * > + * SPDX-License-Identifier: BSD-3-Clause > + */ > + > +#ifndef ODP_PLAT_CPU_ARCH_H_ > +#define ODP_PLAT_CPU_ARCH_H_ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +static inline void odp_cpu_pause(void) > +{ > +#ifdef __SSE2__ > + __asm__ __volatile__ ("pause"); > +#else > + __asm__ __volatile__ ("rep; nop"); > +#endif > +} > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > diff --git a/platform/linux-generic/arch/x86/odp/cpu_arch.h b/platform/linux-generic/arch/x86/odp/cpu_arch.h > deleted file mode 100644 > index 997a954..0000000 > --- a/platform/linux-generic/arch/x86/odp/cpu_arch.h > +++ /dev/null > @@ -1,27 +0,0 @@ > -/* Copyright (c) 2016, Linaro Limited > - * All rights reserved. > - * > - * SPDX-License-Identifier: BSD-3-Clause > - */ > - > -#ifndef ODP_PLAT_CPU_ARCH_H_ > -#define ODP_PLAT_CPU_ARCH_H_ > - > -#ifdef __cplusplus > -extern "C" { > -#endif > - > -static inline void odp_cpu_pause(void) > -{ > -#ifdef __SSE2__ > - __asm__ __volatile__ ("pause"); > -#else > - __asm__ __volatile__ ("rep; nop"); > -#endif > -} > - > -#ifdef __cplusplus > -} > -#endif > - > -#endif > diff --git a/platform/linux-generic/include/odp/api/cpu.h b/platform/linux-generic/include/odp/api/cpu.h > index e0bdc9e..d49c782 100644 > --- a/platform/linux-generic/include/odp/api/cpu.h > +++ b/platform/linux-generic/include/odp/api/cpu.h > @@ -17,7 +17,7 @@ > extern "C" { > #endif > > -#include <odp/cpu_arch.h> > +#include <odp/api/cpu_arch.h> > > #include <odp/api/spec/cpu.h> > > -- > 2.1.4 >
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 00c8ac9..d0e1641 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -56,7 +56,7 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/timer.h \ $(srcdir)/include/odp/api/traffic_mngr.h \ $(srcdir)/include/odp/api/version.h \ - $(srcdir)/arch/@ARCH@/odp/cpu_arch.h + $(srcdir)/arch/@ARCH@/odp/api/cpu_arch.h odpapiplatincludedir= $(includedir)/odp/api/plat odpapiplatinclude_HEADERS = \ diff --git a/platform/linux-generic/arch/linux/odp/api/cpu_arch.h b/platform/linux-generic/arch/linux/odp/api/cpu_arch.h new file mode 100644 index 0000000..1c79f87 --- /dev/null +++ b/platform/linux-generic/arch/linux/odp/api/cpu_arch.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_PLAT_CPU_ARCH_H_ +#define ODP_PLAT_CPU_ARCH_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +static inline void odp_cpu_pause(void) +{ +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/arch/linux/odp/cpu_arch.h b/platform/linux-generic/arch/linux/odp/cpu_arch.h deleted file mode 100644 index 1c79f87..0000000 --- a/platform/linux-generic/arch/linux/odp/cpu_arch.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2016, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef ODP_PLAT_CPU_ARCH_H_ -#define ODP_PLAT_CPU_ARCH_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -static inline void odp_cpu_pause(void) -{ -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h new file mode 100644 index 0000000..3bfa0dc --- /dev/null +++ b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h @@ -0,0 +1,26 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_PLAT_CPU_ARCH_H_ +#define ODP_PLAT_CPU_ARCH_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +static inline void odp_cpu_pause(void) +{ + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); + __asm__ __volatile__ ("nop"); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/arch/mips64/odp/cpu_arch.h b/platform/linux-generic/arch/mips64/odp/cpu_arch.h deleted file mode 100644 index 3bfa0dc..0000000 --- a/platform/linux-generic/arch/mips64/odp/cpu_arch.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) 2016, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef ODP_PLAT_CPU_ARCH_H_ -#define ODP_PLAT_CPU_ARCH_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -static inline void odp_cpu_pause(void) -{ - __asm__ __volatile__ ("nop"); - __asm__ __volatile__ ("nop"); - __asm__ __volatile__ ("nop"); - __asm__ __volatile__ ("nop"); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h new file mode 120000 index 0000000..0617d7f --- /dev/null +++ b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h @@ -0,0 +1 @@ +../../linux/odp/cpu_arch.h \ No newline at end of file diff --git a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h b/platform/linux-generic/arch/powerpc/odp/cpu_arch.h deleted file mode 120000 index 0617d7f..0000000 --- a/platform/linux-generic/arch/powerpc/odp/cpu_arch.h +++ /dev/null @@ -1 +0,0 @@ -../../linux/odp/cpu_arch.h \ No newline at end of file diff --git a/platform/linux-generic/arch/x86/odp/api/cpu_arch.h b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h new file mode 100644 index 0000000..997a954 --- /dev/null +++ b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_PLAT_CPU_ARCH_H_ +#define ODP_PLAT_CPU_ARCH_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +static inline void odp_cpu_pause(void) +{ +#ifdef __SSE2__ + __asm__ __volatile__ ("pause"); +#else + __asm__ __volatile__ ("rep; nop"); +#endif +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/arch/x86/odp/cpu_arch.h b/platform/linux-generic/arch/x86/odp/cpu_arch.h deleted file mode 100644 index 997a954..0000000 --- a/platform/linux-generic/arch/x86/odp/cpu_arch.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c) 2016, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef ODP_PLAT_CPU_ARCH_H_ -#define ODP_PLAT_CPU_ARCH_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -static inline void odp_cpu_pause(void) -{ -#ifdef __SSE2__ - __asm__ __volatile__ ("pause"); -#else - __asm__ __volatile__ ("rep; nop"); -#endif -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/api/cpu.h b/platform/linux-generic/include/odp/api/cpu.h index e0bdc9e..d49c782 100644 --- a/platform/linux-generic/include/odp/api/cpu.h +++ b/platform/linux-generic/include/odp/api/cpu.h @@ -17,7 +17,7 @@ extern "C" { #endif -#include <odp/cpu_arch.h> +#include <odp/api/cpu_arch.h> #include <odp/api/spec/cpu.h>
Fix build error while building an application against ODP /media/data/src/install-odp-api-next/include/odp/api/cpu.h:20:26: fatal error: odp/cpu_arch.h: No such file or directory #include <odp/cpu_arch.h> compilation terminated. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- platform/linux-generic/Makefile.am | 2 +- .../linux-generic/arch/linux/odp/api/cpu_arch.h | 22 ++++++++++++++++++ platform/linux-generic/arch/linux/odp/cpu_arch.h | 22 ------------------ .../linux-generic/arch/mips64/odp/api/cpu_arch.h | 26 +++++++++++++++++++++ platform/linux-generic/arch/mips64/odp/cpu_arch.h | 26 --------------------- .../linux-generic/arch/powerpc/odp/api/cpu_arch.h | 1 + platform/linux-generic/arch/powerpc/odp/cpu_arch.h | 1 - platform/linux-generic/arch/x86/odp/api/cpu_arch.h | 27 ++++++++++++++++++++++ platform/linux-generic/arch/x86/odp/cpu_arch.h | 27 ---------------------- platform/linux-generic/include/odp/api/cpu.h | 2 +- 10 files changed, 78 insertions(+), 78 deletions(-) create mode 100644 platform/linux-generic/arch/linux/odp/api/cpu_arch.h delete mode 100644 platform/linux-generic/arch/linux/odp/cpu_arch.h create mode 100644 platform/linux-generic/arch/mips64/odp/api/cpu_arch.h delete mode 100644 platform/linux-generic/arch/mips64/odp/cpu_arch.h create mode 120000 platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h delete mode 120000 platform/linux-generic/arch/powerpc/odp/cpu_arch.h create mode 100644 platform/linux-generic/arch/x86/odp/api/cpu_arch.h delete mode 100644 platform/linux-generic/arch/x86/odp/cpu_arch.h