Hi Philippe,

Since bfin-gcc release 2006-R1, bfin-gcc begins to support "FDPIC" format besides "BFLT".
"FDPIC" supports shared library. Bellow patch makes it possible to build xenomai-2.2.5 in FDPIC
format. In docs.blackfin.uclinux.org/doku.php?id=adeos there is step by step guide.

Although it is still possible to build xenomai as BFLT in this way:

configure --host=bfin CC=bfin-uclinux-gcc LDFLAGS=-Wl,-elf2flt --disable-shared

There will be error:

 bfin-uclinux-gcc -Wl,-elf2flt -o cyclictest -Wl,@/home/adam/workspace/xenomai/xenomai_src/xenomai- 2.2.5/src/skins/posix/posix.wrappers cyclictest-cyclictest.o  ../../skins/posix/.libs/libpthread_rt.a -lpthread -lrt
/home/adam/workspace/toolchain/1110/bfin-uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/../../../../bfin-uclinux/lib/libpthread.a( specific.o): In function `_pthread_key_delete':
(.text+0x24e): undefined reference to `___wrap_pthread_mutex_lock'
/home/adam/workspace/toolchain/1110/bfin-uclinux/bin/../lib/gcc/bfin-uclinux/4.1.1/../../../../bfin-uclinux/lib/libpthread.a( specific.o): In function `_pthread_key_delete':

And this can be fixed like:

bfin-uclinux-gcc -Wl,-elf2flt -o cyclictest -Wl,@/home/adam/workspace/xenomai/xenomai_src/xenomai-2.2.5/src/skins/posix/posix.wrappers cyclictest-cyclictest.o -lpthread -lrt ../../skins/posix/.libs/libpthread_rt.a

But using "FDPIC" format is suggested.

Thanks,

-Yi
diff -Nur xenomai-2.2.5.orig/configure xenomai-2.2.5/configure
--- xenomai-2.2.5.orig/configure	2006-11-05 23:31:46.000000000 +0800
+++ xenomai-2.2.5/configure	2006-11-14 11:15:47.000000000 +0800
@@ -21163,9 +21163,6 @@
         ;;
  blackfin)
 	XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -pipe"
-	# uClinux wants flat format executables; assume that our
-	# source format is ELF.
-	XENO_USER_LDFLAGS="-Wl,-elf2flt"
         ;;
  arm)
 	XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -pipe"
diff -Nur xenomai-2.2.5.orig/configure.in xenomai-2.2.5/configure.in
--- xenomai-2.2.5.orig/configure.in	2006-09-24 22:50:10.000000000 +0800
+++ xenomai-2.2.5/configure.in	2006-11-14 11:15:20.000000000 +0800
@@ -536,9 +536,6 @@
         ;;
  blackfin)
 	XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -pipe"
-	# uClinux wants flat format executables; assume that our
-	# source format is ELF.
-	XENO_USER_LDFLAGS="-Wl,-elf2flt"
         ;;
  arm)
 	XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -pipe"
diff -Nur xenomai-2.2.5.orig/README.INSTALL xenomai-2.2.5/README.INSTALL
--- xenomai-2.2.5.orig/README.INSTALL	2006-07-18 21:19:17.000000000 +0800
+++ xenomai-2.2.5/README.INSTALL	2006-11-14 11:13:06.000000000 +0800
@@ -270,12 +270,9 @@
 $ make ARCH=bfinnommu CROSS_COMPILE=bfin-uclinux- xconfig/gconfig/menuconfig # select the kernel and Xenomai options
 $ make ARCH=bfinnommu CROSS_COMPILE=bfin-uclinux- bzImage modules # then install as needed
 $ mkdir $build_root && cd $build_root
-$ $xenomai_root/configure --build=i686-pc-linux-gnu --host=bfinnommu-unknown-linux-gnu CC=bfin-uclinux-gcc CXX=bfin-uclinux-gcc AR=bfin-uclinux-ar LD=bfin-uclinux-ld --disable-shared
+$ $xenomai_root/configure --host=bfin CC=bfin-uclinux-gcc CFLAGS=-mfdpic 
 $ make install
 
-CAUTION: note the --disabled-shared flag configuring out the shared
-library support, which is unavailable for this architecture.
-
 You may also want to have a look at this hands-on description about
 configuring and building a Xenomai system for the Blackfin
 architecture: http://docs.blackfin.uclinux.org/doku.php?id=adeos

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to