Message ID | 1438790646-5670-2-git-send-email-maxim.uvarov@linaro.org |
---|---|
State | New |
Headers | show |
On 5 August 2015 at 12:04, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > Compile all arch depandant code to library, then link that > library to main libodp.a > > We don’t want two libraries for one implementation that is confusing if it takes this level of complexity I wonder if we need to remove all ARCH support from linux-generic. If that is true where do we put code that others may be able to reuse ? > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > --- > platform/linux-generic/Makefile.am | 6 ++++-- > platform/linux-generic/arch/linux/Makefile.am | 5 +++++ > platform/linux-generic/arch/mips64/Makefile.am | 5 +++++ > platform/linux-generic/arch/x86/Makefile.am | 5 +++++ > platform/linux-generic/m4/configure.m4 | 4 +++- > 5 files changed, 22 insertions(+), 3 deletions(-) > create mode 100644 platform/linux-generic/arch/linux/Makefile.am > create mode 100644 platform/linux-generic/arch/mips64/Makefile.am > create mode 100644 platform/linux-generic/arch/x86/Makefile.am > > diff --git a/platform/linux-generic/Makefile.am > b/platform/linux-generic/Makefile.am > index 34ceb20..5b0b181 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -159,5 +159,7 @@ __LIB__libodp_la_SOURCES = \ > odp_time.c \ > odp_timer.c \ > odp_version.c \ > - odp_weak.c \ > - arch/@ARCH@/odp_time.c > + odp_weak.c > +SUBDIRS= @platform_with_arch@ > +__LIB__libodp_la_LIBADD = arch/@ARCH@/libodparch.la > +__LIB__libodp_la_DEPENDENCIES = arch/@ARCH@/libodparch.la > diff --git a/platform/linux-generic/arch/linux/Makefile.am > b/platform/linux-generic/arch/linux/Makefile.am > new file mode 100644 > index 0000000..5539e3a > --- /dev/null > +++ b/platform/linux-generic/arch/linux/Makefile.am > @@ -0,0 +1,5 @@ > +AM_CFLAGS += -I$(srcdir)/../../include > +AM_CFLAGS += -I$(top_srcdir)/include > + > +noinst_LTLIBRARIES = libodparch.la > +libodparch_la_SOURCES = odp_time.c > diff --git a/platform/linux-generic/arch/mips64/Makefile.am > b/platform/linux-generic/arch/mips64/Makefile.am > new file mode 100644 > index 0000000..5539e3a > --- /dev/null > +++ b/platform/linux-generic/arch/mips64/Makefile.am > @@ -0,0 +1,5 @@ > +AM_CFLAGS += -I$(srcdir)/../../include > +AM_CFLAGS += -I$(top_srcdir)/include > + > +noinst_LTLIBRARIES = libodparch.la > +libodparch_la_SOURCES = odp_time.c > diff --git a/platform/linux-generic/arch/x86/Makefile.am > b/platform/linux-generic/arch/x86/Makefile.am > new file mode 100644 > index 0000000..5539e3a > --- /dev/null > +++ b/platform/linux-generic/arch/x86/Makefile.am > @@ -0,0 +1,5 @@ > +AM_CFLAGS += -I$(srcdir)/../../include > +AM_CFLAGS += -I$(top_srcdir)/include > + > +noinst_LTLIBRARIES = libodparch.la > +libodparch_la_SOURCES = odp_time.c > diff --git a/platform/linux-generic/m4/configure.m4 > b/platform/linux-generic/m4/configure.m4 > index 55124f1..697465a 100644 > --- a/platform/linux-generic/m4/configure.m4 > +++ b/platform/linux-generic/m4/configure.m4 > @@ -16,4 +16,6 @@ AC_LINK_IFELSE( > echo "Use newer version. For gcc > 4.7.0" > exit -1) > > -AC_CONFIG_FILES([platform/linux-generic/test/Makefile]) > +AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) > +AC_CONFIG_FILES([platform/linux-generic/test/Makefile > + platform/linux-generic/arch/${ARCH}/Makefile]) > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
linux-generic serves several purposes and one of them is to serve as a model for "production" implementations. So it's reasonable for linux-generic to have an ARCH structure for other implementations to use as a model. For example, if we wanted to support odp-dpdk on ARM-based platforms that do their I/O via NICs then presumably odp-dpdk would need such a structure as well, so it might as well follow the model structure that linux-generic demonstrates. That also solves the sub-question of where do these reusable arch-specific code fragments go. We're just showing best practices here. On Wed, Aug 5, 2015 at 11:08 AM, Mike Holmes <mike.holmes@linaro.org> wrote: > > > On 5 August 2015 at 12:04, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > >> Compile all arch depandant code to library, then link that >> library to main libodp.a >> >> > We don’t want two libraries for one implementation that is confusing if it > takes this level of complexity I wonder if we need to remove all ARCH > support from linux-generic. > > If that is true where do we put code that others may be able to reuse ? > > >> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> >> --- >> platform/linux-generic/Makefile.am | 6 ++++-- >> platform/linux-generic/arch/linux/Makefile.am | 5 +++++ >> platform/linux-generic/arch/mips64/Makefile.am | 5 +++++ >> platform/linux-generic/arch/x86/Makefile.am | 5 +++++ >> platform/linux-generic/m4/configure.m4 | 4 +++- >> 5 files changed, 22 insertions(+), 3 deletions(-) >> create mode 100644 platform/linux-generic/arch/linux/Makefile.am >> create mode 100644 platform/linux-generic/arch/mips64/Makefile.am >> create mode 100644 platform/linux-generic/arch/x86/Makefile.am >> >> diff --git a/platform/linux-generic/Makefile.am >> b/platform/linux-generic/Makefile.am >> index 34ceb20..5b0b181 100644 >> --- a/platform/linux-generic/Makefile.am >> +++ b/platform/linux-generic/Makefile.am >> @@ -159,5 +159,7 @@ __LIB__libodp_la_SOURCES = \ >> odp_time.c \ >> odp_timer.c \ >> odp_version.c \ >> - odp_weak.c \ >> - arch/@ARCH@/odp_time.c >> + odp_weak.c >> +SUBDIRS= @platform_with_arch@ >> +__LIB__libodp_la_LIBADD = arch/@ARCH@/libodparch.la >> +__LIB__libodp_la_DEPENDENCIES = arch/@ARCH@/libodparch.la >> diff --git a/platform/linux-generic/arch/linux/Makefile.am >> b/platform/linux-generic/arch/linux/Makefile.am >> new file mode 100644 >> index 0000000..5539e3a >> --- /dev/null >> +++ b/platform/linux-generic/arch/linux/Makefile.am >> @@ -0,0 +1,5 @@ >> +AM_CFLAGS += -I$(srcdir)/../../include >> +AM_CFLAGS += -I$(top_srcdir)/include >> + >> +noinst_LTLIBRARIES = libodparch.la >> +libodparch_la_SOURCES = odp_time.c >> diff --git a/platform/linux-generic/arch/mips64/Makefile.am >> b/platform/linux-generic/arch/mips64/Makefile.am >> new file mode 100644 >> index 0000000..5539e3a >> --- /dev/null >> +++ b/platform/linux-generic/arch/mips64/Makefile.am >> @@ -0,0 +1,5 @@ >> +AM_CFLAGS += -I$(srcdir)/../../include >> +AM_CFLAGS += -I$(top_srcdir)/include >> + >> +noinst_LTLIBRARIES = libodparch.la >> +libodparch_la_SOURCES = odp_time.c >> diff --git a/platform/linux-generic/arch/x86/Makefile.am >> b/platform/linux-generic/arch/x86/Makefile.am >> new file mode 100644 >> index 0000000..5539e3a >> --- /dev/null >> +++ b/platform/linux-generic/arch/x86/Makefile.am >> @@ -0,0 +1,5 @@ >> +AM_CFLAGS += -I$(srcdir)/../../include >> +AM_CFLAGS += -I$(top_srcdir)/include >> + >> +noinst_LTLIBRARIES = libodparch.la >> +libodparch_la_SOURCES = odp_time.c >> diff --git a/platform/linux-generic/m4/configure.m4 >> b/platform/linux-generic/m4/configure.m4 >> index 55124f1..697465a 100644 >> --- a/platform/linux-generic/m4/configure.m4 >> +++ b/platform/linux-generic/m4/configure.m4 >> @@ -16,4 +16,6 @@ AC_LINK_IFELSE( >> echo "Use newer version. For gcc > 4.7.0" >> exit -1) >> >> -AC_CONFIG_FILES([platform/linux-generic/test/Makefile]) >> +AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) >> +AC_CONFIG_FILES([platform/linux-generic/test/Makefile >> + platform/linux-generic/arch/${ARCH}/Makefile]) >> -- >> 1.9.1 >> >> _______________________________________________ >> 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 > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp > >
On 5 August 2015 at 14:39, Bill Fischofer <bill.fischofer@linaro.org> wrote: > linux-generic serves several purposes and one of them is to serve as a > model for "production" implementations. So it's reasonable for > linux-generic to have an ARCH structure for other implementations to use as > a model. For example, if we wanted to support odp-dpdk on ARM-based > platforms that do their I/O via NICs then presumably odp-dpdk would need > such a structure as well, so it might as well follow the model structure > that linux-generic demonstrates. > > That also solves the sub-question of where do these reusable arch-specific > code fragments go. We're just showing best practices here. > Indeed we want to show guidance but that is not the core of the problem, we do that now. What we don’t want is for arch it to be a library of architectures just to keep Debian packaging happy, then it just gets complicated and that is what this patch introduces. > > On Wed, Aug 5, 2015 at 11:08 AM, Mike Holmes <mike.holmes@linaro.org> > wrote: > >> >> >> On 5 August 2015 at 12:04, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >> >>> Compile all arch depandant code to library, then link that >>> library to main libodp.a >>> >>> >> We don’t want two libraries for one implementation that is confusing if >> it takes this level of complexity I wonder if we need to remove all ARCH >> support from linux-generic. >> >> If that is true where do we put code that others may be able to reuse ? >> >> >>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> >>> --- >>> platform/linux-generic/Makefile.am | 6 ++++-- >>> platform/linux-generic/arch/linux/Makefile.am | 5 +++++ >>> platform/linux-generic/arch/mips64/Makefile.am | 5 +++++ >>> platform/linux-generic/arch/x86/Makefile.am | 5 +++++ >>> platform/linux-generic/m4/configure.m4 | 4 +++- >>> 5 files changed, 22 insertions(+), 3 deletions(-) >>> create mode 100644 platform/linux-generic/arch/linux/Makefile.am >>> create mode 100644 platform/linux-generic/arch/mips64/Makefile.am >>> create mode 100644 platform/linux-generic/arch/x86/Makefile.am >>> >>> diff --git a/platform/linux-generic/Makefile.am >>> b/platform/linux-generic/Makefile.am >>> index 34ceb20..5b0b181 100644 >>> --- a/platform/linux-generic/Makefile.am >>> +++ b/platform/linux-generic/Makefile.am >>> @@ -159,5 +159,7 @@ __LIB__libodp_la_SOURCES = \ >>> odp_time.c \ >>> odp_timer.c \ >>> odp_version.c \ >>> - odp_weak.c \ >>> - arch/@ARCH@/odp_time.c >>> + odp_weak.c >>> +SUBDIRS= @platform_with_arch@ >>> +__LIB__libodp_la_LIBADD = arch/@ARCH@/libodparch.la >>> +__LIB__libodp_la_DEPENDENCIES = arch/@ARCH@/libodparch.la >>> diff --git a/platform/linux-generic/arch/linux/Makefile.am >>> b/platform/linux-generic/arch/linux/Makefile.am >>> new file mode 100644 >>> index 0000000..5539e3a >>> --- /dev/null >>> +++ b/platform/linux-generic/arch/linux/Makefile.am >>> @@ -0,0 +1,5 @@ >>> +AM_CFLAGS += -I$(srcdir)/../../include >>> +AM_CFLAGS += -I$(top_srcdir)/include >>> + >>> +noinst_LTLIBRARIES = libodparch.la >>> +libodparch_la_SOURCES = odp_time.c >>> diff --git a/platform/linux-generic/arch/mips64/Makefile.am >>> b/platform/linux-generic/arch/mips64/Makefile.am >>> new file mode 100644 >>> index 0000000..5539e3a >>> --- /dev/null >>> +++ b/platform/linux-generic/arch/mips64/Makefile.am >>> @@ -0,0 +1,5 @@ >>> +AM_CFLAGS += -I$(srcdir)/../../include >>> +AM_CFLAGS += -I$(top_srcdir)/include >>> + >>> +noinst_LTLIBRARIES = libodparch.la >>> +libodparch_la_SOURCES = odp_time.c >>> diff --git a/platform/linux-generic/arch/x86/Makefile.am >>> b/platform/linux-generic/arch/x86/Makefile.am >>> new file mode 100644 >>> index 0000000..5539e3a >>> --- /dev/null >>> +++ b/platform/linux-generic/arch/x86/Makefile.am >>> @@ -0,0 +1,5 @@ >>> +AM_CFLAGS += -I$(srcdir)/../../include >>> +AM_CFLAGS += -I$(top_srcdir)/include >>> + >>> +noinst_LTLIBRARIES = libodparch.la >>> +libodparch_la_SOURCES = odp_time.c >>> diff --git a/platform/linux-generic/m4/configure.m4 >>> b/platform/linux-generic/m4/configure.m4 >>> index 55124f1..697465a 100644 >>> --- a/platform/linux-generic/m4/configure.m4 >>> +++ b/platform/linux-generic/m4/configure.m4 >>> @@ -16,4 +16,6 @@ AC_LINK_IFELSE( >>> echo "Use newer version. For gcc > 4.7.0" >>> exit -1) >>> >>> -AC_CONFIG_FILES([platform/linux-generic/test/Makefile]) >>> +AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) >>> +AC_CONFIG_FILES([platform/linux-generic/test/Makefile >>> + platform/linux-generic/arch/${ARCH}/Makefile]) >>> -- >>> 1.9.1 >>> >>> _______________________________________________ >>> 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 >> >> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp >> >> >
linux-generic wouldn't introduce ARCH variants except in those cases where it truly matters (e.g., some of the atomics, Barry's proposed AES-based hashing for TM, etc.). For everything else the standard generic C code should be fine. On Wed, Aug 5, 2015 at 1:52 PM, Mike Holmes <mike.holmes@linaro.org> wrote: > > > On 5 August 2015 at 14:39, Bill Fischofer <bill.fischofer@linaro.org> > wrote: > >> linux-generic serves several purposes and one of them is to serve as a >> model for "production" implementations. So it's reasonable for >> linux-generic to have an ARCH structure for other implementations to use as >> a model. For example, if we wanted to support odp-dpdk on ARM-based >> platforms that do their I/O via NICs then presumably odp-dpdk would need >> such a structure as well, so it might as well follow the model structure >> that linux-generic demonstrates. >> >> That also solves the sub-question of where do these reusable >> arch-specific code fragments go. We're just showing best practices here. >> > > Indeed we want to show guidance but that is not the core of the problem, > we do that now. > > What we don’t want is for arch it to be a library of architectures just to > keep Debian packaging happy, then it just gets complicated and that is what > this patch introduces. > > > >> >> On Wed, Aug 5, 2015 at 11:08 AM, Mike Holmes <mike.holmes@linaro.org> >> wrote: >> >>> >>> >>> On 5 August 2015 at 12:04, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >>> >>>> Compile all arch depandant code to library, then link that >>>> library to main libodp.a >>>> >>>> >>> We don’t want two libraries for one implementation that is confusing if >>> it takes this level of complexity I wonder if we need to remove all ARCH >>> support from linux-generic. >>> >>> If that is true where do we put code that others may be able to reuse ? >>> >>> >>>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> >>>> --- >>>> platform/linux-generic/Makefile.am | 6 ++++-- >>>> platform/linux-generic/arch/linux/Makefile.am | 5 +++++ >>>> platform/linux-generic/arch/mips64/Makefile.am | 5 +++++ >>>> platform/linux-generic/arch/x86/Makefile.am | 5 +++++ >>>> platform/linux-generic/m4/configure.m4 | 4 +++- >>>> 5 files changed, 22 insertions(+), 3 deletions(-) >>>> create mode 100644 platform/linux-generic/arch/linux/Makefile.am >>>> create mode 100644 platform/linux-generic/arch/mips64/Makefile.am >>>> create mode 100644 platform/linux-generic/arch/x86/Makefile.am >>>> >>>> diff --git a/platform/linux-generic/Makefile.am >>>> b/platform/linux-generic/Makefile.am >>>> index 34ceb20..5b0b181 100644 >>>> --- a/platform/linux-generic/Makefile.am >>>> +++ b/platform/linux-generic/Makefile.am >>>> @@ -159,5 +159,7 @@ __LIB__libodp_la_SOURCES = \ >>>> odp_time.c \ >>>> odp_timer.c \ >>>> odp_version.c \ >>>> - odp_weak.c \ >>>> - arch/@ARCH@/odp_time.c >>>> + odp_weak.c >>>> +SUBDIRS= @platform_with_arch@ >>>> +__LIB__libodp_la_LIBADD = arch/@ARCH@/libodparch.la >>>> +__LIB__libodp_la_DEPENDENCIES = arch/@ARCH@/libodparch.la >>>> diff --git a/platform/linux-generic/arch/linux/Makefile.am >>>> b/platform/linux-generic/arch/linux/Makefile.am >>>> new file mode 100644 >>>> index 0000000..5539e3a >>>> --- /dev/null >>>> +++ b/platform/linux-generic/arch/linux/Makefile.am >>>> @@ -0,0 +1,5 @@ >>>> +AM_CFLAGS += -I$(srcdir)/../../include >>>> +AM_CFLAGS += -I$(top_srcdir)/include >>>> + >>>> +noinst_LTLIBRARIES = libodparch.la >>>> +libodparch_la_SOURCES = odp_time.c >>>> diff --git a/platform/linux-generic/arch/mips64/Makefile.am >>>> b/platform/linux-generic/arch/mips64/Makefile.am >>>> new file mode 100644 >>>> index 0000000..5539e3a >>>> --- /dev/null >>>> +++ b/platform/linux-generic/arch/mips64/Makefile.am >>>> @@ -0,0 +1,5 @@ >>>> +AM_CFLAGS += -I$(srcdir)/../../include >>>> +AM_CFLAGS += -I$(top_srcdir)/include >>>> + >>>> +noinst_LTLIBRARIES = libodparch.la >>>> +libodparch_la_SOURCES = odp_time.c >>>> diff --git a/platform/linux-generic/arch/x86/Makefile.am >>>> b/platform/linux-generic/arch/x86/Makefile.am >>>> new file mode 100644 >>>> index 0000000..5539e3a >>>> --- /dev/null >>>> +++ b/platform/linux-generic/arch/x86/Makefile.am >>>> @@ -0,0 +1,5 @@ >>>> +AM_CFLAGS += -I$(srcdir)/../../include >>>> +AM_CFLAGS += -I$(top_srcdir)/include >>>> + >>>> +noinst_LTLIBRARIES = libodparch.la >>>> +libodparch_la_SOURCES = odp_time.c >>>> diff --git a/platform/linux-generic/m4/configure.m4 >>>> b/platform/linux-generic/m4/configure.m4 >>>> index 55124f1..697465a 100644 >>>> --- a/platform/linux-generic/m4/configure.m4 >>>> +++ b/platform/linux-generic/m4/configure.m4 >>>> @@ -16,4 +16,6 @@ AC_LINK_IFELSE( >>>> echo "Use newer version. For gcc > 4.7.0" >>>> exit -1) >>>> >>>> -AC_CONFIG_FILES([platform/linux-generic/test/Makefile]) >>>> +AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) >>>> +AC_CONFIG_FILES([platform/linux-generic/test/Makefile >>>> + platform/linux-generic/arch/${ARCH}/Makefile]) >>>> -- >>>> 1.9.1 >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >>> >>> _______________________________________________ >>> 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 > > >
On 5 August 2015 at 14:55, Bill Fischofer <bill.fischofer@linaro.org> wrote: > linux-generic wouldn't introduce ARCH variants except in those cases where > it truly matters (e.g., some of the atomics, Barry's proposed AES-based > hashing for TM, etc.). For everything else the standard generic C code > should be fine. > Agreed that is already in place, the question here is about making that mechanism more complex just for packaging reasons. > > On Wed, Aug 5, 2015 at 1:52 PM, Mike Holmes <mike.holmes@linaro.org> > wrote: > >> >> >> On 5 August 2015 at 14:39, Bill Fischofer <bill.fischofer@linaro.org> >> wrote: >> >>> linux-generic serves several purposes and one of them is to serve as a >>> model for "production" implementations. So it's reasonable for >>> linux-generic to have an ARCH structure for other implementations to use as >>> a model. For example, if we wanted to support odp-dpdk on ARM-based >>> platforms that do their I/O via NICs then presumably odp-dpdk would need >>> such a structure as well, so it might as well follow the model structure >>> that linux-generic demonstrates. >>> >>> That also solves the sub-question of where do these reusable >>> arch-specific code fragments go. We're just showing best practices here. >>> >> >> Indeed we want to show guidance but that is not the core of the problem, >> we do that now. >> >> What we don’t want is for arch it to be a library of architectures just >> to keep Debian packaging happy, then it just gets complicated and that is >> what this patch introduces. >> >> >> >>> >>> On Wed, Aug 5, 2015 at 11:08 AM, Mike Holmes <mike.holmes@linaro.org> >>> wrote: >>> >>>> >>>> >>>> On 5 August 2015 at 12:04, Maxim Uvarov <maxim.uvarov@linaro.org> >>>> wrote: >>>> >>>>> Compile all arch depandant code to library, then link that >>>>> library to main libodp.a >>>>> >>>>> >>>> We don’t want two libraries for one implementation that is confusing if >>>> it takes this level of complexity I wonder if we need to remove all ARCH >>>> support from linux-generic. >>>> >>>> If that is true where do we put code that others may be able to reuse ? >>>> >>>> >>>>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> >>>>> --- >>>>> platform/linux-generic/Makefile.am | 6 ++++-- >>>>> platform/linux-generic/arch/linux/Makefile.am | 5 +++++ >>>>> platform/linux-generic/arch/mips64/Makefile.am | 5 +++++ >>>>> platform/linux-generic/arch/x86/Makefile.am | 5 +++++ >>>>> platform/linux-generic/m4/configure.m4 | 4 +++- >>>>> 5 files changed, 22 insertions(+), 3 deletions(-) >>>>> create mode 100644 platform/linux-generic/arch/linux/Makefile.am >>>>> create mode 100644 platform/linux-generic/arch/mips64/Makefile.am >>>>> create mode 100644 platform/linux-generic/arch/x86/Makefile.am >>>>> >>>>> diff --git a/platform/linux-generic/Makefile.am >>>>> b/platform/linux-generic/Makefile.am >>>>> index 34ceb20..5b0b181 100644 >>>>> --- a/platform/linux-generic/Makefile.am >>>>> +++ b/platform/linux-generic/Makefile.am >>>>> @@ -159,5 +159,7 @@ __LIB__libodp_la_SOURCES = \ >>>>> odp_time.c \ >>>>> odp_timer.c \ >>>>> odp_version.c \ >>>>> - odp_weak.c \ >>>>> - arch/@ARCH@/odp_time.c >>>>> + odp_weak.c >>>>> +SUBDIRS= @platform_with_arch@ >>>>> +__LIB__libodp_la_LIBADD = arch/@ARCH@/libodparch.la >>>>> +__LIB__libodp_la_DEPENDENCIES = arch/@ARCH@/libodparch.la >>>>> diff --git a/platform/linux-generic/arch/linux/Makefile.am >>>>> b/platform/linux-generic/arch/linux/Makefile.am >>>>> new file mode 100644 >>>>> index 0000000..5539e3a >>>>> --- /dev/null >>>>> +++ b/platform/linux-generic/arch/linux/Makefile.am >>>>> @@ -0,0 +1,5 @@ >>>>> +AM_CFLAGS += -I$(srcdir)/../../include >>>>> +AM_CFLAGS += -I$(top_srcdir)/include >>>>> + >>>>> +noinst_LTLIBRARIES = libodparch.la >>>>> +libodparch_la_SOURCES = odp_time.c >>>>> diff --git a/platform/linux-generic/arch/mips64/Makefile.am >>>>> b/platform/linux-generic/arch/mips64/Makefile.am >>>>> new file mode 100644 >>>>> index 0000000..5539e3a >>>>> --- /dev/null >>>>> +++ b/platform/linux-generic/arch/mips64/Makefile.am >>>>> @@ -0,0 +1,5 @@ >>>>> +AM_CFLAGS += -I$(srcdir)/../../include >>>>> +AM_CFLAGS += -I$(top_srcdir)/include >>>>> + >>>>> +noinst_LTLIBRARIES = libodparch.la >>>>> +libodparch_la_SOURCES = odp_time.c >>>>> diff --git a/platform/linux-generic/arch/x86/Makefile.am >>>>> b/platform/linux-generic/arch/x86/Makefile.am >>>>> new file mode 100644 >>>>> index 0000000..5539e3a >>>>> --- /dev/null >>>>> +++ b/platform/linux-generic/arch/x86/Makefile.am >>>>> @@ -0,0 +1,5 @@ >>>>> +AM_CFLAGS += -I$(srcdir)/../../include >>>>> +AM_CFLAGS += -I$(top_srcdir)/include >>>>> + >>>>> +noinst_LTLIBRARIES = libodparch.la >>>>> +libodparch_la_SOURCES = odp_time.c >>>>> diff --git a/platform/linux-generic/m4/configure.m4 >>>>> b/platform/linux-generic/m4/configure.m4 >>>>> index 55124f1..697465a 100644 >>>>> --- a/platform/linux-generic/m4/configure.m4 >>>>> +++ b/platform/linux-generic/m4/configure.m4 >>>>> @@ -16,4 +16,6 @@ AC_LINK_IFELSE( >>>>> echo "Use newer version. For gcc > 4.7.0" >>>>> exit -1) >>>>> >>>>> -AC_CONFIG_FILES([platform/linux-generic/test/Makefile]) >>>>> +AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) >>>>> +AC_CONFIG_FILES([platform/linux-generic/test/Makefile >>>>> + platform/linux-generic/arch/${ARCH}/Makefile]) >>>>> -- >>>>> 1.9.1 >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> >
On 08/05/15 19:08, Mike Holmes wrote: > > > On 5 August 2015 at 12:04, Maxim Uvarov <maxim.uvarov@linaro.org > <mailto:maxim.uvarov@linaro.org>> wrote: > > Compile all arch depandant code to library, then link that > library to main libodp.a > > > We don’t want two libraries for one implementation that is confusing > if it takes this level of complexity I wonder if we need to remove all > ARCH support from linux-generic. by saying "we don't want" it not quite clear who actually replied. I description I described internal build process. That library considered as temporary storage for group of same propose objects . I wrote: "then link that library to main libodp.a" - it's internal build process and result is one library libodp.a. That technique is not new, we do such things for validation tests. That patch just defines structure for arch dependent code and build system structure (m4, Makefile.am). But compilation result remains the same. Maxim. > > If that is true where do we put code that others may be able to reuse ? > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org > <mailto:maxim.uvarov@linaro.org>> > --- > platform/linux-generic/Makefile.am | 6 ++++-- > platform/linux-generic/arch/linux/Makefile.am | 5 +++++ > platform/linux-generic/arch/mips64/Makefile.am | 5 +++++ > platform/linux-generic/arch/x86/Makefile.am | 5 +++++ > platform/linux-generic/m4/configure.m4 | 4 +++- > 5 files changed, 22 insertions(+), 3 deletions(-) > create mode 100644 platform/linux-generic/arch/linux/Makefile.am > create mode 100644 platform/linux-generic/arch/mips64/Makefile.am > create mode 100644 platform/linux-generic/arch/x86/Makefile.am > > diff --git a/platform/linux-generic/Makefile.am > b/platform/linux-generic/Makefile.am > index 34ceb20..5b0b181 100644 > --- a/platform/linux-generic/Makefile.am > +++ b/platform/linux-generic/Makefile.am > @@ -159,5 +159,7 @@ __LIB__libodp_la_SOURCES = \ > odp_time.c \ > odp_timer.c \ > odp_version.c \ > - odp_weak.c \ > - arch/@ARCH@/odp_time.c > + odp_weak.c > +SUBDIRS= @platform_with_arch@ > +__LIB__libodp_la_LIBADD = arch/@ARCH@/libodparch.la > <http://libodparch.la> > +__LIB__libodp_la_DEPENDENCIES = arch/@ARCH@/libodparch.la > <http://libodparch.la> > diff --git a/platform/linux-generic/arch/linux/Makefile.am > b/platform/linux-generic/arch/linux/Makefile.am > new file mode 100644 > index 0000000..5539e3a > --- /dev/null > +++ b/platform/linux-generic/arch/linux/Makefile.am > @@ -0,0 +1,5 @@ > +AM_CFLAGS += -I$(srcdir)/../../include > +AM_CFLAGS += -I$(top_srcdir)/include > + > +noinst_LTLIBRARIES = libodparch.la <http://libodparch.la> > +libodparch_la_SOURCES = odp_time.c > diff --git a/platform/linux-generic/arch/mips64/Makefile.am > b/platform/linux-generic/arch/mips64/Makefile.am > new file mode 100644 > index 0000000..5539e3a > --- /dev/null > +++ b/platform/linux-generic/arch/mips64/Makefile.am > @@ -0,0 +1,5 @@ > +AM_CFLAGS += -I$(srcdir)/../../include > +AM_CFLAGS += -I$(top_srcdir)/include > + > +noinst_LTLIBRARIES = libodparch.la <http://libodparch.la> > +libodparch_la_SOURCES = odp_time.c > diff --git a/platform/linux-generic/arch/x86/Makefile.am > b/platform/linux-generic/arch/x86/Makefile.am > new file mode 100644 > index 0000000..5539e3a > --- /dev/null > +++ b/platform/linux-generic/arch/x86/Makefile.am > @@ -0,0 +1,5 @@ > +AM_CFLAGS += -I$(srcdir)/../../include > +AM_CFLAGS += -I$(top_srcdir)/include > + > +noinst_LTLIBRARIES = libodparch.la <http://libodparch.la> > +libodparch_la_SOURCES = odp_time.c > diff --git a/platform/linux-generic/m4/configure.m4 > b/platform/linux-generic/m4/configure.m4 > index 55124f1..697465a 100644 > --- a/platform/linux-generic/m4/configure.m4 > +++ b/platform/linux-generic/m4/configure.m4 > @@ -16,4 +16,6 @@ AC_LINK_IFELSE( > echo "Use newer version. For gcc > 4.7.0" > exit -1) > > -AC_CONFIG_FILES([platform/linux-generic/test/Makefile]) > +AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) > +AC_CONFIG_FILES([platform/linux-generic/test/Makefile > + platform/linux-generic/arch/${ARCH}/Makefile]) > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <mailto: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 >
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 34ceb20..5b0b181 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -159,5 +159,7 @@ __LIB__libodp_la_SOURCES = \ odp_time.c \ odp_timer.c \ odp_version.c \ - odp_weak.c \ - arch/@ARCH@/odp_time.c + odp_weak.c +SUBDIRS= @platform_with_arch@ +__LIB__libodp_la_LIBADD = arch/@ARCH@/libodparch.la +__LIB__libodp_la_DEPENDENCIES = arch/@ARCH@/libodparch.la diff --git a/platform/linux-generic/arch/linux/Makefile.am b/platform/linux-generic/arch/linux/Makefile.am new file mode 100644 index 0000000..5539e3a --- /dev/null +++ b/platform/linux-generic/arch/linux/Makefile.am @@ -0,0 +1,5 @@ +AM_CFLAGS += -I$(srcdir)/../../include +AM_CFLAGS += -I$(top_srcdir)/include + +noinst_LTLIBRARIES = libodparch.la +libodparch_la_SOURCES = odp_time.c diff --git a/platform/linux-generic/arch/mips64/Makefile.am b/platform/linux-generic/arch/mips64/Makefile.am new file mode 100644 index 0000000..5539e3a --- /dev/null +++ b/platform/linux-generic/arch/mips64/Makefile.am @@ -0,0 +1,5 @@ +AM_CFLAGS += -I$(srcdir)/../../include +AM_CFLAGS += -I$(top_srcdir)/include + +noinst_LTLIBRARIES = libodparch.la +libodparch_la_SOURCES = odp_time.c diff --git a/platform/linux-generic/arch/x86/Makefile.am b/platform/linux-generic/arch/x86/Makefile.am new file mode 100644 index 0000000..5539e3a --- /dev/null +++ b/platform/linux-generic/arch/x86/Makefile.am @@ -0,0 +1,5 @@ +AM_CFLAGS += -I$(srcdir)/../../include +AM_CFLAGS += -I$(top_srcdir)/include + +noinst_LTLIBRARIES = libodparch.la +libodparch_la_SOURCES = odp_time.c diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 55124f1..697465a 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -16,4 +16,6 @@ AC_LINK_IFELSE( echo "Use newer version. For gcc > 4.7.0" exit -1) -AC_CONFIG_FILES([platform/linux-generic/test/Makefile]) +AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) +AC_CONFIG_FILES([platform/linux-generic/test/Makefile + platform/linux-generic/arch/${ARCH}/Makefile])
Compile all arch depandant code to library, then link that library to main libodp.a Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- platform/linux-generic/Makefile.am | 6 ++++-- platform/linux-generic/arch/linux/Makefile.am | 5 +++++ platform/linux-generic/arch/mips64/Makefile.am | 5 +++++ platform/linux-generic/arch/x86/Makefile.am | 5 +++++ platform/linux-generic/m4/configure.m4 | 4 +++- 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 platform/linux-generic/arch/linux/Makefile.am create mode 100644 platform/linux-generic/arch/mips64/Makefile.am create mode 100644 platform/linux-generic/arch/x86/Makefile.am