aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2022-06-28 09:41:07 -0300
committerAlexandre Oliva <oliva@gnu.org>2022-06-28 09:41:07 -0300
commiteabd44a02529f7921a4997240aaaefb15f1ef81f (patch)
tree77b81818f949a1cbb6f6f0683a31105929475908 /gcc
parentbb1f266a7d602ffee4a070f586351bdfafcb6150 (diff)
downloadgcc-eabd44a02529f7921a4997240aaaefb15f1ef81f.zip
gcc-eabd44a02529f7921a4997240aaaefb15f1ef81f.tar.gz
gcc-eabd44a02529f7921a4997240aaaefb15f1ef81f.tar.bz2
Add TFLAGS to gcc's GCC_FOR_TARGET
When the GCC build runs GCC_FOR_TARGET, e.g. for selftests or for dumping specs, it doesn't use TFLAGS in non-bootstrap scenarios. This patch arranges for TFLAGS to be passed from the top level down to gcc in GCC_FOR_TARGET in this case. Another issue related with TFLAGS fixed herein is that there's no easy way to add a TFLAGS to GCC_FOR_TARGET when running "make gnatlib" within the gcc directory. Overriding all of GCC_FOR_TARGET is somewhat cumbersome, so I'm adding TFLAGS support to gcc/Makefile.in, getting it added to GCC_FOR_TARGET, as it would when passed down from the top level. for ChangeLog * Makefile.tpl (HOST_EXPORTS): Add TFLAGS to GCC_FOR_TARGET. (EXTRA_GCC_FLAGS): Likewise. * Makefile.in: Rebuilt. for gcc/ChangeLog * Makefile.in (TFLAGS): New. (GCC_FOR_TARGET): Add TFLAGS. (FLAGS_TO_PASS): Pass TFLAGS down.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/Makefile.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index b6dcc45..57edc47 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -146,8 +146,11 @@ endif
# CFLAGS is for the user to override to, e.g., do a cross build with -O2.
# TCFLAGS is used for compilations with the GCC just built.
# T_CFLAGS is used for all compilations and is overridden by t-* files.
+# TFLAGS is also for the user to override, passed down from the top-level
+# Makefile. It is used for all compilations.
T_CFLAGS =
TCFLAGS =
+TFLAGS =
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
LDFLAGS = @LDFLAGS@
@@ -457,7 +460,7 @@ T_STDINT_GCC_H = $(srcdir)/ginclude/stdint-gcc.h
# The GCC to use for compiling crt*.o.
# Usually the one we just built.
# Don't use this as a dependency--use $(GCC_PASSES).
-GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include -L$(objdir)/../ld
+GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include -L$(objdir)/../ld $(TFLAGS)
# Set if the compiler was configured with --with-build-sysroot.
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
@@ -1193,6 +1196,7 @@ FLAGS_TO_PASS = \
"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
"MAKEOVERRIDES=" \
"SHELL=$(SHELL)" \
+ "TFLAGS=$(TFLAGS)" \
"exeext=$(exeext)" \
"build_exeext=$(build_exeext)" \
"objext=$(objext)" \