source: rtems/make/custom/mvme167.cfg @ 7d7b2a3

4.104.114.84.95
Last change on this file since 7d7b2a3 was 7d7b2a3, checked in by Joel Sherrill <joel.sherrill@…>, on 02/24/99 at 15:46:25

Patch from Charles Gauthier <Charles.Gauthier@@iit.nrc.ca> to address
FP issues on this target:

The default variants of libc, libm and libgcc assume that a 68881
coprocessor is present. Without the FPSP, any floating point operation,
including printf() with a "%f" format specifier, is likely to cause an
unimplemented instruction exception.

The FPSP works with the default variants of libc, libm and libgcc. It does not
work in conjunction with the msoft-float variants. The paranoia test goes into
an infinite loop at milestone 40. I am guessing that floor() is returning an
incorrect value.

The msoft-float variants of libc, libm and libgcc appear to do floating point
I/O properly. They only failed in paranoia. Offhand, I can't think of why they
would conflict with the FPSP, so I think that there is something wrong with the
msoft-float code. It might be my installation.

Given my experiences, I decided to install the FPSP in bsp_start(), and to link
against the default variants of libc, libm and libgcc. This causes the
executables to increase in size by about 60 KB. The README file and the
mvme167.cfg specify how to remove the FPSP, and how to link against the
msoft-float variants of the libraries. This is not what Eric Norum had done: on
my host, his gen68360_040 port links RTEMS code with the msoft-float variants
of libc and libm, and the default variant of libgcc. In this configuration, the
output of printf() with "%f" is garbage on my target.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1#
2#  Config file for the mvme167 BSP
3#
4#  $Id$
5#
6
7RTEMS_CPU=m68k
8RTEMS_CPU_MODEL=m68040
9
10include $(RTEMS_ROOT)/make/custom/default.cfg
11
12# This is the actual bsp directory used during the build process.
13RTEMS_BSP_FAMILY=mvme167
14
15#
16#  This contains the compiler options necessary to select the CPU model
17#  and (hopefully) optimize for it.
18#
19
20CPU_CFLAGS = -m68040
21
22# optimize flag: typically -O, could use -O4 or -fast
23# -O4 is ok for RTEMS
24CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
25
26# This target does NOT support the TCP/IP stack (yet) so ignore requests
27# to enable it.
28HAS_NETWORKING=no
29
30#  This section makes the target dependent options file.
31#  NDEBUG (C library)
32#     if defined asserts do not generate code.  This is commonly used
33#     as a command line option.
34#
35#  RTEMS_TEST_NO_PAUSE (RTEMS tests)
36#     do not pause between screens of output in the rtems tests
37#
38#  RTEMS_DEBUG (RTEMS)
39#     If defined, debug checks in RTEMS and support library code are enabled.
40
41define make-target-options
42        @echo "/* #define NDEBUG 1 */ "                     >>$@
43        @echo "#define RTEMS_TEST_NO_PAUSE 1"               >>$@
44        @echo "/* #define RTEMS_DEBUG  1 */"                >>$@
45endef
46
47# Here is the rule to actually build a $(ARCH)/foo.exe
48# It also builds $(ARCH)/foo.nm
49# Usage ref: src/tests/sptest/sp1/Makefile
50#
51# We use TFTP to transfer files to the MVME167. We generate binary files
52# rather than S-records. We skip the header during downloads.
53
54# The following are definitions of make-exe which will work using ld as
55# is currently required.  It is expected that as of gcc 2.8, the end user
56# will be able to override parts of the compilers specs and link using gcc.
57
58ifeq ($(RTEMS_USE_GCC272),yes)
59
60# The MC68040 does not implement all MC68881/MC68882 instructions, so use
61# either the gcc floating-point software support (msoft-float libraries), or
62# use the Motorola FPSP floating-point emulator in
63#   rtems/c/src/lib/libcpu/m68k/m68040/fpsp
64# The default is to use the FPSP.
65# To use the msoft-float libraries, uncomment the three lines below.
66# You then should comment the M68KFPSPInstallExceptionHandlers() statement
67# in rtems/c/src/lib/libbsp/m68k/mvme167/startup/bststart.c in bsp_start().
68# Floating-point support will then be limited. See the mvme167 README file
69# for more details.
70
71# LIBC_LIBC = $(RTEMS_LIBC_DIR)/lib/msoft-float/libc.a
72# LIBC_LIBM = $(RTEMS_LIBC_DIR)/lib/msoft-float/libm.a
73# LIBGCC = $(shell $(CC) -msoft-float -print-libgcc-file-name)
74
75define make-exe
76        $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
77            $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
78        $(NM) -g -n $(basename $@).exe > $(basename $@).nm
79        $(SIZE) $(basename $@).exe
80endef
81else
82define make-exe
83        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
84            $(LINK_OBJS) $(LINK_LIBS)
85        $(NM) -g -n $(basename $@).exe > $(basename $@).nm
86        $(SIZE) $(basename $@).exe
87endef
88endif
89
90# Miscellaneous additions go here
Note: See TracBrowser for help on using the repository browser.