Commit Graph

53 Commits

Author SHA1 Message Date
Joel Sherrill
c2646c880e 2002-11-17 Joel Sherrill <joel@OARcorp.com>
* leaf.cfg, main.cfg, compilers/gcc-target-default.cfg: Make
	build variants work for user applications post install.
2002-11-18 00:42:53 +00:00
Ralf Corsepius
4d19fd5ccc 2002-11-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Add compilers/*.
	* compilers/Makefile.am: Remove.
	* lib.cfg: Remove.
	* directory.cfg: Remove.
	* README: Remove.
2002-11-12 09:28:51 +00:00
Joel Sherrill
ccf2cfd97b 2002-09-13 Joel Sherrill <joel@OARcorp.com>
* Part of addressing PR281.
	* main.cfg: Added recognition of VARIANT=DEBUG on command line.
	* compilers/gcc-target-default.cfg: Removed remaining support for
	RTEMS_USE_GCC272 and RTEMS_LIBC_DIR as well as added -qrtems_debug
	as one of the LDFLAGS when the debug variant is specified.
2002-09-13 13:39:52 +00:00
Joel Sherrill
8b14331aa7 2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Templates/Makefile.am: Remove AUTOMAKE_OPTIONS.
	* Makefile.am: Remove AUTOMAKE_OPTIONS.
	* compilers/Makefile.am: Remove AUTOMAKE_OPTIONS.
	* custom/Makefile.am: Remove AUTOMAKE_OPTIONS.
2002-03-28 00:54:29 +00:00
Joel Sherrill
6703f877a2 2002-01-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* compilers/gcc-target-default.cfg: Add missing \.
	Reported by Ilya Alexeev <ilya@continuum.ru>.
2002-01-22 17:35:22 +00:00
Joel Sherrill
88f60e26a8 2002-02-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* custom/genmongoosev.cfg: Remove -g from CPU_CFLAGS.
	* custom/h8sim.cfg: Remove -g from CPU_CFLAGS. Remove GCC272
	support.
	* custom/jmr3904.cfg: Remove -g from CPU_CFLAGS. Remove GCC272.
2002-01-06 20:09:43 +00:00
Joel Sherrill
93f79c0f8b 2001-05-07 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* leaf.cfg: Remove CFLAGS_DEBUG_OPTIMIZE_V.
	* compilers/gcc-no_bsp.cfg: Remove CPP_CC_FLAGS.
	* compilers/gcc-portsw.cfg: Remove CPP_CC_FLAGS.
	* compilers/gcc-target-default.cfg: Remove *_DEBUG_OPTIMIZE_*-flags,
	remove unused flags, remove -ansi from CPP.
	* custom/eth_comm.cfg: Remove CPU_DEFINES.
	* custom/sim68000.cfg: Remove CPU_DEFINES.
2001-05-08 22:59:25 +00:00
Joel Sherrill
65e6b542fa 2001-04-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* compilers/gcc-no_bsp.cfg: Remove -ansi -fasm.
	* compilers/gcc-default.cfg: Dito.
	* compilers/gcc-portsw.cfg: Remove -Hansi.
	* custom/posix.cfg: Remove inclusion of target.cfg.
	* custom/simhppa.cfg: Remove -ansi -fasm.
2001-04-26 16:41:44 +00:00
Joel Sherrill
3a410c5691 2000-10-18 Joel Sherrill <joel@OARcorp.com>
* compilers/gcc-portsw.cfg: Use gcc style flags.
2000-10-18 13:05:10 +00:00
Joel Sherrill
8ef38186fa Patch from John Cotton <john.cotton@nrc.ca>, Charles-Antoine Gauthier
<charles.gauthier@iit.nrc.ca>, and Darlene A. Stewart
<Darlene.Stewart@nrc.ca> to add support for a number of very
significant things:

  + BSPs for many variations on the Motorola MBX8xx board series
  + Cache Manager including initial support for m68040
    and PowerPC
  + Rework of mpc8xx libcpu code so all mpc8xx CPUs now use
    same code base.
  + Rework of eth_comm BSP to utiltize above.

John reports this works on the 821 and 860
2000-06-12 19:57:02 +00:00
Joel Sherrill
df49c60c96 Merged from 4.5.0-beta3a 2000-06-12 15:00:15 +00:00
Joel Sherrill
bf85b19188 Patch rtems-rc-4.5.0-13-cvs.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
adds .cvsignore.
2000-04-13 14:37:14 +00:00
Joel Sherrill
70810dcd89 Patches rtems-rc-20000204-0.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that contains:

* Removes remaining (now illegal) references to $(SRC) from a couple of
  Makefile.ams
* Removes duplicate AC_CONFIG_SUBDIRS macro from c/configure.in
* Moves ENABLE_LIBCDIR into RTEMS_PROG_C[C|XX]_FOR_TARGET (hides LIBCDIR
  from most configure scripts, i.e. LIBCDIR becomes less visible)
* Adds RTEMS_PROG_C[C|XX]_FOR_TARGET and RTEMS_CANONICALIZE_TOOLS to
  libbsp/*/configure.ins (A minor bug in previous implementations, which
  only has an impact when switching to GNU/Cygnus canonicalization)
* Cleans up several bogus comments.
* Removes MKLIB
* Switches the version number to 4.5.0 (for testing version number
  handling)
2000-02-08 22:33:25 +00:00
Joel Sherrill
9f4868cea9 Miscellaneous patches from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that are part of the Makefile.am conversion effort but were missed
in the previous commits.
1999-11-23 13:57:02 +00:00
Joel Sherrill
9608320702 Patch rtems-rc-19991117-4.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
.. a major configuration cleanup
    ... major enhancement of automake support.

    ... and it contains a *major*  breakthough:

    Automake support for libchip and libmisc *LEAF* directories.

    To implement this I have used several nasty tricks
        * The basical trick is to wrap an old Makefile.in's contents into a
          Makefile.am and still continue to use (i.e include) the old
          *.cfg files.

        * Replaced each INSTALL_IF_CHANGE and INSTALL_VARIANT with make
          dependencies
        * Add a gnu-make ifdef AUTOMAKE to main.cfg to avoid conflicts between
          automake and RTEMS make rules
        * Replaced each install:: and preinstall:: rule with make dependencies
        * Replaced SUB_DIRS with SUBDIRS in all Makefile.ins (Automake
          convention)
        * Removed each manually added autoconf substitution which automake
          performs automatically.

    This is not yet full automake support, because using the temporary
    installation directory, preinstallation in general and building variants
    are in contradiction to automake's basic working principles ...

    ... the new Makefile.ams work still somewhat clumsy
    ... nevertheless they work (quite well).

    WARNING:

    At first glance this patch is small, but
        * it affects the whole configuration system.
        * it opens the road to introducing automake to all Makefile.ins
          currently not being under automake control.

    JOEL> Does this remove or add any files?

    Both, all Makefile.ins below libchip and libmisc get replaced with
    Makefile.ams.
1999-11-22 13:41:11 +00:00
Joel Sherrill
d6c8352925 Patch rtems-rc-19991105-1.diff.gz from Ralf Corsepius
<corsepiu@faw.uni-ulm.de> which does the following:

    This is the configuration cleanup patch:

    Main changes:
      * TARGET_ARCH removed
      * target.cfg.in moved to c/make/target.cfg.in (Only configured once for
        all BSPs of a target)
      * BARE_XXX variables appended to bsp.cfg.in
      * autogen renamed to bootstrap
      * removed stray variables from make/custom/*.cfg

    To apply:
        cd <source-tree>
        rm c/src/make/target.cfg.in
        cp autogen bootstrap
        mkdir c/make
        cp make/target.cfg.in c/make/target.cfg.in
        rm make/target.cfg.in
        rm autogen
        patch -p1 < rtems-rc-19991105-1.diff
1999-11-16 15:48:11 +00:00
Joel Sherrill
65a60cd427 Removed all references to HOST_ARCH including the file gcc.cfg.in. All
host programs are now compiled with automake generated rules.  This was
done after discussions with Ralf Corsepius and Eric Norum.
1999-10-26 14:22:55 +00:00
Joel Sherrill
811804fec8 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to make fix bug
where wrapup left pieces out of the librtemsall.a.
1999-10-04 19:15:14 +00:00
Joel Sherrill
4f021c01cc Removed Makefile.in generated from Makefile.am 1999-10-04 17:33:23 +00:00
Joel Sherrill
473b4e58d0 Regenerated. 1999-10-04 13:30:15 +00:00
Joel Sherrill
e1d8abbe28 Applied patch rtems-rc-19990820-6.diff.gz from
Ralf Corsepius <corsepiu@faw.uni-ulm.de> which converted many
Makefile.in's to Makefile.am's.  This added a lot of files.
1999-09-07 13:45:03 +00:00
Joel Sherrill
72f9937b62 Removed need for use of separate include/networking directory. 1999-08-23 18:48:07 +00:00
Joel Sherrill
3a8915e6ee Patch rtems-rc-19990709-6-diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
applied.  This modified many Makefiles and custom files and makes many more
settings (network, multiprocessing, etc) gnerated by autoconf.
1999-08-06 17:55:25 +00:00
Joel Sherrill
29e68b7584 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch is an addition to "The big-patch"

  CHANGES:
  * FIX: c/Makefile.am: bogus comment which changed the behavior of
    c/Makefile.am removed
  * FIX: make/custom/ts_i386ex.cfg did not set HAS_NETWORKING correctly
    (Me thinks it might have been me who added this bogus setting :-).

  * NEW: removing make targets get, protos, debug_install, profile_install

  * NEW: replacing clobber with distclean
  * NEW: Reimplement distclean and clean as reverse depth first make
    targets (adaptation to automake's behavior)
  * NEW: removing RCS_CLEAN from make distclean (tools/build/rcs_clean is
    still in - remove it?)
  * NEW: "$(RM) Makefile" added to make distclean (adaptation to
    automake's behavior)
  * NEW: "$(RM) config.cache config.log" to CLOBBER_ADDITIONS in
    [lib|exec|tests]/Makefile.in (adaptation to automake's behavior)
  * NEW: "$(CLEAN_PROTOS)" removed (Not used anywhere)
  * NEW: binpatch.c moved from i386 bsp tools to tools/build (AFAIS,
    binpatch is not specific to the pc386 BSP at all)
  * NEW: AC_EXEEXT added to all configure scripts which contain AC_PROG_CC
    (Cygwin support)

  * NEW/Experimental: An experimental implementation of temporary
    installation tree support in libbsp/i386/pc386/tools/Makefile.am, based
    on dependency tracking with make, instead of applying INSTALL_CHANGE.


  REMARK:
  * This patch is small in size, but changes the behavior of "make
    clean|distclean|clobber" basically.
  * This patch does not alter building/compiling RTEMS, ie. there should
    be no need to rerun all "make all" building tests.

  KNOWN BUGS:
  * make RTEMS_BSP="..." distclean in c/ runs "make distclean" in BSPs
    subdirectories passed through RTEMS_BSP and in "c/." only, but does not
    descend into other BSP subdirectories previously configured with
    different settings of make RTEMS_BSP="...".
    => Workaround: always use the same setting of RTEMS_BSP when working
    inside the build-tree.

  * "make [distclean|clean]" do not clean subdirectories, which have been
    configured at configuration time, but  which are not used due to
    make-time configuration (e.g. macros/networking/rdgb subdirectories).
    This will problem will vanish by itself when migrating from make-time to
    configuration-time configuration

  APPLYING THE PATCH

      mv c/src/lib/libbsp/i386/pc386/tools/binpatch.c tools/build
      patch -p1 < rtems-rc-19990709-2.diff
      autogen
1999-07-26 21:26:44 +00:00
Joel Sherrill
eb299afca2 This is part of a major patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
to move RTEMS more to automake/autoconf and GNU compliance.

    Finally, here they are: the "big-patch" patches - merged into one big
    patch (~1.5MB).

    Sorry for the delay, but testing took much more time than I had expected
    - esp. reworking the acpolish script triggered many more tiny issues
    than I had expected (cf. below).

    At least, now you've got something to spend your weekend with :-.


    WARNINGS:
    * I've gone a little (??) further than I had announced before.
    * Several directories have been moved.
    * Several files have been added and removed
    * I have tested it with many BSPs/CPUs and a variety of permutiations of
    configuration flags, but not with all.
    * Most parts of the patch are automatically generated, however there are
    many tiny manual modifications.

    APPLYING THE PATCH:

    ./autogen -c
    mkdir tools
    mv c/src/exec/score/tools tools/cpu
    mv c/build-tools tools/build
    mv c/update-tools tools/update
    patch -p1 -E < rtems-rc-19990709-0.diff
    ./autogen

    If the patch doesn't apply to rtems-cvs, I would suggest that you should
    try to apply it brute-force and then to run tools/update/rtems-polish.sh
    -ac -am afterwards. A recursive diff between rtems-19990709 + patch and
    rtems-cvs + patch then should report only a few dozen significant
    changes to configuration files which need to be merged manually (IIRC, I
    did not change any source files).

    *** Attention: There are files to be removed, moved, copied and added
    in/to CVS!

    NEWS/CHANGES:
    1. Configuration takes place in 3 stages: 1. per host (toplevel
    configure script), 2. per target (c/configure), 3. per bsp
    c/src/configure automatically triggered from ./configure and
    c/Makefile.am.
    2. Building of subdirectory c/ takes place in c/$(target_alias) for
    cross-targets in c/ for native targets
    3. Building of subdirectory c/src takes place in c/${target_alias}/<bsp>
    for cross-targets, c/<bsp> for native targets
    4. c/build-tools moved to tools/build
    5. c/src/exec/score/cpu/tools moved to tools/cpu (=cpu-tools split out)
    6. c/update-tools moved to tools/update
    7. New subdirectory c/src/make, handles files from make/ on a per BSP
    basis
    8. Maintainer mode support: Ie. if configuring with
    --enable-maintainer-mode disabled (the default), then tracking of many
    dependencies will be disabled in Makefiles. Esp. many dependencies for
    auto* generated files will be switched off in Makefiles. Ie. if not
    using "--enable-maintainer-mode" many auto* generated files will not be
    updated automatically, i.e. normal users should not be required to have
    auto* tools anymore (untested).
    9. Independent configuration scripts for / (toplevel), tools/build,
    tools/cpu, tools/update, c/, c/src/, c/src/exec, c/src/lib, c/src/tests,
    c/src/make
    10. Automake support for all directories above and besides c/src
    11. "preinstall" now is implemented as depth-first recursive make target

    12. host compiled tools (exception bsp-tools) are accessed in location
    in the build tree instead of inside the build-tree when building RTEMS.
    13. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the
    build-tree - many tiny changes as consequence from this.
    14. --with-cross-host support removed (offically announced obsolete by
    cygnus)
    15. Changing the order of building libraries below c/src/lib/
    16. Former toplevel configure script broken into aclocal/*.m4 macros
    17. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed
    from *cfg.
    18. sptables.h now generated by autoconf
    19. Rules for "mkinstalldirs temporary installation tree" moved from
    c/Makefile to subdirectories.
    20. Cpu-tools do not get installed.
    21. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams
    which are in directories with own configure scripts.
    22. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get
    overridden from the environment.
    22. FIX: Handling of MP_PIECES in various Makefiles
    23. FIX: Removing "::" rules from some Makefile.ins
    24. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m
    755) - Now all include files use -m 644.
    25. Removed many gnumake-conditionals in Makefile.ins - Partially
    replaced with automake-conditional, partially replaced with
    conditionalized Makefile variables (... _yes_V)
    26. Massively reworked acpolish: acpolish now parses Makefile.ins and
    interprets parts of the Makefile.ins.
    27. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with
    explicit lists of files in Makefile.ins.
    28. FIX: Replacing MKLIB with RANLIB in Makefile.ins
    29. HACK: Add preinstallation for pc386 specific
    $(PROJECT_RELEASE)/BootImgs directory

    ... many more details, I can't recall


    KNOWN BUGS:
    1. make [debug|profile]_install do not do what they are promissing.
    "make [debug|profile] install" does what "make [debug|profile]_install"
    has been doing. Proposal: remove [debug|profile]_install
    2. Dependencies between temporary installation tree and source tree are
    not yet handled correctly.
    3. Dependencies between temporary installation tree and source tree are
    handled ineffencently (Using INSTALL_CHANGE instead of make
    dependencies)
    4. RTEMS_ROOT, PROJECT_ROOT, top_builddir, RTEMS_TOPdir now are
    redundant.
    5. The new configure scripts still are in their infancy. They contain
    redundant checks and might still contain bugs, too.
    6. RTEMS autoconf Makefile.ins use a mixture of configuration
    information gathered in c/$(target_alias)/<bsp>/make and of information
    collected from their configure scripts.
    7. make dist is not fully functional
    8. Subdirectory host-/build-/target- configure options (--target,
    --host, --build) do not conform to Cygnus/GNU conventions.
    9. Some RTEMS autoconf Makefile.in's makefile targets are not supported
    in automake Makefile.ams/ins (e.g. get, clobber).
    10. Some automake standard targets are not propagated from toplevel and
    c/Makefile.am to autoconf subdirectories (eg. make dist).
    11. rpcgen generated files are not part of the source-tree (Automake
    conventions favor supplying generated files inside the source-tree,
    however there is no support for rpcgen generated files in automake, cf.
    yacc/lex support in automake).
    12. RTEMS_HAS_RDBG handling is flaky. make/*.cfg use RTEMS_HAS_RDBG per
    CPU, while librdb's sources can only be built per BSP. Raises the more
    general question whether librdbg located correctly in the source-tree.
    13. All make/*cfg files are configured per cpu, currently there is no
    location to store per-bsp configuration information --> bsp.cfg, per
    aconfig.h?
    14. "make install" without having run "make all" beforehand does not
    work.
    15. handling of --enable-multiprocessing seems to be broken in
    make/custom/*
    16. Makefile.ins still exploit many gmake features.
    17. File permisson chaos on libraries (no explict -m for
    libraries/rels/etc).
    18. mcp750 Makefiles are broken (Note: I *do* mean buggy - I am not
    talking about "not-conforming to  conventions", here :-).
    19. Dependencies between configure scripts are not handled, eg. aborting
    "make RTEMS_BSP=<bsp>" can leave the build-tree in an unusable state.
    20. "make clean" does not delete <build-tree>/<bsp>. This is intentional
    for now, because rerunning "make" after "make clean" requires an
    explicit "make preinstall" afterwards now. This should be done
    automatically, but doesn't work in this case for now. To work around
    this problem <build-tree>/<bsp> is kept during "make clean" for now
    (HACK).

    TODO:
    1. split out host-compiled bsp-tools
    2. Use Cygnus/GNU standards for cross-compiling target-subdir
    (CC=CC_FOR_TARGET .. configure --host=${target_alias}
    --build=`config.guess'}), to be added to toplevel configure script after
    splitting out bsp-tools.
    3. Exploit per cpu support directory (c/src/<cpu>)- Splitting out
    per-cpu libraries - Are there any?
    4. Further automake support
    5. Converting subdirectories into standalone / self-contained
    subdirectories (Esp. moving their headers to the same common root as
    their sources, eg. mv lib/include/rtems++
    lib/librtems++/include/rtems++) - This is the main obstacle which
    prevents moving further towards automake.
    6. Propagating values from *.cfg into Makefiles instead of propagating
    them at make time via Makefile-fragments (i.e. try to avoid using
    *.cfg).
    7. Testing on cygwin host (I *do* expect cygwin specific problems).
    8. The ARCH in o-$(ARCH)-$(VARIANT) build-subdirectories is not needed
    anymore.

    GENERAL ISSUES:
    1. Temporary installation tree -- Ian and I seem to disagree basically.
    Though I think that I understand his argumentation, I do not share it.
    IMO, his way of using the buildtree is mis-using the build-tree, relying
    on an inofficial feature of RTEMS's current implementation, which
    doesn't even work correctly in the current build-tree, though it
    attempts hard to do so. From my very POV, it unnecessarily complicates
    the structures of the source- and build-trees. It is not supported by
    automake (No automatic generation for the necessary rules) and
    complicates the transition to automake significantly (Generating the
    rules with an enhanced version of acpolish could be possible).
    As Ian correctly pointed out, here a management decision is needed -
    though I don't see the need to draw this decision in short terms.

    2. preinstallation generally is a sure means to spoil the structure of
    the source tree, IMHO (No ranting intended, I am completly serious about
    this one). eg. through tree dependencies. The worst problem related to
    this I have found in the meantime is bsp_specs. bsp_specs is part of
    libbsp, ie. there is *no* way to build *any* part of the source tree
    *without* having a BSP *preinstalled*.
    Note: This issue is related to issue 1., but is not identical - The
    difference is the change of the order make rules have to be triggered.
    While preinstallation triggers rules spread all over the source tree
    before a "make all" can be run, a temporary installation tree could also
    be installed by post "make all" hooks (all-local:, to be run after make
    all in a directory is completed) if the directories' dependencies would
    be a tree,

    3. Stuctural dependencies between subdirectories.
    4. Depth of the source tree (Prevents multilibbing and introduces many
    unnecessary configure scripts).
    5. per cpu vs. per bsp configuration (There are no real per-cpu parts
    yets :-).
    6. automake does not support $makefiles in AC_OUTPUT. Unlike before, we
    now should try to avoid RTEMS_CHECK_MAKEFILE and to hard-code as much
    paths to Makefiles as possible.
    7. General redesign of the source tree
    8. Main installation point - Changing it to ${prefix}/${target_alias}. ?

    Besides item 8. (which is a must, IMHO), as far as I see most of them
    can not be solved soon and will remain issues in the mid- to long-term
    :-.

    REMARKS:

    * You (as the maintainer) should always use --enable-maintainer-mode
    when building RTEMS to ensure that maintainer mode generated files (esp.
    those in c/src/make) will be updated when make/* files have changed.
    * Use @RTEMS_BSP@ in Makefile.ins and Makefile.ams below c/src/,
    $(RTEMS_BSP) or ${RTEMS_BSP} will be overridden from environment
    variables when using make RTEMS_BSP="....".
    * c/src/make is a temporary cludge until configuration issues are
    solved. At the moment it is configured per bsp, but contains
    per-target/cpu info only. Its main purpose now is to circumvent
    modifying make/*.cfg files, because I consider make/* to be frozen for
    backward compatibilty.
    * This patch should only affect configuration files. At least I do not
    remember having touched any source files.

    * To build the bare bsp you now need to mention it in --enable-rtemsbsp.

    Example: building gensh1 and sh1/bare simultaneously:
    ../rtems-rc-19990709-1/configure --target=sh-rtems \
    --enable-rtemsbsp="bare gensh1" \
    --prefix=/tmp/rtems \
    --enable-bare-cpu-cflags='-DMHZ=20 -m1
    -DCPU_CONSOLE_DEVNAME=\"/dev/null\"' \
    --enable-bare-cpu-model=sh7032 \
    --enable-maintainer-mode \
    --enable-cxx
    make
    make install

    * The next steps in development would be to split out bsp-tools and then
    to change to Cygnus/GNU canonicalization conventions for building the c/
    subdirectory afterwards (i.e. many standard AC_*.m4 macros could be used
    instead of customized versions)

    FINAL REMARK:
    The issues mentioned in the lists above sound much worser than the
    situation actually is. Most of them are not specific to this patch, but
    are also valid for the snapshot. I just wrote down what I came across
    when working on the patch over the last few weeks.

    I wouldn't be too surprised if you don't like the patch at the current
    point in development. I am willing to discuss details and problems, I
    also have no problem if you would post-pone applying this patch to times
    after 4.1, but rejecting it as a whole for all times would be a false
    management decision, IMHO.

    Therefore I would suggest that you, if your time constaints allow it,
    should at least play a little while with this patch to understand what
    is going on and  before drawing a decision on how to handle this
    proposal. I know this patch is neither perfect nor complete, but I
    consider it to be a major breakthrough.  Don't be anxious because of the
    size of the patch, the core of the patch is rather small, the size is
    mainly the side effect of some systematic cleanups inside the Makefiles
    (result of acpolish).

    Feel free to ask if you encounter problems, if you don't understand
    something or if you meet bugs - I am far from being perfect and am
    prepared to answer them.

    Ralf.

    --
    Ralf Corsepius
    Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
    Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
    mailto:corsepiu@faw.uni-ulm.de           FAX: +49/731/501-999
    http://www.faw.uni-ulm.de
1999-07-26 20:20:22 +00:00
Joel Sherrill
0700136005 Added rules to handle alternate suffixes for C++ files. 1999-05-07 16:31:08 +00:00
Joel Sherrill
f4a8ee1c55 Unlimited objects patch from Chris Johns <ccj@acm.org>. Email follows:
First, the unlimited patch. I have compiled the unlmited patch for the
    Linux posix BSP only and it seems to work cleanly. I would like a really
    major application run on this change before commiting as the changes are
    very core and significant. I am currently building all the tests to run.

    I have no targets suitable to test on at the moment.

    I have tested the patch for inline functions and macros.

    Turning macros on has found some core bugs. I have fixed these but have
    not run all the tests. Please review the patch for these changes. They
    are:

    1) The conditional compilation for MP support broke the core messages
    code. You cannot embed a conditional macro in another macro. The Send
    and Urgent Send calls are macros.

    2) User extensions handler initialisation now has two parameters. I have
    updated the macros to support the extra parameter.

    The patch also contains the gcc-target-default.cfg fix required to build
    the kernel. More of a by product than a fix for you.
1999-03-17 16:01:03 +00:00
Joel Sherrill
4d20133bef Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. The following email
is long but I hate to lose the information so I am including it here.


> I am still fixing and recompiling but this is the issue that was not the
> result of another patch.  This is a fundamental build issue that I value
> your opinion on.

This is difficult issue (I.e. I have no destinct solution for it)

Background:

(gnu-) make's  implicit rules apply CFLAGS, CPPFLAGS, CXXFLAGS, ASFLAGS and
LDFLAGS (cf. make.info/Implicit Rules/Catalogue of Rules), only.

In brief:
CPPFLAGS .. passed to the c-preprocessor
CFLAGS ... passed to the c-compiler
CXXFLAGS ... equivalent to CFLAGS but passed to the c++ compiler
(Attention: CFLAGS is not passed to the c++ compiler)
ASFLAGS .. equivalent to CFLAGS, but passed to the assembler
LDFLAGS .. equivalent to CFLAGS, but passed to the linker

A bit oversimplifying, these make rules are as follows
.c.o:
    $(CC) $(CPPFLAGS) $(CFLAGS) -c
.cc.o:
    $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
.S.s:
    $(CPP) $(CPPFLAGS)
.s.o:
    $(AS) $(ASFLAGS)

My reading of the documentation (make.info) is that {AS|AR|CC|CXX|CPP}FLAGS
are ment to be passed to the related tools directly, however examinating
the rule set of gmake (gmake -p -f /dev/null")  shows that many rules use
$(CC) instead of the related tools (eg. linker rules) etc.

I.e. these flags should not rely on being passed through cpp or gcc. With
gcc being the common frontend for all of these tools of a gnu-toolchain the
situation becomes difficult (Which option is passed to whom and which tool
really uses it?), because these variable can also contain the toolchain's
frontend (eg. AS=gcc, LD=gcc, CPP=gcc -E).

For some commonly used options the situation is quite clear:
* -g -> CFLAGS
* -OX -> CFLAGS
* -D -> CPPFLAGS
* -A -> CPPFLAGS

But where to add -m, -B, -specs, -qrtems_XXX ?
* -B, -specs, -qrtems_XXX are gcc-frontend options
* -m is a combinations of flags to go to different destinations, in many
(all?) cases, the following is valid
-m is expanded by gcc into a set of -D and -A options
-m is interpreted by cc1 as a machine flag to generate a specific
instruction set.
-m is interpreted by gcc as an implicit linker search path for multilibs to
set up calls to LD.

>From my point of view this indicates we can either destingush between these
different usages (= separately add -m to CFLAGS, LDFLAGS etc) or to add it
to CPPFLAGS and use gcc (the frontend) instead of calling each tool
directly (less error prone) -- I vote for CPPFLAGS, but I am not sure.

-----------------

Now, where to add CPU_CFLAGS?

AFAIS, in probably all cases CPU_CFLAGS contain -D -A, and -m options,
only.
* -D and -A are supposed to go to CPPFLAGS
* -mXXX options can have multiple meanings (It can be gcc, collect2/ld and
cc1/cc1plus option simultaneously)

Here, I made a mistake - I destinguished between CPU_DEFINES to be added to
CPPFLAGS and CPU_CFLAGS to be added to CFLAGS and CXXFLAGS (cf.
gcc-target-default.cfg), generally assuming CPU_CFLAGS are CFLAGS.

This breaks preprocessing *.S into *.i files because CPU_CFLAGS flags were
not added to CPPFLAGS. Hence *all* *.S were compiled without taking
-mXX-flags into account. The i960/cvme BSP was the only one which
explicitly checked for a specific -m flag (-mca) and refused to compile
without it -- all other CPUs/BSPs silently swallowed this.

IMO, we can either
1) add CPU_CFLAGS and CPU_DEFINES to CPPFLAGS, thus silently convert
CPU_CFLAGS's meaning into CPU_DEFINES (Alternative solution: rename
CPU_CFLAGS to CPU_DEFINES and merge CPU_FLAGS with CPU_DEFINES).
or
2) destinguish between CPU_DEFINES and CPU_CFLAGS. In this case we would
need to check the contents of each CPU_CFLAGS in custom/*.cfg and move the
some parts of the contents to CPU_DEFINES and keep other parts in
CPU_CFLAGS (CFLAGS must contain options for the c/c++-compiler only!).

Though Solution 2) is the clearer one, I implemented 1) which is the
simplier one (the patch below).

ATTENTION: This patch is small in size, but affects almost everything.

------------

Additional complications araise with linking:

Some BSPs call  LD and AS directly (esp. gcc-2.7 make-exe rules). If LD=gcc
then LDFLAGS are supposed to be gcc-options, but if LD=ld then LDFLAGS is
supposed to contain ld-options.

An analog thought is valid for AS, but luckily enough ASFLAGS is not used
of inside the whole source tree.

Most RTEMS' custom/*.cfg use $(CC) $(CFLAGS) to link with gcc-2.8 make-exe
rules. With the patch below (CPU_CFLAGS added to CPPFLAGS) this means
CPU_CFLAGS will not be passed to the linker, which is incorrect for
multilibbed CPU's.

gmake's default rule set contains a variety of rules for linking, all
ending up in calling $(CC) $(LDFLAGS) for linking at their very end.

IMO, this means we should use something like

LINK.o = $(CC) $(LDFLAGS) in gcc-target-default.cfg

+ modify all gcc-2.8 make-exe rules to use
$(LINK.o) .......

+ setup LDFLAGS according to the requirements of the above.

I.e. we should use $(CC) for linking instead of calling the linker (LD)
directly and set LDFLAGS = $(CPPFLAGS) $(CFLAGS) or similar.
1999-02-24 15:15:29 +00:00
Joel Sherrill
4cc89bd99a Added rejected patch from automake VI from Ralf Corsepius. 1999-02-18 18:00:22 +00:00
Joel Sherrill
a110b68252 Part of automake VI patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
> 2) rtems-rc-19990131-1.diff
>
> Rework of compilers/*.cfg files (esp. gcc-target-default.cfg) to adapt
> the flags/makefile variables to automake and make standards (cf.
> make.info - implicit rules/variables).
>
> This patch is rather risky and may probably break things, but is an
> essential step towards automake.
>
> FWIW: It also reverts the i386-ASMFLAGS/ASFLAGS-patch, which was wrong,
> as I had to experience ;-.
1999-02-18 17:55:49 +00:00
Joel Sherrill
7d0dbf1a6c Changed definition of ASMFLAGS since as does not recognize -B option
used in gcc.
1999-01-19 20:23:57 +00:00
Joel Sherrill
01629105c2 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to rename all
.s files to .S in conformance with GNU conventions.  This is a
minor step along the way to supporting automake.
1998-12-14 23:15:38 +00:00
Joel Sherrill
946b3cb0cf Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
2. "make profile" doesn't work. It aborts when building host-tools
        for embedded targets. I didn't yet have enough time to fix this
        problem.  AFAIS this problem is related to handling of
        LDFLAGS_PROFILE[|_V] in gcc.cfg.in.  For host applications, we use
        gcc for linking host applications, too. With profiling enabled
        CFLAGS_PROFILE_V contains -pg and is used to compile, but
        LDFLAGS_PROFILE_V is empty, hence -pg will not be passed to the
        linker causing gcc to fail to link, because it can't resolve some
        symbols introduced by compiling with -pg.

    I am not sure if I can provide a patch for this - Ether it is trivial
    to fix or requires basic work on host configuration ;-

    Fixing this one was trivial - But hard to trace.

    LDFLAGS_PROFILE_V needs to contain the same flags as CFLAGS_PROFILE_V,
    if gcc is used for linking (What else should have been expected ?,
    :-). The same problem was present for *_DEBUG_V, but apparently wasn't
    noticed by anybody, because things didn't break, but were silently
    ignored.

    I fixed these problems by setting these flags in configure.in whenever
    gcc is reported to be the host-compiler. For non-gcc host compilers
    "make debug" and "make profile" now becomes the same as an ordinary
    "make". This is a hack and addressing this problen could be more
    sophisticated, but I don't think it gives much sense to support
    compile variants for any host program (Who will ever try to
    profile/debug host tools?).  Therefore I don't think it's useful
    to invest more effort into this problem.
1998-10-14 19:42:45 +00:00
Joel Sherrill
b67245d03b Patch from Chris Johns <ccj@acm.org>:
I have managed to build the bsp ods68302 and the rtti test case I made
    with egcs-1.1b and binutils-2.9.1.

    I have built our C++ application and got no link errors so it looks like
    this is now working. I am yet to test the code but getting the thing to
    link was the problem.

    Please find a patch attached which removes the -fno-rtti option.
1998-09-10 12:31:27 +00:00
Joel Sherrill
cce81a748f A patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Here is another patch to hopefully enhance rtems' configuration.

    Motivation: Try to support other c-compilers besides gcc (I tried to
    build rtems under Solaris using sun's WSPro c-compiler).

    Here is a couple of small patches concerning the host compiler
    configuration, which fix/work-around the worst problems when using sun's
    WSPro c-compiler.

    Changes:
        * Replaced make/compilers/gcc.cfg with make/compilers/gcc.cfg.in, ie.
          gcc.cfg is generated by configure now.
        * Removed a line containing a hard-coded "gcc" from gcc.cfg (BUG-fix).
        * Add -g to host compiler flags only if configure reported -g to work
        * Add -Wall to host compiler flags only if configure reported that the
          host compiler is gcc (WSPro's cc chokes on -Wall).
        * Some modifications to make/Makefile.in
        * Adapted make/custom/default.cfg to the new location of gcc.cfg

    BTW, gcc.cfg/gcc.cfg.in seems to be full of unused code (DEBUG-VARIANTS
    etc.) which deserves to be cleaned up, IMO.

    IMO, a similar patch should be applied to gcc-target-default.cfg
1998-08-21 17:43:22 +00:00
Joel Sherrill
28e7d7faed Patches from Eric Norum 1998-08-20 22:04:22 +00:00
Joel Sherrill
0280cb66f5 FreeBSD stack compiles for the first time (except libc/strsep.c) 1998-08-20 14:39:09 +00:00
Joel Sherrill
8c6e195ae3 Patch from David Fiddes <D.J.Fiddes@hw.ac.uk> to make ASFLAGS include the
CPU_ASFLAGS.
1998-08-01 14:41:45 +00:00
Joel Sherrill
30cde042bb Added missing parts of patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. 1998-07-28 16:50:14 +00:00
Joel Sherrill
5b8c1b7041 Yet another EXEEXT patch. This one is from Ralf Corsepius
<corsepiu@faw.uni-ulm.de> and his comments are below:

  Joel, obviously you did apply my previous patch to
  gcc-target-default.cfg -- This should have been gcc.cfg
  (gcc-target-default.cfg should NOT contain any EXEEXT).
1998-07-11 14:23:53 +00:00
Joel Sherrill
cc8a388aac Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. Comments:
> It seems that rules for %{EXEEXT} don't exist in gcc-target-default.cfg

    No, gcc-target-default.cfg is used to compile executables for the target
    only, not for the host.

    EXEEXT may only be used for programs to be run on the host.

    > What should I add please?

    This was a bug in my initial configuration patch to rtems-980616. A
    correction to this patch I had sent to Joel at 26.06.98 doesn't seem to
    have made it into the snapshot.

    Please find attached the patch I had sent to Joel, hopefully this patch
    fixes this problem.
1998-07-10 14:13:59 +00:00
Joel Sherrill
98100d275f Monstrous patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. I have
made no attempt to divide the comments up and place them with just
the appropriate files.  Here is an excerpt from Ralf's email:

Changes including comments on changes I made after cycling through
all the targets:

  * Added ranlib support. Now all targets use "ranlib" instead of "ar -s"
    to build an index for a library. If ranlib isn't detected during
    configuration, check if ar -s is working and try "ar -s" instead of

  * Removed $(XXX_FOR_TARGET) from make/target.cfg.in, use $(XXX) instead now.

  * gcc-target-default.cfg: LINK_XXXX-defines reworked to solve the -l
    problem under posix (cf gcc-target-default.cfg)

  * rtems-glom replaced by Makefile-rules inside of the wrapup/Makefile.in
    that has been using rtems-glom until now.

  * Removed CCC and friends in gcc-target-default.cfg, as they have been
    breaking CXX support.

  * Removed CONFIG.$(TARGET_ARCH).CC lines from several custom/*.cfg
    files, because this is now set in custom/default.cfg.

  * Added aclocal/ar-s.m4, check whether "ar -s" is working

  * Added aclocal/cygwin.m4 and aclocal/exeext.m4.

  * Reworked aclocal/canonicalize-tools.m4: Added ar -s check; fixes for
    problems when  XXX_FOR_TARGET is given via environment variables (didn't
    work for gcc until now), adding cygwin check, improved autoconf-cache
    handling.

  * Removed -l from make rule dependencies. LINK_LIBS is now allowed to
    contain -L and -l. LINK_OBJS and LINK_FILES must not contain -L or -l.
    gcc28 make-exe rules now link using $(LINK_OBJS) $(LINK_LIBS) => Almost
    all custom/*.cfg are modified. This is very likely to break something
    because of typos or having missed to edit a file.

  Open problems, known bugs, things I didn't do:

  * custom/p4000.cfg seems to be out of date and requires to be reviewed.

    (JRS NOTE: It is subordinate p4650 and p4600 -- both of which build ok
               after minor changes.)

  * custom/psim.cfg needs to be reviewed, I added some changes to it, I am
    insecure about.

    (JRS NOTE: psim had a minor problem endif/endef swapped but runs fine.)

  * rtems-glom.in can now be removed.

  * gcc*.cfg files "make depend" rules don't honor language specific flags
    (e.g CXXFLAGS is ignored for *.cc) - Nothing to worry about now, but may
    cause problems for hosts/targets not using gcc or rtems-add-ons that use
    external packages.

  * AFAIS, the no_bsp BSP can't be build anymore, i.e. configure refused
    to configure for it whatever I tried.

  * The toplevel and toplevel+1 README files are quite out-dated

  * cygwin.m4 isn't of much use for rtems. In most cases (cf.
    aclocal/*.m4) it is worked around by directly using $host_os. I think
    I'll remove it soon after the next snapshot

  * Before release the cygwin patch needs to be tested under cygwin. I may
    have broken/missed something (esp. the sed-pattern to convert \\ into /
    may be broken).

  * You should try to build/run the posix-BSP under solaris - I don't
    expect problems, but I am not 100% sure, esp. with regard to ranlib/ar -s.

  * You should consider to convert all make/compilers/*.cfg files into
    make/compilers/*.cfg.in files and let autoconf generate the *.cfg. This
    may help getting rid of some if/then/else statements and help
    hard-coding some defines into those files in future and shouldn't
    disturb now.

  * Not having installed libc.a/libm.a on a host may still break building
    rtems, esp. when using -disable-gcc28 as the gcc27-configuration scheme
    directly accesses libc.a and libm.a. The problem should not appear when
    using gcc28 because it references libc/libm only through -lc and -lm
    which may be static or dynamic (I didn't test this).

  * shgen is not yet included (I didn't yet have enough time to integrate it).

  * I know about a few more configure-probs (esp. cross-checking
    --enable-* flags).
     + warn/refuse to configure when --enable-libcdir and
       --enable-gcc28 are given.
     + force --enable-libcdir when --disable-gcc28 is given

  * Replaced KSHELL with @KSH@ in some shell scripts generated by configure.in.

  * Added a dependency to aclocal/*.m4 in the toplevel Makefile => configure
    and aclocal.m4 will now be rebuild when any aclocal/*.m4 file is changed

  * Some changes to aclocal/gcc-pipe.m4 and aclocal/gcc-specs.m4

  * Replaced i[[3456]]86-unknown-freebsd2.[[12]] with i[[3456]]86-*freebsd2.*
    in configure.in, as I suppose there might exist a variety of valid vendors
    (2nd field of the name-tripple)

  * Disabled override MAKEFLAGS in toplevel Makefile.in - Potential
    side-effects are not really clear to me.

  * In mvme162.cfg, $(LINK_LIBS) is missing in the CC line in gcc28's make-exe
    rule (yet another one I missed to edit). Just append $(LINK_LIBS) to
    the "CC" line, like I hopefully did to ALL other custom/*.cfg files.

  * the problem with mvme162lx.cfg is a follow-up problem of the
    mvme162.cfg-bug.

  * mvme162/console and idp/console had variables named Buffer which
    conflicted with similarly named variables in some tests.
1998-06-27 17:09:47 +00:00
Joel Sherrill
9456087368 Added rule for .cxx and .cpp per suggestion from Geoffroy Montel
<g_montel@yahoo.com>.
1998-06-09 14:21:21 +00:00
Joel Sherrill
c2c9c7e58f Added names for C++ compilers. 1998-05-27 19:26:09 +00:00
Joel Sherrill
5dd4212fec Changed CPP rule per patch from Ralf Corsepius. 1998-05-20 17:01:04 +00:00
Joel Sherrill
6ee6abb40d Added C++ rule.
Added CROSS_TARGET conditionals so unix port can share this file.
1998-05-18 16:38:38 +00:00
Joel Sherrill
092940bdc4 Purged references to STACK_CHECKER_REPORT_USAGE 1998-04-06 17:09:44 +00:00
Joel Sherrill
a5cb6730b0 Reordered CFLAGS definition so CFLAGS_DEFAULT is before
CFLAGS_$(TARGET_VARIANTS).  This makes sure that -Wall appears
before any individual warnings are disabled during "debug" builds.
1998-04-06 16:26:53 +00:00
Joel Sherrill
5d1ea96d42 added -Wno-unused to debug flags 1998-02-17 20:42:10 +00:00
Joel Sherrill
ac61209b11 Added unused warning per discussion on rtems-snapshots list. 1998-02-17 19:16:18 +00:00