Hello everyone,

As part of another project, I've been working on updating the Blackfin
toolchain used in T2. I've managed to bring it up a few thousand
revisions which is nice...but, as you can imagine, there have been
some changes which need accounting for. The main problem is that now
building the Blackfin userspace and kernel requires 2 separate
toolchains. This is due to those binaries using two different formats,
FLAT vs FDPIC. Wahooo...

The two tuples are: bfin-t2-linux-gnu and bfin-uclinux. The former
builds all userspace binaries just fine. The latter is the problem
which I have solved via the following:

1. The toolchain is added to the build environment before the kernel
is to be built via a package (blackfin/toolchain-bfin-uclinux) which
contains binaries of that toolchain directly from Analog devices.
2. The binaries are copied into the appropriate toolchain location in the build.
3. I manually edit archtest.out, changing arch_target from
bfin-t2-linux-gnu to bfin-uclinux
4. Kernel builds fine...tests on a real 527 based board are running fine as well

The problem here is the very ugly step #3. I have attempted to
automate it with this parse-config script:

-----------------------------
# architecture/blackfin/parse-config

if [ "$pkg" = linux26 ]; then
        arch_target=bfin-uclinux
        archprefix="${arch_target}-"
        export CC="${archprefix}cc"     CXX="${archprefix}c++"          
CPP="${archprefix}cpp"
        export AS="${archprefix}as"     STRIP="${archprefix}strip"      
OBJCOPY="${archprefix}objcopy"
        export LD="${archprefix}ld"     GASP="${archprefix}gasp"        
OBJDUMP="${archprefix}objdump"
        export AR="${archprefix}ar"     RANLIB="${archprefix}ranlib"
        export NM="${archprefix}nm"     KCC="${archprefix}kcc"
        export F77="${archprefix}f77"
        set_confopt
fi
-----------------------------

Changing things in this manner does not invoke the wrapper properly
when compiling.

For comparison, here is the output when:
 - directly modifying archtest.out (http://pastebin.ca/1549049)
 - with my parse-config script (http://pastebin.ca/1549052)


Many thanks for any feedback on this! Let me know if I can provide
additional debug output.

Regards,
-Michael I.



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2

Reply via email to