Message ID | 1462795198-13050-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | Accepted |
Commit | ac9f523f4d4d1f1c2108dbde3be77dbb7595447c |
Headers | show |
On Mon, May 9, 2016 at 6:59 AM, Mike Holmes <mike.holmes@linaro.org> wrote: > arch is defined as an architecture flag so that optimisations or > necessary differences can be accommodated. When we are unable to > determine the architecture it is incorrect to assign it the value of an > operating system. Instead lets label it correctly as a default and add > an error to the user when an unknown arch is encountered. > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > configure.ac | 25 > ++++++++++++++++------ > platform/linux-generic/Makefile.am | 17 +++++++++------ > platform/linux-generic/Makefile.inc | 4 ++-- > platform/linux-generic/arch/arm/odp/api/cpu_arch.h | 1 + > platform/linux-generic/arch/arm/odp_cpu_arch.c | 1 + > .../linux-generic/arch/arm/odp_sysinfo_parse.c | 1 + > .../arch/{linux => default}/odp/api/cpu_arch.h | 0 > .../arch/{linux => default}/odp_cpu_arch.c | 0 > .../arch/{linux => default}/odp_sysinfo_parse.c | 0 > platform/linux-generic/arch/powerpc/odp_cpu_arch.c | 2 +- > 10 files changed, 34 insertions(+), 17 deletions(-) > create mode 120000 platform/linux-generic/arch/arm/odp/api/cpu_arch.h > create mode 120000 platform/linux-generic/arch/arm/odp_cpu_arch.c > create mode 120000 platform/linux-generic/arch/arm/odp_sysinfo_parse.c > rename platform/linux-generic/arch/{linux => default}/odp/api/cpu_arch.h > (100%) > rename platform/linux-generic/arch/{linux => default}/odp_cpu_arch.c > (100%) > rename platform/linux-generic/arch/{linux => default}/odp_sysinfo_parse.c > (100%) > > diff --git a/configure.ac b/configure.ac > index 5e7e380..3ea33ea 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -59,13 +59,24 @@ AX_VALGRIND_CHECK > # Which architecture optimizations will we use > ########################################################################## > AS_CASE([$host], > - [x86*], [ARCH=x86], > - [i686*], [ARCH=x86], > - [mips64*], [ARCH=mips64], > - [powerpc*], [ARCH=powerpc], > - [ARCH=linux] > + [x86*], [ARCH_DIR=x86], > + [i686*], [ARCH_DIR=x86], > + [mips64*], [ARCH_DIR=mips64], > + [powerpc*], [ARCH_DIR=powerpc], > + [aarch64*], [ARCH_DIR=arm], > + [arm*], [ARCH_DIR=arm], > + [ARCH_DIR=undefined] > ) > -AC_SUBST([ARCH]) > +AC_SUBST([ARCH_DIR]) > + > +########################################################################## > +# Warn on the defaults if arch is undefined > +########################################################################## > +if test "${ARCH_DIR}" == "undefined"; > +then > + echo "ARCH_DIR is undefined, please add your ARCH_DIR based on > host=${host}" > + exit 1 > +fi > > ########################################################################## > # Set correct pkgconfig version > @@ -226,7 +237,7 @@ AC_MSG_RESULT([ > > Library version: ${ODP_LIBSO_VERSION} > > - arch ${ARCH} > + ARCH_DIR ${ARCH_DIR} > with_platform: ${with_platform} > prefix: ${prefix} > sysconfdir: ${sysconfdir} > diff --git a/platform/linux-generic/Makefile.am > b/platform/linux-generic/Makefile.am > index b3e0d28..5081e51 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -58,7 +58,7 @@ odpapiinclude_HEADERS = \ > $(srcdir)/include/odp/api/version.h \ > $(srcdir)/include/odp/api/visibility_begin.h \ > $(srcdir)/include/odp/api/visibility_end.h \ > - $(srcdir)/arch/@ARCH@/odp/api/cpu_arch.h > + $(srcdir)/arch/@ARCH_DIR@/odp/api/cpu_arch.h > > odpapiplatincludedir= $(includedir)/odp/api/plat > odpapiplatinclude_HEADERS = \ > @@ -175,13 +175,13 @@ __LIB__libodp_linux_la_SOURCES = \ > odp_traffic_mngr.c \ > odp_version.c \ > odp_weak.c \ > - arch/@ARCH@/odp_cpu_arch.c \ > - arch/@ARCH@/odp_sysinfo_parse.c > + arch/@ARCH_DIR@/odp_cpu_arch.c \ > + arch/@ARCH_DIR@/odp_sysinfo_parse.c > > EXTRA_DIST = \ > - arch/linux/odp/api/cpu_arch.h \ > - arch/linux/odp_cpu_arch.c \ > - arch/linux/odp_sysinfo_parse.c \ > + arch/default/odp/api/cpu_arch.h \ > + arch/default/odp_cpu_arch.c \ > + arch/default/odp_sysinfo_parse.c \ > arch/mips64/odp/api/cpu_arch.h \ > arch/mips64/odp_cpu_arch.c \ > arch/mips64/odp_sysinfo_parse.c \ > @@ -190,7 +190,10 @@ EXTRA_DIST = \ > arch/powerpc/odp_sysinfo_parse.c \ > arch/x86/odp/api/cpu_arch.h \ > arch/x86/odp_cpu_arch.c \ > - arch/x86/odp_sysinfo_parse.c > + arch/x86/odp_sysinfo_parse.c \ > + arch/arm/odp/api/cpu_arch.h \ > + arch/arm/odp_cpu_arch.c \ > + arch/arm/odp_sysinfo_parse.c > > if HAVE_PCAP > __LIB__libodp_linux_la_SOURCES += pktio/pcap.c > diff --git a/platform/linux-generic/Makefile.inc > b/platform/linux-generic/Makefile.inc > index 048c8bb..876519b 100644 > --- a/platform/linux-generic/Makefile.inc > +++ b/platform/linux-generic/Makefile.inc > @@ -1,2 +1,2 @@ > -AM_CFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH) > -AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH) > +AM_CFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR) > +AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR) > diff --git a/platform/linux-generic/arch/arm/odp/api/cpu_arch.h > b/platform/linux-generic/arch/arm/odp/api/cpu_arch.h > new file mode 120000 > index 0000000..e86e132 > --- /dev/null > +++ b/platform/linux-generic/arch/arm/odp/api/cpu_arch.h > @@ -0,0 +1 @@ > +../../../default/odp/api/cpu_arch.h > \ No newline at end of file > diff --git a/platform/linux-generic/arch/arm/odp_cpu_arch.c > b/platform/linux-generic/arch/arm/odp_cpu_arch.c > new file mode 120000 > index 0000000..deebc47 > --- /dev/null > +++ b/platform/linux-generic/arch/arm/odp_cpu_arch.c > @@ -0,0 +1 @@ > +../default/odp_cpu_arch.c > \ No newline at end of file > diff --git a/platform/linux-generic/arch/arm/odp_sysinfo_parse.c > b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c > new file mode 120000 > index 0000000..39962b8 > --- /dev/null > +++ b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c > @@ -0,0 +1 @@ > +../default/odp_sysinfo_parse.c > \ No newline at end of file > diff --git a/platform/linux-generic/arch/linux/odp/api/cpu_arch.h > b/platform/linux-generic/arch/default/odp/api/cpu_arch.h > similarity index 100% > rename from platform/linux-generic/arch/linux/odp/api/cpu_arch.h > rename to platform/linux-generic/arch/default/odp/api/cpu_arch.h > diff --git a/platform/linux-generic/arch/linux/odp_cpu_arch.c > b/platform/linux-generic/arch/default/odp_cpu_arch.c > similarity index 100% > rename from platform/linux-generic/arch/linux/odp_cpu_arch.c > rename to platform/linux-generic/arch/default/odp_cpu_arch.c > diff --git a/platform/linux-generic/arch/linux/odp_sysinfo_parse.c > b/platform/linux-generic/arch/default/odp_sysinfo_parse.c > similarity index 100% > rename from platform/linux-generic/arch/linux/odp_sysinfo_parse.c > rename to platform/linux-generic/arch/default/odp_sysinfo_parse.c > diff --git a/platform/linux-generic/arch/powerpc/odp_cpu_arch.c > b/platform/linux-generic/arch/powerpc/odp_cpu_arch.c > index c5fe400..deebc47 120000 > --- a/platform/linux-generic/arch/powerpc/odp_cpu_arch.c > +++ b/platform/linux-generic/arch/powerpc/odp_cpu_arch.c > @@ -1 +1 @@ > -../linux/odp_cpu_arch.c > \ No newline at end of file > +../default/odp_cpu_arch.c > \ No newline at end of file > -- > 2.7.4 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
merged with fix for make distcheck On 9 May 2016 at 10:50, Bill Fischofer <bill.fischofer@linaro.org> wrote: > > > On Mon, May 9, 2016 at 6:59 AM, Mike Holmes <mike.holmes@linaro.org> > wrote: > >> arch is defined as an architecture flag so that optimisations or >> necessary differences can be accommodated. When we are unable to >> determine the architecture it is incorrect to assign it the value of an >> operating system. Instead lets label it correctly as a default and add >> an error to the user when an unknown arch is encountered. >> >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >> > > Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> > > >> --- >> configure.ac | 25 >> ++++++++++++++++------ >> platform/linux-generic/Makefile.am | 17 +++++++++------ >> platform/linux-generic/Makefile.inc | 4 ++-- >> platform/linux-generic/arch/arm/odp/api/cpu_arch.h | 1 + >> platform/linux-generic/arch/arm/odp_cpu_arch.c | 1 + >> .../linux-generic/arch/arm/odp_sysinfo_parse.c | 1 + >> .../arch/{linux => default}/odp/api/cpu_arch.h | 0 >> .../arch/{linux => default}/odp_cpu_arch.c | 0 >> .../arch/{linux => default}/odp_sysinfo_parse.c | 0 >> platform/linux-generic/arch/powerpc/odp_cpu_arch.c | 2 +- >> 10 files changed, 34 insertions(+), 17 deletions(-) >> create mode 120000 platform/linux-generic/arch/arm/odp/api/cpu_arch.h >> create mode 120000 platform/linux-generic/arch/arm/odp_cpu_arch.c >> create mode 120000 platform/linux-generic/arch/arm/odp_sysinfo_parse.c >> rename platform/linux-generic/arch/{linux => default}/odp/api/cpu_arch.h >> (100%) >> rename platform/linux-generic/arch/{linux => default}/odp_cpu_arch.c >> (100%) >> rename platform/linux-generic/arch/{linux => >> default}/odp_sysinfo_parse.c (100%) >> >> diff --git a/configure.ac b/configure.ac >> index 5e7e380..3ea33ea 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -59,13 +59,24 @@ AX_VALGRIND_CHECK >> # Which architecture optimizations will we use >> >> ########################################################################## >> AS_CASE([$host], >> - [x86*], [ARCH=x86], >> - [i686*], [ARCH=x86], >> - [mips64*], [ARCH=mips64], >> - [powerpc*], [ARCH=powerpc], >> - [ARCH=linux] >> + [x86*], [ARCH_DIR=x86], >> + [i686*], [ARCH_DIR=x86], >> + [mips64*], [ARCH_DIR=mips64], >> + [powerpc*], [ARCH_DIR=powerpc], >> + [aarch64*], [ARCH_DIR=arm], >> + [arm*], [ARCH_DIR=arm], >> + [ARCH_DIR=undefined] >> ) >> -AC_SUBST([ARCH]) >> +AC_SUBST([ARCH_DIR]) >> + >> >> +########################################################################## >> +# Warn on the defaults if arch is undefined >> >> +########################################################################## >> +if test "${ARCH_DIR}" == "undefined"; >> +then >> + echo "ARCH_DIR is undefined, please add your ARCH_DIR based on >> host=${host}" >> + exit 1 >> +fi >> >> >> ########################################################################## >> # Set correct pkgconfig version >> @@ -226,7 +237,7 @@ AC_MSG_RESULT([ >> >> Library version: ${ODP_LIBSO_VERSION} >> >> - arch ${ARCH} >> + ARCH_DIR ${ARCH_DIR} >> with_platform: ${with_platform} >> prefix: ${prefix} >> sysconfdir: ${sysconfdir} >> diff --git a/platform/linux-generic/Makefile.am >> b/platform/linux-generic/Makefile.am >> index b3e0d28..5081e51 100644 >> --- a/platform/linux-generic/Makefile.am >> +++ b/platform/linux-generic/Makefile.am >> @@ -58,7 +58,7 @@ odpapiinclude_HEADERS = \ >> $(srcdir)/include/odp/api/version.h \ >> $(srcdir)/include/odp/api/visibility_begin.h \ >> $(srcdir)/include/odp/api/visibility_end.h \ >> - $(srcdir)/arch/@ARCH@/odp/api/cpu_arch.h >> + $(srcdir)/arch/@ARCH_DIR@/odp/api/cpu_arch.h >> >> odpapiplatincludedir= $(includedir)/odp/api/plat >> odpapiplatinclude_HEADERS = \ >> @@ -175,13 +175,13 @@ __LIB__libodp_linux_la_SOURCES = \ >> odp_traffic_mngr.c \ >> odp_version.c \ >> odp_weak.c \ >> - arch/@ARCH@/odp_cpu_arch.c \ >> - arch/@ARCH@/odp_sysinfo_parse.c >> + arch/@ARCH_DIR@/odp_cpu_arch.c \ >> + arch/@ARCH_DIR@/odp_sysinfo_parse.c >> >> EXTRA_DIST = \ >> - arch/linux/odp/api/cpu_arch.h \ >> - arch/linux/odp_cpu_arch.c \ >> - arch/linux/odp_sysinfo_parse.c \ >> + arch/default/odp/api/cpu_arch.h \ >> + arch/default/odp_cpu_arch.c \ >> + arch/default/odp_sysinfo_parse.c \ >> arch/mips64/odp/api/cpu_arch.h \ >> arch/mips64/odp_cpu_arch.c \ >> arch/mips64/odp_sysinfo_parse.c \ >> @@ -190,7 +190,10 @@ EXTRA_DIST = \ >> arch/powerpc/odp_sysinfo_parse.c \ >> arch/x86/odp/api/cpu_arch.h \ >> arch/x86/odp_cpu_arch.c \ >> - arch/x86/odp_sysinfo_parse.c >> + arch/x86/odp_sysinfo_parse.c \ >> + arch/arm/odp/api/cpu_arch.h \ >> + arch/arm/odp_cpu_arch.c \ >> + arch/arm/odp_sysinfo_parse.c >> >> if HAVE_PCAP >> __LIB__libodp_linux_la_SOURCES += pktio/pcap.c >> diff --git a/platform/linux-generic/Makefile.inc >> b/platform/linux-generic/Makefile.inc >> index 048c8bb..876519b 100644 >> --- a/platform/linux-generic/Makefile.inc >> +++ b/platform/linux-generic/Makefile.inc >> @@ -1,2 +1,2 @@ >> -AM_CFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH) >> -AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH) >> +AM_CFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR) >> +AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR) >> diff --git a/platform/linux-generic/arch/arm/odp/api/cpu_arch.h >> b/platform/linux-generic/arch/arm/odp/api/cpu_arch.h >> new file mode 120000 >> index 0000000..e86e132 >> --- /dev/null >> +++ b/platform/linux-generic/arch/arm/odp/api/cpu_arch.h >> @@ -0,0 +1 @@ >> +../../../default/odp/api/cpu_arch.h >> \ No newline at end of file >> diff --git a/platform/linux-generic/arch/arm/odp_cpu_arch.c >> b/platform/linux-generic/arch/arm/odp_cpu_arch.c >> new file mode 120000 >> index 0000000..deebc47 >> --- /dev/null >> +++ b/platform/linux-generic/arch/arm/odp_cpu_arch.c >> @@ -0,0 +1 @@ >> +../default/odp_cpu_arch.c >> \ No newline at end of file >> diff --git a/platform/linux-generic/arch/arm/odp_sysinfo_parse.c >> b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c >> new file mode 120000 >> index 0000000..39962b8 >> --- /dev/null >> +++ b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c >> @@ -0,0 +1 @@ >> +../default/odp_sysinfo_parse.c >> \ No newline at end of file >> diff --git a/platform/linux-generic/arch/linux/odp/api/cpu_arch.h >> b/platform/linux-generic/arch/default/odp/api/cpu_arch.h >> similarity index 100% >> rename from platform/linux-generic/arch/linux/odp/api/cpu_arch.h >> rename to platform/linux-generic/arch/default/odp/api/cpu_arch.h >> diff --git a/platform/linux-generic/arch/linux/odp_cpu_arch.c >> b/platform/linux-generic/arch/default/odp_cpu_arch.c >> similarity index 100% >> rename from platform/linux-generic/arch/linux/odp_cpu_arch.c >> rename to platform/linux-generic/arch/default/odp_cpu_arch.c >> diff --git a/platform/linux-generic/arch/linux/odp_sysinfo_parse.c >> b/platform/linux-generic/arch/default/odp_sysinfo_parse.c >> similarity index 100% >> rename from platform/linux-generic/arch/linux/odp_sysinfo_parse.c >> rename to platform/linux-generic/arch/default/odp_sysinfo_parse.c >> diff --git a/platform/linux-generic/arch/powerpc/odp_cpu_arch.c >> b/platform/linux-generic/arch/powerpc/odp_cpu_arch.c >> index c5fe400..deebc47 120000 >> --- a/platform/linux-generic/arch/powerpc/odp_cpu_arch.c >> +++ b/platform/linux-generic/arch/powerpc/odp_cpu_arch.c >> @@ -1 +1 @@ >> -../linux/odp_cpu_arch.c >> \ No newline at end of file >> +../default/odp_cpu_arch.c >> \ No newline at end of file >> -- >> 2.7.4 >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs "Work should be fun and collaborative, the rest follows"
diff --git a/configure.ac b/configure.ac index 5e7e380..3ea33ea 100644 --- a/configure.ac +++ b/configure.ac @@ -59,13 +59,24 @@ AX_VALGRIND_CHECK # Which architecture optimizations will we use ########################################################################## AS_CASE([$host], - [x86*], [ARCH=x86], - [i686*], [ARCH=x86], - [mips64*], [ARCH=mips64], - [powerpc*], [ARCH=powerpc], - [ARCH=linux] + [x86*], [ARCH_DIR=x86], + [i686*], [ARCH_DIR=x86], + [mips64*], [ARCH_DIR=mips64], + [powerpc*], [ARCH_DIR=powerpc], + [aarch64*], [ARCH_DIR=arm], + [arm*], [ARCH_DIR=arm], + [ARCH_DIR=undefined] ) -AC_SUBST([ARCH]) +AC_SUBST([ARCH_DIR]) + +########################################################################## +# Warn on the defaults if arch is undefined +########################################################################## +if test "${ARCH_DIR}" == "undefined"; +then + echo "ARCH_DIR is undefined, please add your ARCH_DIR based on host=${host}" + exit 1 +fi ########################################################################## # Set correct pkgconfig version @@ -226,7 +237,7 @@ AC_MSG_RESULT([ Library version: ${ODP_LIBSO_VERSION} - arch ${ARCH} + ARCH_DIR ${ARCH_DIR} with_platform: ${with_platform} prefix: ${prefix} sysconfdir: ${sysconfdir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index b3e0d28..5081e51 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -58,7 +58,7 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/version.h \ $(srcdir)/include/odp/api/visibility_begin.h \ $(srcdir)/include/odp/api/visibility_end.h \ - $(srcdir)/arch/@ARCH@/odp/api/cpu_arch.h + $(srcdir)/arch/@ARCH_DIR@/odp/api/cpu_arch.h odpapiplatincludedir= $(includedir)/odp/api/plat odpapiplatinclude_HEADERS = \ @@ -175,13 +175,13 @@ __LIB__libodp_linux_la_SOURCES = \ odp_traffic_mngr.c \ odp_version.c \ odp_weak.c \ - arch/@ARCH@/odp_cpu_arch.c \ - arch/@ARCH@/odp_sysinfo_parse.c + arch/@ARCH_DIR@/odp_cpu_arch.c \ + arch/@ARCH_DIR@/odp_sysinfo_parse.c EXTRA_DIST = \ - arch/linux/odp/api/cpu_arch.h \ - arch/linux/odp_cpu_arch.c \ - arch/linux/odp_sysinfo_parse.c \ + arch/default/odp/api/cpu_arch.h \ + arch/default/odp_cpu_arch.c \ + arch/default/odp_sysinfo_parse.c \ arch/mips64/odp/api/cpu_arch.h \ arch/mips64/odp_cpu_arch.c \ arch/mips64/odp_sysinfo_parse.c \ @@ -190,7 +190,10 @@ EXTRA_DIST = \ arch/powerpc/odp_sysinfo_parse.c \ arch/x86/odp/api/cpu_arch.h \ arch/x86/odp_cpu_arch.c \ - arch/x86/odp_sysinfo_parse.c + arch/x86/odp_sysinfo_parse.c \ + arch/arm/odp/api/cpu_arch.h \ + arch/arm/odp_cpu_arch.c \ + arch/arm/odp_sysinfo_parse.c if HAVE_PCAP __LIB__libodp_linux_la_SOURCES += pktio/pcap.c diff --git a/platform/linux-generic/Makefile.inc b/platform/linux-generic/Makefile.inc index 048c8bb..876519b 100644 --- a/platform/linux-generic/Makefile.inc +++ b/platform/linux-generic/Makefile.inc @@ -1,2 +1,2 @@ -AM_CFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH) -AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH) +AM_CFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR) +AM_CXXFLAGS += -I$(top_srcdir)/platform/$(with_platform)/arch/$(ARCH_DIR) diff --git a/platform/linux-generic/arch/arm/odp/api/cpu_arch.h b/platform/linux-generic/arch/arm/odp/api/cpu_arch.h new file mode 120000 index 0000000..e86e132 --- /dev/null +++ b/platform/linux-generic/arch/arm/odp/api/cpu_arch.h @@ -0,0 +1 @@ +../../../default/odp/api/cpu_arch.h \ No newline at end of file diff --git a/platform/linux-generic/arch/arm/odp_cpu_arch.c b/platform/linux-generic/arch/arm/odp_cpu_arch.c new file mode 120000 index 0000000..deebc47 --- /dev/null +++ b/platform/linux-generic/arch/arm/odp_cpu_arch.c @@ -0,0 +1 @@ +../default/odp_cpu_arch.c \ No newline at end of file diff --git a/platform/linux-generic/arch/arm/odp_sysinfo_parse.c b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c new file mode 120000 index 0000000..39962b8 --- /dev/null +++ b/platform/linux-generic/arch/arm/odp_sysinfo_parse.c @@ -0,0 +1 @@ +../default/odp_sysinfo_parse.c \ No newline at end of file diff --git a/platform/linux-generic/arch/linux/odp/api/cpu_arch.h b/platform/linux-generic/arch/default/odp/api/cpu_arch.h similarity index 100% rename from platform/linux-generic/arch/linux/odp/api/cpu_arch.h rename to platform/linux-generic/arch/default/odp/api/cpu_arch.h diff --git a/platform/linux-generic/arch/linux/odp_cpu_arch.c b/platform/linux-generic/arch/default/odp_cpu_arch.c similarity index 100% rename from platform/linux-generic/arch/linux/odp_cpu_arch.c rename to platform/linux-generic/arch/default/odp_cpu_arch.c diff --git a/platform/linux-generic/arch/linux/odp_sysinfo_parse.c b/platform/linux-generic/arch/default/odp_sysinfo_parse.c similarity index 100% rename from platform/linux-generic/arch/linux/odp_sysinfo_parse.c rename to platform/linux-generic/arch/default/odp_sysinfo_parse.c diff --git a/platform/linux-generic/arch/powerpc/odp_cpu_arch.c b/platform/linux-generic/arch/powerpc/odp_cpu_arch.c index c5fe400..deebc47 120000 --- a/platform/linux-generic/arch/powerpc/odp_cpu_arch.c +++ b/platform/linux-generic/arch/powerpc/odp_cpu_arch.c @@ -1 +1 @@ -../linux/odp_cpu_arch.c \ No newline at end of file +../default/odp_cpu_arch.c \ No newline at end of file
arch is defined as an architecture flag so that optimisations or necessary differences can be accommodated. When we are unable to determine the architecture it is incorrect to assign it the value of an operating system. Instead lets label it correctly as a default and add an error to the user when an unknown arch is encountered. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- configure.ac | 25 ++++++++++++++++------ platform/linux-generic/Makefile.am | 17 +++++++++------ platform/linux-generic/Makefile.inc | 4 ++-- platform/linux-generic/arch/arm/odp/api/cpu_arch.h | 1 + platform/linux-generic/arch/arm/odp_cpu_arch.c | 1 + .../linux-generic/arch/arm/odp_sysinfo_parse.c | 1 + .../arch/{linux => default}/odp/api/cpu_arch.h | 0 .../arch/{linux => default}/odp_cpu_arch.c | 0 .../arch/{linux => default}/odp_sysinfo_parse.c | 0 platform/linux-generic/arch/powerpc/odp_cpu_arch.c | 2 +- 10 files changed, 34 insertions(+), 17 deletions(-) create mode 120000 platform/linux-generic/arch/arm/odp/api/cpu_arch.h create mode 120000 platform/linux-generic/arch/arm/odp_cpu_arch.c create mode 120000 platform/linux-generic/arch/arm/odp_sysinfo_parse.c rename platform/linux-generic/arch/{linux => default}/odp/api/cpu_arch.h (100%) rename platform/linux-generic/arch/{linux => default}/odp_cpu_arch.c (100%) rename platform/linux-generic/arch/{linux => default}/odp_sysinfo_parse.c (100%)