diff options
author | YamaArashi <shadow962@live.com> | 2016-02-18 06:41:40 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-02-18 06:41:40 -0800 |
commit | 0c0db63ca2f851b53e8f32b381f3f613b597ccff (patch) | |
tree | 53e9236d58c802533da28ef396c362aaa459076b | |
parent | 9cc5f8edb21ac07bff87def5155ee71dff449e37 (diff) |
stop using configure script to generate header files
-rwxr-xr-x | gcc/Makefile.in | 17 | ||||
-rw-r--r-- | gcc/config.h | 12 | ||||
-rwxr-xr-x | gcc/config/arm/xm-thumb.h | 1 | ||||
-rwxr-xr-x | gcc/config/i386/xm-i386.h | 5 | ||||
-rwxr-xr-x | gcc/configure | 27 | ||||
-rwxr-xr-x | gcc/gcc.c | 53 | ||||
-rwxr-xr-x | gcc/genattr.c | 2 | ||||
-rwxr-xr-x | gcc/genattrtab.c | 2 | ||||
-rwxr-xr-x | gcc/gencodes.c | 2 | ||||
-rwxr-xr-x | gcc/genconfig.c | 2 | ||||
-rwxr-xr-x | gcc/genemit.c | 2 | ||||
-rwxr-xr-x | gcc/genextract.c | 2 | ||||
-rwxr-xr-x | gcc/genflags.c | 2 | ||||
-rwxr-xr-x | gcc/gengenrtl.c | 2 | ||||
-rwxr-xr-x | gcc/genopinit.c | 2 | ||||
-rwxr-xr-x | gcc/genoutput.c | 2 | ||||
-rwxr-xr-x | gcc/genpeep.c | 2 | ||||
-rwxr-xr-x | gcc/genrecog.c | 2 | ||||
-rwxr-xr-x | gcc/system.h | 1 | ||||
-rw-r--r-- | gcc/tconfig.h | 2 |
20 files changed, 33 insertions, 109 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 7b11388..d64f33d 100755 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1145,7 +1145,7 @@ gencheck : gencheck.o tree.def $(lang_tree_files) $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \ gencheck.o -gencheck.o : gencheck.c hconfig.h system.h +gencheck.o : gencheck.c config.h system.h $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencheck.c dumpvers: dumpvers.c @@ -1541,29 +1541,24 @@ gengenrtl.o : gengenrtl.c $(RTL_BASE_H) system.h # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict # with the rules for rtl.o, alloca.o, etc. $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h - rm -f $(HOST_PREFIX)rtl.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c + cp $(srcdir)/rtl.c $(HOST_PREFIX)rtl.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H) - rm -f $(HOST_PREFIX)print-rtl.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c + cp $(srcdir)/print-rtl.c $(HOST_PREFIX)print-rtl.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c $(HOST_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(CONFIG_H) system.h $(RTL_H) \ flags.h $(BASIC_BLOCK_H) $(REGS_H) - rm -f $(HOST_PREFIX)bitmap.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(HOST_PREFIX)bitmap.c + cp $(srcdir)/bitmap.c $(HOST_PREFIX)bitmap.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)bitmap.c $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H) - rm -f $(HOST_PREFIX)rtlanal.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c + cp $(srcdir)/rtlanal.c $(HOST_PREFIX)rtlanal.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c $(HOST_PREFIX_1)obstack.o: $(srcdir)/../libiberty/obstack.c - rm -f $(HOST_PREFIX)obstack.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/../libiberty/obstack.c > $(HOST_PREFIX)obstack.c + cp $(srcdir)/../libiberty/obstack.c $(HOST_PREFIX)obstack.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c # This satisfies the dependency that we get if you cross-compile a compiler diff --git a/gcc/config.h b/gcc/config.h new file mode 100644 index 0000000..eb43651 --- /dev/null +++ b/gcc/config.h @@ -0,0 +1,12 @@ +#include "gansidecl.h" +#include "i386/xm-i386.h" +#include "arm/telf.h" +#ifndef HAVE_ATEXIT +#define HAVE_ATEXIT +#endif +#ifndef POSIX +#define POSIX +#endif +#ifndef BSTRING +#define BSTRING +#endif diff --git a/gcc/config/arm/xm-thumb.h b/gcc/config/arm/xm-thumb.h deleted file mode 100755 index 3356ae2..0000000 --- a/gcc/config/arm/xm-thumb.h +++ /dev/null @@ -1 +0,0 @@ -#include <tm.h> diff --git a/gcc/config/i386/xm-i386.h b/gcc/config/i386/xm-i386.h index 390110a..591d5ac 100755 --- a/gcc/config/i386/xm-i386.h +++ b/gcc/config/i386/xm-i386.h @@ -32,8 +32,3 @@ Boston, MA 02111-1307, USA. */ #define HOST_BITS_PER_INT 32 #define HOST_BITS_PER_LONG 32 #define HOST_BITS_PER_LONGLONG 64 - -/* target machine dependencies. - tm.h is a symbolic link to the actual target specific file. */ - -#include "tm.h" diff --git a/gcc/configure b/gcc/configure index 05c0782..688f5f8 100755 --- a/gcc/configure +++ b/gcc/configure @@ -3264,33 +3264,6 @@ defines="host_xm_defines null_defines xm_defines build_xm_defines" rm -f config.bak if test -f config.status; then mv -f config.status config.bak; fi -# Make the links. -while test -n "$vars" -do - set $vars; var=$1; shift; vars=$* - set $links; link=$1; shift; links=$* - set $defines; define=$1; shift; defines=$* - - rm -f $link - - # Define TARGET_CPU_DEFAULT if the system wants one. - # This substitutes for lots of *.h files. - if test "$target_cpu_default" != "" -a $link = tm.h - then - echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link - fi - - for file in `eval echo '$'$var`; do - echo "#include \"$file\"" >>$link - done - - for def in `eval echo '$'$define`; do - echo "#ifndef $def" >>$link - echo "#define $def" >>$link - echo "#endif" >>$link - done -done - # Truncate the target if necessary if test x$host_truncate_target != x; then target=`echo $target | sed -e 's/\(..............\).*/\1/'` @@ -1917,60 +1917,7 @@ clear_failure_queue () { failure_delete_queue = 0; } - -/* Routine to add variables to the environment. We do this to pass - the pathname of the gcc driver, and the directories search to the - collect2 program, which is being run as ld. This way, we can be - sure of executing the right compiler when collect2 wants to build - constructors and destructors. Since the environment variables we - use come from an obstack, we don't have to worry about allocating - space for them. */ - -#ifndef HAVE_PUTENV - -void -putenv (str) - char *str; -{ - - extern char **environ; - char **old_environ = environ; - char **envp; - int num_envs = 0; - int name_len = 1; - int str_len = strlen (str); - char *p = str; - int ch; - - while ((ch = *p++) != '\0' && ch != '=') - name_len++; - - if (!ch) - abort (); - /* Search for replacing an existing environment variable, and - count the number of total environment variables. */ - for (envp = old_environ; *envp; envp++) - { - num_envs++; - if (!strncmp (str, *envp, name_len)) - { - *envp = str; - return; - } - } - - /* Add a new environment variable */ - environ = (char **) xmalloc (sizeof (char *) * (num_envs+2)); - *environ = str; - memcpy ((char *) (environ + 1), (char *) old_environ, - sizeof (char *) * (num_envs+1)); - -} - -#endif /* HAVE_PUTENV */ - - /* Build a list of search directories from PATHS. PREFIX is a string to prepend to the list. If CHECK_DIR_P is non-zero we ensure the directory exists. diff --git a/gcc/genattr.c b/gcc/genattr.c index 3b3ab2b..a9f4b33 100755 --- a/gcc/genattr.c +++ b/gcc/genattr.c @@ -20,7 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index fd0e5be..f7688f8 100755 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -95,7 +95,7 @@ Boston, MA 02111-1307, USA. */ EQ_ATTR rtx is true if !volatil and false if volatil. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "insn-config.h" /* For REGISTER_CONSTRAINTS */ diff --git a/gcc/gencodes.c b/gcc/gencodes.c index 0002965..679196c 100755 --- a/gcc/gencodes.c +++ b/gcc/gencodes.c @@ -22,7 +22,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genconfig.c b/gcc/genconfig.c index 51d8363..b7666b2 100755 --- a/gcc/genconfig.c +++ b/gcc/genconfig.c @@ -20,7 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genemit.c b/gcc/genemit.c index 833f68a..6338f6c 100755 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genextract.c b/gcc/genextract.c index 08b4327..ee71b6a 100755 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genflags.c b/gcc/genflags.c index 6c5d5f8..7e3b098 100755 --- a/gcc/genflags.c +++ b/gcc/genflags.c @@ -22,7 +22,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c index 21b1cc7..5a7719d 100755 --- a/gcc/gengenrtl.c +++ b/gcc/gengenrtl.c @@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #define NO_GENRTL_H diff --git a/gcc/genopinit.c b/gcc/genopinit.c index 75b3706..43c7e79 100755 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genoutput.c b/gcc/genoutput.c index e3eb74e..1d52550 100755 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -90,7 +90,7 @@ insn_template[24] to be "clrd %0", and insn_n_operands[24] to be 1. It would not make an case in output_insn_hairy because the template given in the entry is a constant (it does not start with `*'). */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genpeep.c b/gcc/genpeep.c index 612fd90..01991c3 100755 --- a/gcc/genpeep.c +++ b/gcc/genpeep.c @@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 2b67391..eefde45 100755 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA. */ which returns 0 if the rtl could not be split, or it returns the split rtl in a SEQUENCE. */ -#include "hconfig.h" +#include "config.h" #include "system.h" #include "rtl.h" #include "obstack.h" diff --git a/gcc/system.h b/gcc/system.h index 08bbfcb..b2f1d1e 100755 --- a/gcc/system.h +++ b/gcc/system.h @@ -72,6 +72,7 @@ Boston, MA 02111-1307, USA. */ #include <sys/stat.h> #include <sys/param.h> #include <sys/time.h> +#include <sys/times.h> #include <sys/wait.h> #include <fcntl.h> diff --git a/gcc/tconfig.h b/gcc/tconfig.h new file mode 100644 index 0000000..86eb1c5 --- /dev/null +++ b/gcc/tconfig.h @@ -0,0 +1,2 @@ +#include "gansidecl.h" +#include "arm/telf.h" |