Message ID | 1438790646-5670-3-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: > Building generated this warning message: > "copying selected object files to avoid basename conflicts..." That happed due to we have files with same name: > happened > ./platform/linux-generic/odp_time.c > and > platform/linux-generic/arch/.../odp_time.c > Autotools builds 2 objects with corresponding name odp_time.o. > Then that 2 objects packed to static library libodp.a. During > linking libtool copies everything from one odp_time.o to other. > So that final static lib has only one object odp_time.o. And libtool > generates warning that it did some tricks with binaries and might > be issues with debugging that code. Because of that arch/../odp_time.c > has only one function - optimized odp_time_cycles() it's reasonable to > rename arch files. So that warning disappears. But for better solve naming > issue we should add some prefix/postfix to arch specific objects. That is > easy with native Makefile but looks like autotools do not support postfix > or prefix for object files and overloading compilation strange. For now > we will try to not overlap names until better solution will be found. > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > Renaming is a good idea > --- > platform/linux-generic/arch/linux/Makefile.am | 2 > +- > platform/linux-generic/arch/linux/{odp_time.c => odp_time_cycles.c} | 0 > platform/linux-generic/arch/mips64/Makefile.am | 2 > +- > platform/linux-generic/arch/mips64/{odp_time.c => odp_time_cycles.c} | 0 > platform/linux-generic/arch/x86/Makefile.am | 2 > +- > platform/linux-generic/arch/x86/{odp_time.c => odp_time_cycles.c} | 0 > platform/linux-generic/m4/configure.m4 | 5 > ++++- > 7 files changed, 7 insertions(+), 4 deletions(-) > rename platform/linux-generic/arch/linux/{odp_time.c => > odp_time_cycles.c} (100%) > rename platform/linux-generic/arch/mips64/{odp_time.c => > odp_time_cycles.c} (100%) > rename platform/linux-generic/arch/x86/{odp_time.c => odp_time_cycles.c} > (100%) > > diff --git a/platform/linux-generic/arch/linux/Makefile.am > b/platform/linux-generic/arch/linux/Makefile.am > index 5539e3a..7532db4 100644 > --- a/platform/linux-generic/arch/linux/Makefile.am > +++ b/platform/linux-generic/arch/linux/Makefile.am > @@ -2,4 +2,4 @@ AM_CFLAGS += -I$(srcdir)/../../include > AM_CFLAGS += -I$(top_srcdir)/include > > noinst_LTLIBRARIES = libodparch.la > -libodparch_la_SOURCES = odp_time.c > +libodparch_la_SOURCES = odp_time_cycles.c > diff --git a/platform/linux-generic/arch/linux/odp_time.c > b/platform/linux-generic/arch/linux/odp_time_cycles.c > similarity index 100% > rename from platform/linux-generic/arch/linux/odp_time.c > rename to platform/linux-generic/arch/linux/odp_time_cycles.c > diff --git a/platform/linux-generic/arch/mips64/Makefile.am > b/platform/linux-generic/arch/mips64/Makefile.am > index 5539e3a..7532db4 100644 > --- a/platform/linux-generic/arch/mips64/Makefile.am > +++ b/platform/linux-generic/arch/mips64/Makefile.am > @@ -2,4 +2,4 @@ AM_CFLAGS += -I$(srcdir)/../../include > AM_CFLAGS += -I$(top_srcdir)/include > > noinst_LTLIBRARIES = libodparch.la > -libodparch_la_SOURCES = odp_time.c > +libodparch_la_SOURCES = odp_time_cycles.c > diff --git a/platform/linux-generic/arch/mips64/odp_time.c > b/platform/linux-generic/arch/mips64/odp_time_cycles.c > similarity index 100% > rename from platform/linux-generic/arch/mips64/odp_time.c > rename to platform/linux-generic/arch/mips64/odp_time_cycles.c > diff --git a/platform/linux-generic/arch/x86/Makefile.am > b/platform/linux-generic/arch/x86/Makefile.am > index 5539e3a..7532db4 100644 > --- a/platform/linux-generic/arch/x86/Makefile.am > +++ b/platform/linux-generic/arch/x86/Makefile.am > @@ -2,4 +2,4 @@ AM_CFLAGS += -I$(srcdir)/../../include > AM_CFLAGS += -I$(top_srcdir)/include > > noinst_LTLIBRARIES = libodparch.la > -libodparch_la_SOURCES = odp_time.c > +libodparch_la_SOURCES = odp_time_cycles.c > diff --git a/platform/linux-generic/arch/x86/odp_time.c > b/platform/linux-generic/arch/x86/odp_time_cycles.c > similarity index 100% > rename from platform/linux-generic/arch/x86/odp_time.c > rename to platform/linux-generic/arch/x86/odp_time_cycles.c > diff --git a/platform/linux-generic/m4/configure.m4 > b/platform/linux-generic/m4/configure.m4 > index 697465a..fcf2023 100644 > --- a/platform/linux-generic/m4/configure.m4 > +++ b/platform/linux-generic/m4/configure.m4 > @@ -18,4 +18,7 @@ AC_LINK_IFELSE( > > AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) > AC_CONFIG_FILES([platform/linux-generic/test/Makefile > - platform/linux-generic/arch/${ARCH}/Makefile]) > + platform/linux-generic/arch/linux/Makefile > + platform/linux-generic/arch/mips64/Makefile > + platform/linux-generic/arch/x86/Makefile ]) > + > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/platform/linux-generic/arch/linux/Makefile.am b/platform/linux-generic/arch/linux/Makefile.am index 5539e3a..7532db4 100644 --- a/platform/linux-generic/arch/linux/Makefile.am +++ b/platform/linux-generic/arch/linux/Makefile.am @@ -2,4 +2,4 @@ AM_CFLAGS += -I$(srcdir)/../../include AM_CFLAGS += -I$(top_srcdir)/include noinst_LTLIBRARIES = libodparch.la -libodparch_la_SOURCES = odp_time.c +libodparch_la_SOURCES = odp_time_cycles.c diff --git a/platform/linux-generic/arch/linux/odp_time.c b/platform/linux-generic/arch/linux/odp_time_cycles.c similarity index 100% rename from platform/linux-generic/arch/linux/odp_time.c rename to platform/linux-generic/arch/linux/odp_time_cycles.c diff --git a/platform/linux-generic/arch/mips64/Makefile.am b/platform/linux-generic/arch/mips64/Makefile.am index 5539e3a..7532db4 100644 --- a/platform/linux-generic/arch/mips64/Makefile.am +++ b/platform/linux-generic/arch/mips64/Makefile.am @@ -2,4 +2,4 @@ AM_CFLAGS += -I$(srcdir)/../../include AM_CFLAGS += -I$(top_srcdir)/include noinst_LTLIBRARIES = libodparch.la -libodparch_la_SOURCES = odp_time.c +libodparch_la_SOURCES = odp_time_cycles.c diff --git a/platform/linux-generic/arch/mips64/odp_time.c b/platform/linux-generic/arch/mips64/odp_time_cycles.c similarity index 100% rename from platform/linux-generic/arch/mips64/odp_time.c rename to platform/linux-generic/arch/mips64/odp_time_cycles.c diff --git a/platform/linux-generic/arch/x86/Makefile.am b/platform/linux-generic/arch/x86/Makefile.am index 5539e3a..7532db4 100644 --- a/platform/linux-generic/arch/x86/Makefile.am +++ b/platform/linux-generic/arch/x86/Makefile.am @@ -2,4 +2,4 @@ AM_CFLAGS += -I$(srcdir)/../../include AM_CFLAGS += -I$(top_srcdir)/include noinst_LTLIBRARIES = libodparch.la -libodparch_la_SOURCES = odp_time.c +libodparch_la_SOURCES = odp_time_cycles.c diff --git a/platform/linux-generic/arch/x86/odp_time.c b/platform/linux-generic/arch/x86/odp_time_cycles.c similarity index 100% rename from platform/linux-generic/arch/x86/odp_time.c rename to platform/linux-generic/arch/x86/odp_time_cycles.c diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 697465a..fcf2023 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -18,4 +18,7 @@ AC_LINK_IFELSE( AC_SUBST([platform_with_arch], ["arch/${ARCH}"]) AC_CONFIG_FILES([platform/linux-generic/test/Makefile - platform/linux-generic/arch/${ARCH}/Makefile]) + platform/linux-generic/arch/linux/Makefile + platform/linux-generic/arch/mips64/Makefile + platform/linux-generic/arch/x86/Makefile ]) +
Building generated this warning message: "copying selected object files to avoid basename conflicts..." That happed due to we have files with same name: ./platform/linux-generic/odp_time.c and platform/linux-generic/arch/.../odp_time.c Autotools builds 2 objects with corresponding name odp_time.o. Then that 2 objects packed to static library libodp.a. During linking libtool copies everything from one odp_time.o to other. So that final static lib has only one object odp_time.o. And libtool generates warning that it did some tricks with binaries and might be issues with debugging that code. Because of that arch/../odp_time.c has only one function - optimized odp_time_cycles() it's reasonable to rename arch files. So that warning disappears. But for better solve naming issue we should add some prefix/postfix to arch specific objects. That is easy with native Makefile but looks like autotools do not support postfix or prefix for object files and overloading compilation strange. For now we will try to not overlap names until better solution will be found. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- platform/linux-generic/arch/linux/Makefile.am | 2 +- platform/linux-generic/arch/linux/{odp_time.c => odp_time_cycles.c} | 0 platform/linux-generic/arch/mips64/Makefile.am | 2 +- platform/linux-generic/arch/mips64/{odp_time.c => odp_time_cycles.c} | 0 platform/linux-generic/arch/x86/Makefile.am | 2 +- platform/linux-generic/arch/x86/{odp_time.c => odp_time_cycles.c} | 0 platform/linux-generic/m4/configure.m4 | 5 ++++- 7 files changed, 7 insertions(+), 4 deletions(-) rename platform/linux-generic/arch/linux/{odp_time.c => odp_time_cycles.c} (100%) rename platform/linux-generic/arch/mips64/{odp_time.c => odp_time_cycles.c} (100%) rename platform/linux-generic/arch/x86/{odp_time.c => odp_time_cycles.c} (100%)