Hi, I'm trying to build pjsip for nios2 target. I've added nios2 to config.sub and pjlib/include/pj/config.h. It compiles without error. But I want to add a link option -elf2flt to get a bflt format executable. I create a file build/m-nios2.mak. export M_CFLAGS := $(CC_DEF)PJ_M_NIOS2=1 export M_CXXFLAGS := export M_LDFLAGS := -elf2flt export M_SOURCES := but it still produces ELF executables. Do I miss something here? I find it ok to add a line in user.mak export LDFLAGS += -elf2flt and it works as I expect. I just want to know why the first method doesn't work. Thanks. below is the changes I made -------------------- svn diff -------------------- Index: config.sub =================================================================== --- config.sub (revision 1947) +++ config.sub (working copy) @@ -1113,6 +1113,10 @@ pmac | pmac-mpw) basic_machine=powerpc-apple ;; + nios2*) + basic_machine=nios2-altera +# os=-linux + ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; Index: pjlib/include/pj/config.h =================================================================== --- pjlib/include/pj/config.h (revision 1947) +++ pjlib/include/pj/config.h (working copy) @@ -251,6 +251,18 @@ # define PJ_IS_LITTLE_ENDIAN 0 # define PJ_IS_BIG_ENDIAN 1 +#elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \ + defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2) + /* + * Nios2, little endian + */ +# undef PJ_M_NIOS2 +# define PJ_M_NIOS2 1 +# define PJ_M_NAME "nios2" +# define PJ_HAS_PENTIUM 0 +# define PJ_IS_LITTLE_ENDIAN 1 +# define PJ_IS_BIG_ENDIAN 0 + #else # error "Please specify target machine." #endif -- F -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080507/49fd72d3/attachment.html