Error in Makefile.am?

Leon Pollak leonp at plris.com
Thu Mar 27 10:09:09 UTC 2008


Hello, again.

I think there is an error in the file Makefile.am in the lib/libcpu/powerpc 
directory.

The 4.7 version contained the following:

if OLD_EXCEPTIONS
include_rtems_score_HEADERS = old-exceptions/rtems/score/ppc_offs.h
noinst_PROGRAMS = old-exceptions/rtems-cpu.rel
old_exceptions_rtems_cpu_rel_SOURCES = old-exceptions/cpu.c \
    old-exceptions/cpu_asm.S old-exceptions/rtems/score/ppc_offs.h
old_exceptions_rtems_cpu_rel_CPPFLAGS = $(AM_CPPFLAGS) \
    -I$(srcdir)/old-exceptions
old_exceptions_rtems_cpu_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
else
noinst_PROGRAMS = new-exceptions/rtems-cpu.rel
new_exceptions_rtems_cpu_rel_SOURCES = new-exceptions/cpu.c \
    new-exceptions/cpu_asm.S
new_exceptions_rtems_cpu_rel_CPPFLAGS = $(AM_CPPFLAGS)
new_exceptions_rtems_cpu_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif

Here, for the new exception (my case) only the cpu.c. and spu_asm.s were 
taken, while all the rest was taken from the corresponding CPU directory, 
including the headre file raw_exception.h.
------------
But the 4.8.0 version has changed this code:

if OLD_EXCEPTIONS
include_rtems_score_HEADERS = old-exceptions/rtems/score/ppc_offs.h
noinst_PROGRAMS = old-exceptions/rtems-cpu.rel
old_exceptions_rtems_cpu_rel_SOURCES = old-exceptions/cpu.c \
    old-exceptions/cpu_asm.S old-exceptions/rtems/score/ppc_offs.h
old_exceptions_rtems_cpu_rel_CPPFLAGS = $(AM_CPPFLAGS) \
    -I$(srcdir)/old-exceptions
old_exceptions_rtems_cpu_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
else
noinst_PROGRAMS = new-exceptions/rtems-cpu.rel
new_exceptions_rtems_cpu_rel_SOURCES = new-exceptions/cpu.c \
    new-exceptions/cpu_asm.S
new_exceptions_rtems_cpu_rel_CPPFLAGS = $(AM_CPPFLAGS)
new_exceptions_rtems_cpu_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

if !mpc5xx       <--------------------------------!!!!!!!!
include_libcpu_HEADERS += new-exceptions/raw_exception.h
noinst_PROGRAMS += new-exceptions/raw_exception.rel
new_exceptions_raw_exception_rel_SOURCES = new-exceptions/raw_exception.c \
    new-exceptions/asm_utils.S
new_exceptions_raw_exception_rel_CPPFLAGS = $(AM_CPPFLAGS)
new_exceptions_raw_exception_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
---
The last "if !mpc5xx" IMHO is erroneous - it installs the header file which 
does not correspond to the CPU specific raw_exception.c and therefore the 
compilation fails in my case of mpc8260.
I am not sure about the file new-exceptions/raw_exception.c, I think it is 
also irrelevant and should not be taken...
----

Can some configuration gurus comment this?

Thanks.
-- 
Leon



More information about the users mailing list