Message ID | 1374324735-2286-9-git-send-email-gustavo@zacarias.com.ar |
---|---|
State | Accepted |
Headers | show |
Dear Gustavo Zacarias, On Sat, 20 Jul 2013 09:52:14 -0300, Gustavo Zacarias wrote: > @@ -23,6 +23,11 @@ MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS) > # Compute GNU_TARGET_NAME > GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI) > > +# Blackfin FLAT needs uclinux > +ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy) > +GNU_TARGET_NAME=$(ARCH)-buildroot-uclinux-$(LIBC)$(ABI) > +endif Isn't the 'uclinux' OS part something that is not specific to Blackfin? I.e, should this rather be something like: ifeq ($(BR2_USE_MMU),y) OS=linux else OS=uclinux endif GNU_TARGET_NAME=$(ARCH)-buildroot-$(OS)-$(LIBC)$(ABI) Thanks! Thomas
On 07/21/2013 12:38 PM, Thomas Petazzoni wrote: > Isn't the 'uclinux' OS part something that is not specific to Blackfin? > I.e, should this rather be something like: > > ifeq ($(BR2_USE_MMU),y) > OS=linux > else > OS=uclinux > endif In theory, yes. For blackfin, doesn't seem so. Seems (caveat: no access to blackfin.uclinux.org IF it's even documented, bizarre patches and so on) that for blackfin being MMU-less across the whole arch it's used to select from FDPIC and FLAT*. Again going to the source (gcc to be precise) we see that crtreloc.o (for FDPIC targets) is used in gcc/config/bfin/linux.h (linux tuple), and crtlibid (for FLAT targets, internal to gcc) is used in gcc/config/bfin/uclinux.h crtreloc.o is generated by uClibc only when doing FDPIC, and used by 'linux', and 'uclinux' doesn't do FDPIC (no linking with crtreloc.o) hence FLAT. Regards.
Dear Gustavo Zacarias, On Sat, 20 Jul 2013 09:52:14 -0300, Gustavo Zacarias wrote: > Blackfin for FDPIC targets uses *-linux-*, however for FLAT targets it > # Compute GNU_TARGET_NAME > GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI) > > +# Blackfin FLAT needs uclinux > +ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy) > +GNU_TARGET_NAME=$(ARCH)-buildroot-uclinux-$(LIBC)$(ABI) > +endif I've changed that to keep a single GNU_TARGET_NAME definition and to use a new TARGET_OS variable, like the existing LIBC and ABI variables we had. Thomas
diff --git a/package/Makefile.in b/package/Makefile.in index a23eb41..acbc453 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -23,6 +23,11 @@ MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS) # Compute GNU_TARGET_NAME GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI) +# Blackfin FLAT needs uclinux +ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy) +GNU_TARGET_NAME=$(ARCH)-buildroot-uclinux-$(LIBC)$(ABI) +endif + ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) LIBC=uclibc else
Blackfin for FDPIC targets uses *-linux-*, however for FLAT targets it needs *-uclinux-* in order for gcc to build properly. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- package/Makefile.in | 5 +++++ 1 file changed, 5 insertions(+)