@@ -329,6 +329,8 @@ ifneq ($(PACKAGE_OVERRIDE_FILE),)
-include $(PACKAGE_OVERRIDE_FILE)
endif
+include arch/Makefile.in
+
include package/*/*.mk
include boot/common.mk
@@ -62,6 +62,27 @@ config BR2_bf561
bool "bf561"
endchoice
+config BR2_BFIN_INSTALL_FDPIC_SHARED
+ depends on BR2_bfin && !BR2_BINFMT_FDPIC
+ bool "Install FDPIC shared libraries"
+ default y
+ help
+ Blackfin Linux kernel supports running both FDPIC and FLAT applications
+ concurrently if the binary format specific libraries installed properly.
+ This option allow developer to install FDPIC libraries into a buildroot
+ rootfs image built with binary format macro other than BR2_BINFMT_FDPIC.
+
+config BR2_BFIN_INSTALL_FLAT_SHARED
+ depends on BR2_bfin && && !BR2_BINFMT_FLAT_SHARED
+ bool "Install FLAT shared libraries"
+ default y
+ help
+ Blackfin Linux kernel supports running both FDPIC and FLAT applications
+ concurrently if the binary format specific libraries installed properly.
+ This option allow developer to install FLAT libraries into a buildroot
+ rootfs image built with binary format macro other than
+ BR2_BINFMT_FLAT_SHARED.
+
config BR2_ARCH
default "bfin"
new file mode 100644
@@ -0,0 +1,5 @@
+# The architecture specific Makefile.in.$ARCH should be included only
+# when the arch macro is selected.
+ifeq ($(BR2_bfin),y)
+include arch/Makefile.in.bfin
+endif
new file mode 100644
@@ -0,0 +1,26 @@
+TARGETS_BFIN-$(BR2_BFIN_INSTALL_FDPIC_SHARED) += target-shared-libs-fdpic
+TARGETS_BFIN-$(BR2_BFIN_INSTALL_FLAT_SHARED) += target-shared-libs-flat
+TARGETS += $(TARGETS_BFIN-y)
+
+CROSS_COMPILE_SHARED_FDPIC ?= bfin-linux-uclibc-
+target-shared-libs-fdpic:
+ set -e; \
+ t=`$(CROSS_COMPILE_SHARED_FDPIC)gcc $(CPUFLAGS) -print-file-name=libc.a`; \
+ t=`dirname $$t`/../..; \
+ for i in $$t/lib/*so*; do \
+ i=`readlink -f "$$i"`; \
+ soname=`$(CROSS_COMPILE_SHARED_FDPIC)readelf -d "$$i" | sed -n '/(SONAME)/s:.*[[]\(.*\)[]].*:\1:p'`; \
+ $(INSTALL) -D $$i $(TARGET_DIR)/lib/$$soname; \
+ done
+
+CROSS_COMPILE_SHARED_FLAT ?= bfin-uclinux-
+target-shared-libs-flat:
+ set -e; \
+ t=`$(CROSS_COMPILE_SHARED_FLAT)gcc $(CPUFLAGS) -mid-shared-library -print-file-name=libc`; \
+ if [ -f $$t -a ! -h $$t ] ; then \
+ $(INSTALL) -D $$t $(TARGET_DIR)/lib/lib1.so; \
+ fi
+
+ifneq ($(BR2_USE_MMU), y)
+TARGET_CFLAGS += -D__uClinux__
+endif
@@ -168,6 +168,8 @@ TARGET_EXCEPTIONS = [
"erase-fakeroots",
"target-generic-hostname",
"target-root-passwd",
+ "target-shared-libs-fdpic",
+ "target-shared-libs-flat",
]
# In full mode, start with the result of get_targets() to get the main