From: Alexandre Oliva <aoliva@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: GCC_FOR_TARGET x linker scripts
Date: Thu, 24 Oct 2002 20:18:00 -0000 [thread overview]
Message-ID: <orhefb1a1i.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]
The top-level GCC_FOR_TARGET is set such that, if we're building GNU
ld, it contains -L$$r/ld, such that we find any linker scripts we
might need.
Unfortunately, the definition in gcc/Makefile.in doesn't ever search
that directory, so when running make bootstrap in the gcc
subdirectory, if we need linker scripts from the unified-build
directory, we don't find them. There was also some condition that I
don't remember exactly that led me to conclude that we had to pass
GCC_FOR_TARGET down to sub-makes, otherwise the definition without
the ability to find linker scripts would supersede. I wish I had
contributed this earlier, just when I found the need for it, but I had
forgotten about it. My apologies.
Anyway, here's the patch, tested on mips-sgi-irix6.5 with GNU ld, only
to the point in which I verified that the right definition of
GCC_FOR_TARGET was being used for building target libraries in stage1
of a bootstrap, started from both the top level and from the gcc
sub-directory. It was also fully tested in hundreds of bootstraps
that I ran after coming up with this patch.
I'm checking this in the 3.4-b-i-branch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gcc-for-target.patch --]
[-- Type: text/x-patch, Size: 1756 bytes --]
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* Makefile.in (GCC_FOR_TARGET): Add -L$(objdir)/../ld.
(STAGE2_FLAGS_TO_PASS): Pass GCC_FOR_TARGET.
(stage1_build): Likewise.
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.939.2.10
diff -u -p -r1.939.2.10 Makefile.in
--- gcc/Makefile.in 21 Oct 2002 17:51:50 -0000 1.939.2.10
+++ gcc/Makefile.in 25 Oct 2002 03:04:57 -0000
@@ -182,7 +182,7 @@ USER_H = $(srcdir)/ginclude/float.h \
# The GCC to use for compiling libgcc.a and crt*.o.
# Usually the one we just built.
# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
-GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include
+GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include -L$(objdir)/../ld
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./.
@@ -3314,6 +3314,7 @@ VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_O
# the context of the stage_x rule.
STAGE2_FLAGS_TO_PASS = \
ADAC="\$$(CC)" \
+ GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
CFLAGS="$(BOOT_CFLAGS)" \
LDFLAGS="$(BOOT_LDFLAGS)" \
WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \
@@ -3331,6 +3332,7 @@ STAGE2_FLAGS_TO_PASS = \
stage1_build:
$(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)" \
CFLAGS="$(STAGE1_CFLAGS)" MAKEINFO="$(MAKEINFO)" \
+ GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
MAKEINFOFLAGS="$(MAKEINFOFLAGS)" COVERAGE_FLAGS=
$(STAMP) stage1_build
echo stage1_build > stage_last
[-- Attachment #3: Type: text/plain, Size: 289 bytes --]
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
next reply other threads:[~2002-10-25 3:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-24 20:18 Alexandre Oliva [this message]
2002-10-24 21:16 ` Daniel Jacobowitz
2002-10-24 21:23 ` Alexandre Oliva
2002-10-28 12:37 ` Pass FLAGS_FOR_TARGET to subdirectories (was: Re: GCC_FOR_TARGET x linker scripts) Daniel Jacobowitz
2002-10-28 20:01 ` Daniel Jacobowitz
2002-11-06 10:16 ` Alexandre Oliva
2002-11-06 11:25 ` Daniel Jacobowitz
2002-11-06 12:51 ` Alexandre Oliva
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=orhefb1a1i.fsf@free.redhat.lsd.ic.unicamp.br \
--to=aoliva@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).