From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: zack@codesourcery.com (Zack Weinberg)
Cc: gcc-patches@gcc.gnu.org, law@redhat.com
Subject: Patch: Use tm_defines to configure default scheduling model on PA
Date: Wed, 05 Jun 2002 12:55:00 -0000 [thread overview]
Message-ID: <200206051955.g55JtK96020075@hiauly1.hia.nrc.ca> (raw)
In-Reply-To: <20020531181147.GK16702@codesourcery.com> from "Zack Weinberg" at May 31, 2002 11:11:47 am
> > This patch introduces a mechanism to configure the default scheduling
> > model. The 700 model is used for pa1.0 targets, the 7100 model is
> > used for pa1.1 targets, and the 8000 model is used for all other
> > targets (ie., it's still the default). The sophisticated user
> > can define TARGET_SCHED_DEFAULT in BOOT_CFLAGS if some other default
> > is desired.
>
> May I suggest that you create and use a 'tm_defines' variable along
> the lines of the existing xm_defines, rather than having lots of tiny
> pa-<n>.h headers?
As per Zack's suggestion, I have created a 'tm_defines' along with the
necessary infrastructure to output target defines in the 'config.h'
files. This avoids having the pa-700.h and pa-7100.h headers. Hopefully,
this will be useful on other ports as well. Tested with a build with
no regressions on hppa1.1-hp-hpux11.11.
OK for the mainline?
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2002-06-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
* Makefile.in (tm_defines): New configuration variable.
(cs-config.h, cs-hconfig.h, cs-tconfig.h): Rename DEFINES to XM_DEFINES.
Pass tm_defines in TM_DEFINES.
(cs-tm_p.h): Rename DEFINES to XM_DEFINES. Pass TM_DEFINES.
* config.gcc (tm_defines): New configuration variable.
(hppa*-*-* | parisc*-*-*): Use tm_defines instead of pa-700.h and
pa-7100.h headers. Change hppa1* scheduling default to 7100LC.
* configure.in: Substitute tm_defines.
* configure: Rebuilt.
* mkconfig.sh: Rename DEFINES to XM_DEFINES. Output TM_DEFINES.
* pa/pa-700.h: Delete file.
* pa/pa-7100.h: Delete file.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.888
diff -u -3 -p -r1.888 Makefile.in
--- Makefile.in 4 Jun 2002 07:06:51 -0000 1.888
+++ Makefile.in 5 Jun 2002 15:59:56 -0000
@@ -259,6 +259,7 @@ tmake_file=@dep_tmake_file@
out_file=$(srcdir)/config/@out_file@
out_object_file=@out_object_file@
md_file=$(srcdir)/config/@md_file@
+tm_defines=@tm_defines@
tm_p_file_list=@tm_p_file_list@
tm_p_file=@tm_p_file@
build_xm_file_list=@build_xm_file_list@
@@ -845,22 +846,26 @@ tconfig.h: cs-tconfig.h ; @true
tm_p.h: cs-tm_p.h ; @true
cs-config.h: Makefile
- HEADERS="$(host_xm_file)" DEFINES="$(host_xm_defines)" \
+ TM_DEFINES="$(tm_defines)" \
+ HEADERS="$(host_xm_file)" XM_DEFINES="$(host_xm_defines)" \
TARGET_CPU_DEFAULT="$(target_cpu_default)" \
$(SHELL) $(srcdir)/mkconfig.sh config.h
cs-hconfig.h: Makefile
- HEADERS="$(build_xm_file)" DEFINES="$(build_xm_defines)" \
+ TM_DEFINES="$(tm_defines)" \
+ HEADERS="$(build_xm_file)" XM_DEFINES="$(build_xm_defines)" \
TARGET_CPU_DEFAULT="$(target_cpu_default)" \
$(SHELL) $(srcdir)/mkconfig.sh hconfig.h
cs-tconfig.h: Makefile
- HEADERS="$(xm_file)" DEFINES="$(xm_defines)" \
+ TM_DEFINES="$(tm_defines)" \
+ HEADERS="$(xm_file)" XM_DEFINES="$(xm_defines)" \
TARGET_CPU_DEFAULT="" \
$(SHELL) $(srcdir)/mkconfig.sh tconfig.h
cs-tm_p.h: Makefile
- HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \
+ TM_DEFINES="" \
+ HEADERS="$(tm_p_file)" XM_DEFINES="" TARGET_CPU_DEFAULT="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_p.h
# Don't automatically run autoconf, since configure.in might be accidentally
Index: config.gcc
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.204
diff -u -3 -p -r1.204 config.gcc
--- config.gcc 4 Jun 2002 22:20:37 -0000 1.204
+++ config.gcc 5 Jun 2002 15:59:57 -0000
@@ -45,6 +45,8 @@
#
# cpu_type The name of the cpu, if different from machine.
#
+# tm_defines List of target macros to define for all compilations.
+#
# tm_file A list of target macro files, if different from
# "$cpu_type/$cpu_type.h". Usually it's constructed
# per target in a way like this:
@@ -184,6 +186,7 @@ extra_host_objs=
extra_gcc_objs=
c_target_objs=
cxx_target_objs=
+tm_defines=
xm_defines=
float_format=
# Set this to force installation and use of collect2.
@@ -2824,11 +2827,8 @@ hppa*-*-* | parisc*-*-*)
target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
fi
case $machine in
- hppa1.0* | parisc1.0*)
- tm_file="pa/pa-700.h ${tm_file}"
- ;;
- hppa1.1* | parisc1.1*)
- tm_file="pa/pa-7100.h ${tm_file}"
+ hppa1* | parisc1*)
+ tm_defines="TARGET_SCHED_DEFAULT=\\\"7100LC\\\""
;;
esac
;;
Index: configure.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/configure.in,v
retrieving revision 1.599
diff -u -3 -p -r1.599 configure.in
--- configure.in 4 Jun 2002 22:20:41 -0000 1.599
+++ configure.in 5 Jun 2002 15:59:58 -0000
@@ -2552,6 +2552,7 @@ AC_SUBST(symbolic_link)
AC_SUBST(thread_file)
AC_SUBST(tm_file_list)
AC_SUBST(tm_file)
+AC_SUBST(tm_defines)
AC_SUBST(tm_p_file_list)
AC_SUBST(tm_p_file)
AC_SUBST(xm_file)
Index: mkconfig.sh
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/mkconfig.sh,v
retrieving revision 1.10
diff -u -3 -p -r1.10 mkconfig.sh
--- mkconfig.sh 4 Jun 2002 07:07:51 -0000 1.10
+++ mkconfig.sh 5 Jun 2002 15:59:58 -0000
@@ -2,11 +2,11 @@
# Generate gcc's config.h, which is not your normal autoconf-generated
# config.h (that's auto-(host|build).h). $1 is the file to generate.
-# HEADERS, DEFINES, and possibly TARGET_CPU_DEFAULT are expected to be
-# set in the environment.
+# TM_DEFINES, HEADERS, XM_DEFINES, and possibly TARGET_CPU_DEFAULT are
+# expected to be set in the environment.
if [ -z "$1" ]; then
- echo "Usage: HEADERS='list' DEFINES='list' mkconfig.sh FILE" >&2
+ echo "Usage: TM_DEFINES='list' HEADERS='list' XM_DEFINES='list' mkconfig.sh FILE" >&2
exit 1
fi
@@ -19,6 +19,13 @@ if [ "$TARGET_CPU_DEFAULT" != "" ]; then
echo "#define TARGET_CPU_DEFAULT ($TARGET_CPU_DEFAULT)" >> ${output}T
fi
+# Provide defines for other target machine macros to be used everywhere.
+for def in $TM_DEFINES; do
+ echo "#ifndef $def" | sed 's/=.*//' >> ${output}T
+ echo "# define $def" | sed 's/=/ /' >> ${output}T
+ echo "#endif" >> ${output}T
+done
+
# The first entry in HEADERS may be auto-host.h or auto-build.h;
# it wants to be included even when not -DIN_GCC.
if [ -n "$HEADERS" ]; then
@@ -63,7 +70,7 @@ if [ -n "$HEADERS" ]; then
echo '#endif' >> ${output}T
fi
-for def in $DEFINES; do
+for def in $XM_DEFINES; do
echo "#ifndef $def" | sed 's/=.*//' >> ${output}T
echo "# define $def" | sed 's/=/ /' >> ${output}T
echo "#endif" >> ${output}T
next prev parent reply other threads:[~2002-06-05 19:55 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-30 21:26 Mechanism " John David Anglin
2002-05-31 10:32 ` law
2002-05-31 11:08 ` John David Anglin
2002-05-31 11:29 ` law
2002-05-31 12:02 ` John David Anglin
2002-05-31 12:16 ` law
2002-05-31 13:13 ` John David Anglin
2002-05-31 15:37 ` law
2002-05-31 11:23 ` Zack Weinberg
2002-06-05 12:55 ` John David Anglin [this message]
2002-06-05 13:21 ` Patch: Use tm_defines " Neil Booth
2002-06-05 13:34 ` John David Anglin
2002-06-05 13:59 ` Neil Booth
2002-06-05 14:17 ` John David Anglin
2002-06-05 14:23 ` Neil Booth
[not found] <no.id>
2002-06-05 14:23 ` John David Anglin
2002-06-12 10:03 ` John David Anglin
2002-06-12 10:23 ` DJ Delorie
2002-06-12 10:51 ` John David Anglin
2002-06-12 11:17 ` DJ Delorie
2002-06-12 11:47 ` John David Anglin
2002-06-12 12:01 ` DJ Delorie
2002-06-12 13:01 ` John David Anglin
2002-06-15 11:04 ` John David Anglin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200206051955.g55JtK96020075@hiauly1.hia.nrc.ca \
--to=dave@hiauly1.hia.nrc.ca \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=zack@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).