Commit Graph

104 Commits

Author SHA1 Message Date
Joel Sherrill
9d05d68fe6 Changed sed command to avoid severe limitations in Solaris /bin/sed.
Detected by Joel after multiple reports on the rtems-users mailing
list.  Final fix from Ralf Corsepius.
2000-05-28 17:41:43 +00:00
Joel Sherrill
9d216de2ae Removed uses of RTEMS_ENABLE_HWAPI but left macro in aclocal. 2000-05-08 18:59:18 +00:00
Joel Sherrill
c34eb10f55 Patch rtems-rc-4.5.0-7-cvs.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
The patch contains:

  * Many small cleanups wrt. make VARIANT=[DEBUG|PROFILE] support
  * several modifications to make/custom/*.cfg
  * Merger with the mvme2307.cfg you had posted two weeks ago (Please
    check it, I did not check it against to version you posted today).
  * Added a check to the toplevel configure.in to refuse building inside
    of the source tree.
2000-04-03 20:01:31 +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
dd9c6e0d50 Patch rtems-rc-19991117-0.diff.gz from Ralf Corsepius
<corsepiu@faw.uni-ulm.de> which corrects some configuration
problems and cleans up a few Makefile.in's.
1999-11-18 14:06:48 +00:00
Joel Sherrill
eb02f47b12 Committed modifications from ITRON Task and Task Dependendent Synchronization
Working Group.  Included are tests.
1999-11-10 13:48:27 +00:00
Joel Sherrill
c73b8ac27f This patch adds the basic framework for the ITRON 3.0 API implementation
for RTEMS.
1999-11-09 22:18:43 +00:00
Joel Sherrill
f724a870c6 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch addresses a few configuration issues and removes some
    duplicate configuration files.

    Background:
    * some files used in AC_INIT were not unique enough and can lead to
      problems if a user plays with configure scripts.
    * the Makefile templates are independent of the target/cpu and bsp, so
      the bsp dependent versions (c/src/make/Templates) are removed.

    To apply:
        patch -p1 < rtems-rc-19990820-3.diff
        rm -f c/src/make/Templates
        ./autogen

    ATTENTION: This patch removes several files and one directory :)
1999-08-30 16:25:54 +00:00
Joel Sherrill
6693a68ffa 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:00:37 +00:00
Joel Sherrill
15aa5ffbfd Patch ("FIX: no_cpu/no_bsp") from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch should fix the nastiest configuration bugs for no_cpu/no_bsp.

    With this patch applied, configure --target=no_cpu-rtems now correctly
    acknowledges its configuration, but later fails building when trying to
    build libcsupport (I leave this problem for you :-).

    Fixes/Changes:
    * aclocal/canonicalize-target-name.m4: use RTEMS_CPU instead of
      target_cpu, switch to a native compiler setup if target = no_cpu*rtems,
      ie. implicitly use host=target (native) and RTEMS_CPU=no_cpu for
      --target=no_cpu*rtems.
    * add no_bsp/bsp_specs (Support -qrtems, -qrtems_debug; please check
      before adding :-)
    * Use RTEMS_CANONICALIZE_TARGET_CPU instead of AC_CANONICAL_SYSTEM in
      toplevel/configure.in
    * All references to $target_cpu in aclocal/*.m4, Makefile.ins and *.cfg
      files changed to RTEMS_CPU
    * bug fixes to exec/score/cpu/no_cpu/wrap (This part of the patch may
      result into patch rejections, because your recently posted patch may
      also have addressed this problem).

    After applying this patch, please do:

        cvs add c/src/lib/libbsp/no_cpu/no_bsp/bsp_specs
        ./autogen
1999-06-14 18:54:24 +00:00
Joel Sherrill
817466c863 Patch ("FIX: MKDIR/INSTALL_VARIANT") from Ralf Corsepius
<corsepiu@faw.uni-ulm.de>:

    This patch removes MKDIR from RTEMS source tree and fixes another small
    bug in the definition of INSTALL_VARIANT (cf. to the patch itself for
    details, it should be self-explanatory)

    After applying the patch please do:

        cvs rm aclocal/mkdir.m4
        ./autogen
1999-06-14 18:29:09 +00:00
Joel Sherrill
6b7ab9bf72 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
FYI: I am not talking about using "make -C <dir>", which probably
    is much faster on M$ hosts than RTEMS's implementation, but about
    removing --enable-gmake-print support and to apply a variant of
    automake's subdirectory.

    Automake's subdirectory rule seems to be a little bit faster, but I
    wouldn't bet on this.

    Attached to this mail is my proposal.

    After applying the patch, please run
        cvs rm aclocal/enable-gmake-print.m4
        ./autogen
1999-04-16 18:23:48 +00:00
Joel Sherrill
8cdb582b49 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch addresses a few minor issues and contains a few (minor)
  preparations for automake.

  * configure.in: Fix for handing c/src/tests subdirectory handling (FIX)
  * aclocal/rtems-top.m4:
    + Add TARGET_SUBDIR and --with-target-subdir (preparation of future
      enhancements for cross-compiling)
    + Activate RTEMS_ROOT handling (automake preparation)
  * automake/*.am: replace comments "#" with "##" so that comments won't
    get included into Makefile.in's anymore
  * c/update-tools/* automake support (NEW)
  * ./autogen update/enhancement (cf. ./autogen for details)

  After applying this patch please run:

    ./autogen
    cvs add c/update-tools/configure.in
    cvs add c/update-tools/Makefile.am
    cvs add c/update-tools/aclocal.m4
1999-04-12 15:41:33 +00:00
Joel Sherrill
f72dd2a9fa Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to address problems
on BSPs that install there own tools.
1999-04-01 16:58:06 +00:00
Joel Sherrill
710389fcca Cleaned up and regenerated. 1999-03-30 15:38:57 +00:00
Joel Sherrill
e5f4e5aaff Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
rtems-rc-19990326-2.diff: Enhancements to autoconf support for librdbg
    * autoconf-checks for AWK and RPCGEN
    * disable librdbg if either AWK, RPCGEN or librdbg/$target_cpu
      cannot be found
1999-03-29 22:24:23 +00:00
Joel Sherrill
c9b07e92d1 Automake II patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
With my most recent automake patch (automake II) we could even simplify more
  files below make/, because the host-compiler related parts of those files
  aren't used anymore :-.

  Whatsoever, the patch below should fix this problem.

  Note: This is a mere bug fix, it doesn't move any of the variables involved
  to target.cfg nor does it try to eliminate any variable.
1999-03-24 22:49:17 +00:00
Joel Sherrill
9b8baa128b Automake II patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. Email
description follows:

Description:

    * automake for *all* tool subdirectories (Makefile.am, configure.in etc.)
    * autogen now also considers CONFIG_HEADER (generates stamp-h.ins and
      config.h.ins)
    * c/src/tests/tools/generic/difftest and
      c/src/tests/tools/generic/sorttimes generated by configure scripts
    * c/update-tools/ampolish, beautifier for Makefile.ams, similar to
      acpolish
    * rtems-polish.sh added to c/update-tools/ + ampolish support
    * New subdirectory ./automake, contains automake -Makefile fragments to
      support RTEMS make "debug, debug_install, profile, profile_install" for
      native Makefile.ams (== ignore these make targets).
    * aclocal/rtems-top.m4's RTEMS_TOP now reads the automake makefile
      variable VERSION from RTEMS ./VERSION file.
    * ./configure.in uses the macros from aclocal + support for the tools'
      configure scripts

  Remarks:
    * To run rtems-polish.sh, "cd <rtems-source-tree>;
      ./c/update-tools/rtems-polish.sh"
    * AFAIS, now all native subdirectories are converted to automake (Please
      drop me a note, if I forgot something).
    * Unless you notice something fatal, IMO the time has come for a public
      try (== snapshot). I do not intend to send more automake related patches
      within, say 2 weeks, to give these patches time to settle and to give me
      some time to think on how to continue.
    * The patch assumes installation to the new main installation directory
      [$(prefix)].
1999-03-23 18:02:17 +00:00
Joel Sherrill
04c308c022 Incorporated automake I patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This is the first real automake patch.

    It adds automake support to c/build-tools and cleans up a few minor
    issues.

    I consider this to be a testing probe to examine problems with automake.
    Therefore, this patch is just a more or less harmless replacement of the
    former RTEMS Makefiles and I expect it not last for long. If you want to
    give automake Makefiles a public try and if you want/need to learn about
    problems with it, then it's about time for a new snapshot, IMO. I may
    have screwed up something not directly related to automake, but I expect
    very few (none to be precise) problems with automake. However, somebody
    should at least try building on Cygwin. If you feel a bit more
    adventureous, then I also can continue to submit more patches.

    [FYI: I still have a couple of automake files laying around, but they
    need some cleanup before being submitted as patches. Now, that I am just
    into it, I'll perhaps submit another one tonight :-]

    After applying this patch (patch -p1 -E <
    <path-to>/rtems-rc-19990318-0), first run the "autogen" script from the
    toplevel source directory, before committing to CVS. Be careful about
    dependencies between Makefile.am and Makefile.ins when cutting tarballs
    from CVS. Makefile.ins are required to be newer than Makefile.ams,
    otherwise users would need to have automake, autoconf and perl. Some
    people recommend to "touch" all Makefile.in after checkout from cvs (cf.
    egcs/contrib/egcs_update).

    ATTENTION:
      * This patch adds a number of new files.
      * remove aclocal/exeext.m4 and aclocal/cygwin.m4 from CVS, They are now
        covered by autoconf-2.13`s AC_EXEEXT.

    Some features/side-effects which are probably interesting for you:
    In a configured build-tree "cd c/build-tools", then try

      * "make RTEMS_BSP=<bsp> install"
      * "make RTEMS_BSP=<bsp> dist"
1999-03-19 23:11:36 +00:00
Joel Sherrill
d8ff79366b Towards automake XI patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch is the most scary of all proposals I've been mailing to you
    this week until now.

    It consists of 3 parts:
        1. a patch
        2. a perl script (acpolish)
        3. a shell script wrapper to invoke the perl-script.

    The perl-script reads in each Makefile.in and modifies them
    ("polishes/beautifies" them :-).

    These modifications are not easy to describe:

    Basically, it hard-codes some automake Makefile-variables and rules into
    RTEMS autoconf-Makefile.ins (Note: autoconf vs. automake!!) and converts
    some settings/variables to configure scripts' requirements (Yes,
    plural).

    E.g. it adds the automake standard variables $top_builddir and $subdir,
    adds dependency rules for automatic re-generation of Makefiles from
    Makefile.in, adds support variables for relative paths to multiple
    configure scripts etc.


    The patch is a one-line patch to enable the support of the new features
    added by acpolish.

    The shell script is a wrapper which pokes around inside of the source
    tree for Makefile.ins and invokes acpolish on all autoconf-Makefile.ins.

    acpolish is designed to be able to run several times on the same
    Makefile.in and may once become a more general tool to convert RTEMS
    Makefile.in to automake. Therefore, I'd like to keep it inside of source
    tree. (e.g. as contrib/acpolish or c/update-tools/acpolish). However, it
    doesn't make sense to export it outside of RTEMS.


To apply this:

    cd <source-tree>
    patch -p1 -E < <path-to-patch>/rtems-rc-19990318-1.diff
    tar xzvf <path-to>/rtems-rc-polish.tar.gz
    ./rtems-polish.sh
    ./autogen

    Note: The path contrib/acpolish is hard-coded into rtems-polish.sh, if
    you decide to put it in an alternative place, please modify
    rtems-polish.sh to reflect this change.

    Later:
    cvs rm make/rtems.cfg (It isn't used anymore)
    cvs add contrib
    cvs add contrib/acpolish
    cvs commit

    I've tested this intensively, but naturally I can't exclude bugs.

    Ralf.

    PS.: Most probably, this is the last "Towards automake" patch. The next
    one probably will be a real automake patch.
1999-03-19 22:27:02 +00:00
Joel Sherrill
dfe7746ed9 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> 1999-03-17 23:43:32 +00:00
Joel Sherrill
e9e01dd61f Suggested rephrasing of inline versus macros option by Chris Johns
<ccj@acm.org>.
1999-03-17 15:56:03 +00:00
Joel Sherrill
16b5264d49 Switched sense of tests configure flag to really be off by default. 1999-03-08 21:38:16 +00:00
Joel Sherrill
e1b7770144 backed off previous change and switched to tests being disabled by default. 1999-02-25 19:22:58 +00:00
Joel Sherrill
0ce47288c9 Suggestion from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to clarify
--enable-tests flag.
1999-02-25 17:30:24 +00:00
Joel Sherrill
7908ba5b81 Part of the automake VI patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
> 4) rtems-rc-19990202-0.diff /reorg-score-cpu.sh
>
> reorg-score-cpu.sh reorganizes the cpu/<cpu>/* subdirectories in a
> similar manner than previous reorg scripts did. rtems-rc-19990202-0.diff
> contains the diffs after reorg-score-cpu.sh has been run on a
> rtems-19981215 snapshot + my patches up to rtems-rc-19990131-2.diff.
>
> This patch is rather nasty and may break something. However, I've tested
> it for about 10 different target/bsp pairs and believe to have shaken
> out most bugs.

I wonder about the following .h files that were not moved:

a29k/asm.h
a29k/cpu_asm.h
i386/asm.h
i960/asm.h
m68k/asm.h
m68k/m68302.h
m68k/m68360.h
m68k/qsm.h
m68k/sim.h
mips64orion/asm.h
mips64orion/cpu_asm.h
mips64orion/mips64orion.h
no_cpu/asm.h
no_cpu/cpu_asm.h
powerpc/asm.h
powerpc/mpc860.h
sh/asm.h
sparc/asm.h
sparc/erc32.h
1999-02-18 18:28:24 +00:00
Joel Sherrill
283d728541 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> heading toward
automake:

  Notes:
    * I didn't yet touch the cpu subdirectory. I still need some time to
      think on how to handle them.
    * I probably will wait for the next snapshot before mailing more patches
      (I still have some pending), giving you a chance to apply them and me a
      chance to become target of the bullets which will probably be aimed at
      me after these modifications.
1998-12-16 00:01:08 +00:00
Joel Sherrill
cca44008d8 Merged Eric Norum's select patch that was based on 4.0 and resolved
all conflicts.
1998-12-10 23:31:54 +00:00
Joel Sherrill
4721cf1ecb Patch from Emmanuel Raguet <raguet@crf.canon.fr> to add remote debug server
and RPC support to RTEMS.  Thanks. :)  Email follows:

    Hello,

    For Xmas, here is the Remote Debugger on RTEMS !

    Here are 2 patches for the Remote Debugger on RTEMS for pc386 from Linux
    host :

     - one for RTEMS it self,
     - one for GDB-4.17.


    1/ RTEMS patch
    --------------

    This patch adds 2 libraries :
     - a simplified SUN RPC library
     - the Remote Debugger library

    The configuration command is the following :
    ../rtems4/configure --target=i386-rtemself --enable-rtemsbsp=pc386
    --enable-rdbg

    The SUN RPC library is built only if networking is set.
    The RDBG library is built if networking and enable-rdbg are set.

    The function used to initialize the debugger is :
            rtems_rdbg_initialize ();

    A special function has been created to force a task to be
    in a "debug" state : enterRdbg().
    The use of this function is not mandatory.



    2/ GDB-4.17 patch
    -----------------

    This patch create a new RTEMS target for GDB-4.17.

    The configuration command is the following :
    ./configure --enable-shared --target=i386RTEMS

    To connect to a target, use :
      target rtems [your_site_address]

    Then, attach the target using : attach 1

    And... Debug ;)

    You can obtain the original GDB-4.17 on
    ftp://ftp.debian.org/debian/dists/stable/main/source/devel/gdb_4.17.orig.tar.gz

    This has been tested from a Debian 2.0.1 linux host.
1998-12-03 23:54:14 +00:00
Joel Sherrill
97e2729d1a Added --disable-multiprocessing flag and modified a lot of files to make
it work.
1998-11-23 17:38:09 +00:00
Joel Sherrill
2e26bbd059 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Here is a cosmetic patch which corrects a few spelling problems in parts
  written by me.

  Apparently, I must have written these under the influence of ether (:-)
1998-11-19 20:09:01 +00:00
Joel Sherrill
692b9f7fdd Merged Vista SCORE603e, Radstone PPCn_60x, and DY-4 DMV177 BSPs along
with libchip.
1998-10-28 19:17:16 +00:00
Joel Sherrill
11cfb6f7f6 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
1. Rtems contains some perl scripts that use hard-coded paths to
      /usr/bin/perl or /usr/local/bin/perl I have already fixed these
      problems by adding some checks to configure.in.   While doing this,
      I also cleaned up some more autoconf related problems for generating
      shell scripts.  This patch might seem a bit scary to you, but I am
      quite confident it won't break something (I've been testing it for
      almost a week now, however it might introduce typos for a limited
      number configurations I don't have access to - But it shouldn't be
      a problem for you to test them :-).

   I expect to get this finished tonight, hence you will very likely
   have the patch when you get up tomorrow.

   Changes:

   * Check for PERL and disable all PERL scripts if perl wasn't found.
   * Generate all KSHELL-scripts with autoconf instead of make-script
   * Automatic dependency handling for autoconf generated KSHELL or PERL
     scripts (make/rtems.cfg)

   Notes:
   * this patch contains new files and deletes some other files.
   * The patch is relative to rtems-4.0.0-beta4 with my previous
     rtems-rc-981014-1.diff patch applied.

   Testing:
      I tested it with sh-rtems and posix under linux. Now all targets
      which are touched by this patch and which are not used while building
      for sh-rtems and posix still need to be tested. AFAIS, only the
      sparc/erc32 BSP should be affected by this criterion. And if you
      like to, you should also consider testing it on a Cygwin32 and a
      Solaris host for one arbitrary BSP.
1998-10-14 20:19:30 +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
959d75263b Corrected typo pointed out by Pollak Leon <leonp@plris.com>. 1998-10-07 14:39:58 +00:00
Joel Sherrill
2c3840b563 Added new autoconf test for i386 code16/code32 support. The guts of the
test were suggested by Ian Taylor <ian@airs.com> and Joel did the
hard part of putting it in aclocal and editting all the offending
Makefiles and source code which could use this feature.
1998-09-30 20:58:39 +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
f205fe6d1c Updated to reflect stack transition. 1998-08-20 15:46:07 +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
579fc6a3a3 Per request from Chris Johns <ccj@acm.org>, I added code to detect
when the bare bsp was enabled without setting both --enable-cpu-model
and --enable-cpu-cflags.
1998-08-13 14:47:18 +00:00
Joel Sherrill
67a2288991 Patch from Eric VALETTE <valette@crf.canon.fr>:
Here is a enhanced version of my previous patch. This patch enables
    to potentially share the new interrupt management code for all Intel targets
    (pc386, go32 and force386) bsp.

    Note :  this patch is complete only for pc386. It still needs to
            be completed for go32 and force386. I carrefully checked
            that anything needed is in for force386 (only some function
            name changes for IDT manipulation and GDT segment
            manipulation). But anyway I will not be able to test any
            of theses targets...
1998-07-23 22:02:34 +00:00
Joel Sherrill
613ab621df Patch from Dario Alcocer <alcocer@connectnet.com> and Ralf Corsepius
<corsepiu@faw.uni-ulm.de> which attempts to detect when the UNIX port
is being configured on a system without System V IPC support.  This
is an optional component on both FreeBSD and Linux systems.  Most
Linux 2.x kernels ship with it enabled but it is still a real risk.

This test may have undesirable side-effects on some hosts.  We will
address those conflicts as they arise.
1998-07-23 19:39:25 +00:00
Joel Sherrill
f95d2b53f2 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. Comments:
* Added support for bsd "install" ($(BSDINSTALL)) to host.cfg.in, i.e.
    the standard "install" program that most packages (including automake)
    use. In Makefiles outside of rtems, "install" normally is referenced by
    $(INSTALL), but rtems already uses $(INSTALL) for install-if-change,
    hence I used $(BSDINSTALL) instead to keep up backward compatibility.

    * Removed references to @GREP@ etc. from host.cfg.in, as configure.in
    doesn't check for them (Minor cleanup).

    * Added installation flags INST*FLAGS to host.cfg.in, which should
    replace -m XXXX flags for installation calls.

    *Changes to gcc.cfg to enable it to build host programs from multiple
    sources files.
    Should not disturb existing sources, but neccessary.

    * There was a not-so-minor bug in the configuration files: "make
    install" and "make debug_install" don't work in all subdirectories!! I
    tried to fix this by adding "install" to MTARGETS in main.cfg, which
    seems to solve most of the problems. But there still seem to be rare (?)
    cases where "make debug_install" still seems to have problems.

    * Changes to many host related tool-Makefiles to demonstrate the
    abilities of INST*FLAGS, BSDINSTALL and the new rules in gcc.cfg.
    ..of cause ... but BSDINSTALL is THE standard method to install files
    in most program packages besides rtems. This part of the patch fixes
    some minor protection setting problems, but doesn't support
    TARGET_VARIANTS

    NOTE:
    I hope you will like the BSDINSTALL, INST*FLAGS stuff. It is a step to
    get rid of "install-if-change" and to rely on a more standard
    installation procedure. If you don't like BSDINSTALL, removing it from
    the patch isn't  difficult-  just grep for BSDINSTALL and replace
    BSDINSTALL with INSTALL or MKDIR.


    FINALLY:
    I still have another patch pending (well, not a complete patch yet, it's
    a partial patch to demonstrate the principle), which adds automatic
    rebuilding of files generated by autoconf/configure. At the moment I
    don't dare to submit it, because integrating this patch would require to
    modify all Makefile.ins because we'd need to add a new "include " line
    to each Makefile.in.
1998-07-17 15:49:12 +00:00
Joel Sherrill
57c9bc284e Removed rtems-glom as a generated file. Regenerated aclocal.m4 and configure. 1998-07-07 18:35:01 +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
a5400c06d6 Bare bsp patch from Chris Johns and regenerated files. 1998-06-25 16:21:31 +00:00
Joel Sherrill
9a6994b490 Added freebsd support from Dario Alcocer <alcocer@connectnet.com>. 1998-06-18 15:22:35 +00:00
Joel Sherrill
1388d19eea Regenerated aclocal and configure after cleaning up the check that
a BSP source directory was present to eliminate a chunk of redundant code.
1998-06-04 15:15:08 +00:00
Joel Sherrill
d7c9cbe449 ppc-rtems is now an alias for powerpc-rtems. 1998-06-03 11:22:18 +00:00