Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

why has two compilers

Hi hippo.

in staging_dir , It has nios2-linux-gcc and nios2-linux-uclibc-gcc,Why?

Could you tell me which is the default apps's library?

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by zzh@May 25 2006, 11:08 AM

    hi hippo.

    in staging_dir , it has nios2-linux-gcc and nios2-linux-uclibc-gcc,why?

    could you tell me which is the default apps's library?

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=15563)

    --- quote end ---

    --- Quote End ---

    nios2-linux-gcc is a symbolic link (similar to short cut in Windows) , pointed to the real nios2-linux-uclibc-gcc.

    The default apps library is uClibc&#39;s libc, so you don&#39;t need -lc .

    If you use math, you need -lm .

    If you use pthread, you need -lpthread .

    If you use crypt, you need -lcrypt .

    .....etc.

    You will need those include headers, too.

    The order of librarys is important, the linker will search only one pass by default.

    The default include dir search path is staging_dir/include .

    The default library search path is staging_dir/lib .