diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-02-25 15:03:10 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-02-25 15:03:10 +0000 |
commit | 99eb5852f53bb940a8004c5197159199b22d0d39 (patch) | |
tree | f877349407b2e0e1b59fca786a0b37e1caf0b5c2 /make | |
parent | Patches rtems-rc-4.5.0-1.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-99eb5852f53bb940a8004c5197159199b22d0d39.tar.bz2 |
Patches rtems-rc-4.5.0-1.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that fixes numerous miscellaneous issues most related to the debug and
profile build stanzas:
Fix for the "make debug" (1) issue and an analogous issue with "make
profile" (untested).
* Fixes to mcp750.cfg (make debug, directories) (2)
* Updates/minor fixes for shgen (3)
* Updates some custom/*.cfgs to use $(LINK.c) instead of $(CC)
* Leftovers from rtems-rc-4.5.0-[0|1].diff which somehow did not make it
into cvs.
* Cleanups to the perlscripts below tools/update/
* Some unsorted minor fixes.
Footnotes/Remarks:
(1) Tested for all m68k, sh, sparc, unix and selected i386, ppc BSPs.
Known problems: I can't build the debug variant for the m68k/mvme162 and
m68k/mvme162lx (segmentation fault - signal 11 :)
(2) Tested by building the BSP, but I doubt the debug-variant is
functional. The flags used for the debug variant should be checked by
knowledgeable persons and probably at runtime #:o)
(3) I have updated shgen to use getopt_long (it should fall back to
getopt if not available), enhanced the options, cleaned up some minor
tweaks and added help2man support (rough automatic man-page generation).
Technical notes:
* make debug and make profile now work similar in target Makefile.ams as
they did in old autoconf-Makefile.ins using leaf.cfg. Unlike the rules
in leaf.cfg these Makefile.am also recurse once on themselves in
directory Makefiles before or after recursing into subdirectories, not
only in leaf-directories.
To implement this behavior, I renamed the former automake/local.am into
automake/host.am and extended local.am to provide this recursion.
I.e. host.am implements the non-self-recursive variant, while local.am
now implements the self-recursive behavior.
=> all Makefile.ams exploiting build-variants are supposed to include
local.am
=> all Makefile.ams not exploiting build-variants should include host.am
=> Rules of thumb:
- Only include one of both, either local.am or host.am into a
Makefile.am.
-Target-Makefile.ams should include local.am
-Host-Makefile.ams should include host.am (Probably, you now understand
the naming)
- There are exceptions from these rules :)
* Now, make debug|profile|all are independent of each other. However,
each of them however triggers preinstall.
* "make install" still decends into the subdirectories but does not
trigger "all|profile|debug|preinstall" in target Makefile.am anymore.
Besides triggering "install"-rules in some selected Makefile.ams, it
only packs $(PROJECT_ROOT) into a tarballs and unpacks it to $(prefix).
=> "make install" alone is not enough to install RTEMS, now use
make RTEMS_BSP=<bsps> [all] [debug] [profile]
make RTEMS_BSP=<bsp> install
I consider this to be a step back wrt. exploiting automake mechanisms,
and expect this to be reverted if we abandon building target variants in
favour of the standard convention of optionally overriding flags from
the command line (i.e. instead of "make debug", GNU standards favor
"make CFLAGS=<options> --prefix=<location>")
Diffstat (limited to 'make')
-rw-r--r-- | make/Makefile.am | 2 | ||||
-rw-r--r-- | make/Templates/Makefile.am | 2 | ||||
-rw-r--r-- | make/compilers/Makefile.am | 2 | ||||
-rw-r--r-- | make/custom/Makefile.am | 2 | ||||
-rw-r--r-- | make/custom/efi68k.cfg | 4 | ||||
-rw-r--r-- | make/custom/mcp750.cfg | 27 | ||||
-rw-r--r-- | make/custom/ods68302.cfg | 8 | ||||
-rw-r--r-- | make/host.cfg.in | 6 | ||||
-rw-r--r-- | make/leaf.cfg | 6 |
9 files changed, 30 insertions, 29 deletions
diff --git a/make/Makefile.am b/make/Makefile.am index b463e14b0e..6f57121002 100644 --- a/make/Makefile.am +++ b/make/Makefile.am @@ -23,4 +23,4 @@ compilers ## ------------------------------------------------------- include $(top_srcdir)/automake/subdirs.am -include $(top_srcdir)/automake/local.am +include $(top_srcdir)/automake/host.am diff --git a/make/Templates/Makefile.am b/make/Templates/Makefile.am index 28136f27b1..254060d151 100644 --- a/make/Templates/Makefile.am +++ b/make/Templates/Makefile.am @@ -12,4 +12,4 @@ Makefile.dir \ Makefile.leaf \ Makefile.lib -include $(top_srcdir)/automake/local.am +include $(top_srcdir)/automake/host.am diff --git a/make/compilers/Makefile.am b/make/compilers/Makefile.am index cfc9545c90..0c97a6b2ef 100644 --- a/make/compilers/Makefile.am +++ b/make/compilers/Makefile.am @@ -10,4 +10,4 @@ gcc-portsw.cfg \ gcc-target-default.cfg ## ------------------------------------------------------- -include $(top_srcdir)/automake/local.am +include $(top_srcdir)/automake/host.am diff --git a/make/custom/Makefile.am b/make/custom/Makefile.am index 049a3d0d8d..3987a4c680 100644 --- a/make/custom/Makefile.am +++ b/make/custom/Makefile.am @@ -55,4 +55,4 @@ simhppa.cfg \ ts_386ex.cfg ## ------------------------------------------------------- -include $(top_srcdir)/automake/local.am +include $(top_srcdir)/automake/host.am diff --git a/make/custom/efi68k.cfg b/make/custom/efi68k.cfg index af1c1b3f3f..da24446a9a 100644 --- a/make/custom/efi68k.cfg +++ b/make/custom/efi68k.cfg @@ -55,11 +55,11 @@ define make-exe endef else define make-exe - $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \ + $(LINK.c) $(LDLIBS) -o $(basename $@).nxe \ $(LINK_OBJS) $(LINK_LIBS) $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \ - $(PACKHEX) > $(basename $@).exe + $(PACKHEX) > $@ $(NM) -g -n $(basename $@).nxe > $(basename $@).num $(SIZE) $(basename $@).nxe endef diff --git a/make/custom/mcp750.cfg b/make/custom/mcp750.cfg index e2446cd902..7d5501fa51 100644 --- a/make/custom/mcp750.cfg +++ b/make/custom/mcp750.cfg @@ -68,7 +68,7 @@ endef # NOTE : cheking egcc 1.1.1 source code shows that the last know processor # is the 604 model and that this is the default generation option. # -# CPU_CFLAGS = -mcpu=750 +CPU_CFLAGS = -mcpu=750 # optimize flag: typically -0, could use -O4 or -fast # -O4 is ok for RTEMS @@ -78,9 +78,14 @@ endef # As far as I know, small data are pointer impose a very specific compliation # model => not used. # Currently the sdata2 and sbss2 sections are empty => r2 is not used... -CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align -mcpu=750 +CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align #CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions -fvolatile-global -fvolatile -mstrict-align -mcpu=750 +# debug flags: typically none, but at least -O1 is required due to this +# BSP using inlined code +CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align + + # The following is a ld command file which works without using the # -specs system in gcc 2.8. IT HAS NEVER BEEN TESTED WITH THIS BSP!!! # $(LD) $(XLDFLAGS) -T $(LINKCMDS) \ @@ -94,18 +99,18 @@ CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align -mcpu=750 # $(LD_LIBS) \ # -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\) define make-exe - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS) + $(LINK.c) $(LDLIBS) -o $@ $(LINK_OBJS) $(LINK_LIBS) $(NM) -g -n $@ > $(basename $@).num $(SIZE) $@ + test -d ${PROJECT_RELEASE}/bin || mkdir ${PROJECT_RELEASE}/bin $(CP) $@ $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader/$(ARCH); \ - cd $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader; \ - $(MAKE) bootloader BINARY_LOADED=$(basename $@).exe; \ - COMPLETE_FILE_NAME=$(basename $@).exe ;\ - echo $${COMPLETE_FILE_NAME} ;\ - FILE_NAME=`basename $${COMPLETE_FILE_NAME}` ;\ - echo $${FILE_NAME} ;\ - mkdir -p $(PROJECT_ROOT)/mcp750/bin ;\ - $(CP) bootloader $(PROJECT_ROOT)/mcp750/bin/$${FILE_NAME} + ( cd $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader; \ + $(MAKE) bootloader BINARY_LOADED=$@; ) + f=`basename $@ .exe`; \ + cp $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader/bootloader \ + ${PROJECT_RELEASE}/bin/$${f}$(LIB_VARIANT).exe \ + && chmod 755 \ + ${PROJECT_RELEASE}/bin/$${f}$(LIB_VARIANT).exe endef # Miscellaneous additions go here diff --git a/make/custom/ods68302.cfg b/make/custom/ods68302.cfg index d8e46eb6a1..229f9b0d4b 100644 --- a/make/custom/ods68302.cfg +++ b/make/custom/ods68302.cfg @@ -71,12 +71,12 @@ define make-exe endef else define make-exe - $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \ + $(LINK.c) $(LDLIBS) \ -Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \ - -o $(basename $@).exe \ + -o $@ \ $(LINK_OBJS) $(LINK_LIBS) - $(NM) -g -n $(basename $@).exe > $(basename $@).num - $(SIZE) $(basename $@).exe + $(NM) -g -n $@ > $(basename $@).num + $(SIZE) $@ endef endif # Miscellaneous additions go here diff --git a/make/host.cfg.in b/make/host.cfg.in index cae07de613..15f5a11256 100644 --- a/make/host.cfg.in +++ b/make/host.cfg.in @@ -26,8 +26,6 @@ LN=@LN@ MKDIR=mkdir CHMOD=chmod SED=sed -# Anybody using this? -# M4=@M4@ # Global tools ifndef PACKHEX @@ -74,7 +72,3 @@ INSTDATAFLAGS = -m 0644 INSTLIBFLAGS = -m 0644 INSTDIRFLAGS = -m 0755 -d INSTINCFLAGS = -m 0644 - -ifndef INSTALL_DATA -INSTALL_DATA = $(INSTALL) $(INSTDATAFLAGS) -endif diff --git a/make/leaf.cfg b/make/leaf.cfg index 88f708cac8..a8b90ee1f1 100644 --- a/make/leaf.cfg +++ b/make/leaf.cfg @@ -42,6 +42,7 @@ ifeq (${DEPEND},$(wildcard ${DEPEND})) include ${DEPEND} # pull in dependencies if they exist endif +ifndef AUTOMAKE # # Builtin targets for compilation variants # @@ -56,6 +57,7 @@ profile: MAKEFILE=$(MAKEFILE) "ARCH=o-profile" \ "CFLAGS_PROFILE=$(CFLAGS_PROFILE_V)" \ "LDFLAGS_PROFILE=$(LDFLAGS_PROFILE_V)" $(TARGET_VA) +endif # # VARIANT_VA will convert our ${ARCH} back into "" or "debug" or "profile". @@ -106,15 +108,15 @@ clean-am: clean-generic distclean-am: distclean-generic clean-am -$(RM) -r $(CLOBBER_OS) $(CLOBBER_CC) $(CLOBBER_DEPEND) +ifndef AUTOMAKE preinstall-am: preinstall: preinstall-am -ifndef AUTOMAKE distclean: distclean-am -$(RM) ./config.status clean: clean-am -endif .PHONY: distclean distclean-am .PHONY: clean clean-am +endif |