mirror of
https://github.com/pret/agbcc.git
synced 2026-07-13 14:40:53 -05:00
stop using configure script to generate header files
This commit is contained in:
parent
9cc5f8edb2
commit
0c0db63ca2
|
|
@ -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
|
||||
|
|
|
|||
12
gcc/config.h
Normal file
12
gcc/config.h
Normal file
|
|
@ -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
|
||||
|
|
@ -1 +0,0 @@
|
|||
#include <tm.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"
|
||||
|
|
|
|||
27
gcc/configure
vendored
27
gcc/configure
vendored
|
|
@ -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/'`
|
||||
|
|
|
|||
53
gcc/gcc.c
53
gcc/gcc.c
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
2
gcc/tconfig.h
Normal file
2
gcc/tconfig.h
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#include "gansidecl.h"
|
||||
#include "arm/telf.h"
|
||||
Loading…
Reference in New Issue
Block a user