[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Include file paths



> "Hennenfent, Nick {AVL~Roswell}" wrote:
> 
> Can anyone tell me how RTEMS specifies include file paths?
> I see where PROJECT_INCLUDE gets defined but how does
> this get seen by gcc??? I am most familiar with using the -I
> argument for gcc.

Ralf will probably weigh in on this one as well. :)

RTEMS uses the -B option to make gcc think that RTEMS .h files
are part of its standard ones.  We use the -B in conjunction
with the -specs option to simplify the arguments required
to compile and link an application for a BSP.  The -specs
option did not exist prior to gcc 2.8.0 and before that
we explicitly specified the include path this way:

# Ask gcc where it finds its own include files
GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include
$(GCCSED))

CPPFLAGS += -nostdinc \
  -I$(PROJECT_INCLUDE) \
  -I$(GCC_INCLUDE) \
  -I$(RTEMS_LIBC_DIR)/sys-include \
  -I$(RTEMS_LIBC_DIR)/include

This says  RTEMS .h's for this BSP first, then the compiler files,
then the C library.
 
> Thanks

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985