public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* a more universal BOOT_CFLAGS/BOOT_LDFLAGS
@ 2002-08-07 14:35 Paul Jarc
  2002-08-07 14:38 ` Paul Jarc
  2002-08-13 11:24 ` Paul Jarc
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Jarc @ 2002-08-07 14:35 UTC (permalink / raw)
  To: gcc-help

While building gcc, I want to pass a certain set of flags to every
compilation that uses a gcc we've just built.  (More accurately, I
want to pass these flags to absolutely every compilation whatsoever,
but for the cases where the installed gcc is used, I'm using a wrapper
script that's ahead of the real gcc in $PATH.)  I've tried
BOOT_CFLAGS/BOO_LDFLAGS and TCFLAGS, but it seems that neither of
these is used while compiling crtbegin.o.  Is there any set of
Makefile variables that will collectively cover absolutely all cases
where a newly-built gcc is used?


paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a more universal BOOT_CFLAGS/BOOT_LDFLAGS
  2002-08-07 14:35 a more universal BOOT_CFLAGS/BOOT_LDFLAGS Paul Jarc
@ 2002-08-07 14:38 ` Paul Jarc
  2002-08-13 11:24 ` Paul Jarc
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Jarc @ 2002-08-07 14:38 UTC (permalink / raw)
  To: gcc-help

I wrote:
> I've tried BOOT_CFLAGS/BOO_LDFLAGS and TCFLAGS, but it seems that
> neither of these is used while compiling crtbegin.o.

Just to clarify, there may be other cases where these variables are
not used.  I only know about crtbegin.o because I've set things up so
compilation will fail if my flags are not used, so make stops at
crtbegin.o.


paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a more universal BOOT_CFLAGS/BOOT_LDFLAGS
  2002-08-07 14:35 a more universal BOOT_CFLAGS/BOOT_LDFLAGS Paul Jarc
  2002-08-07 14:38 ` Paul Jarc
@ 2002-08-13 11:24 ` Paul Jarc
  2002-08-13 21:29   ` Paul Jarc
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Jarc @ 2002-08-13 11:24 UTC (permalink / raw)
  To: gcc-help

I wrote:
> While building gcc, I want to pass a certain set of flags to every
> compilation that uses a gcc we've just built.  (More accurately, I
> want to pass these flags to absolutely every compilation whatsoever,
> but for the cases where the installed gcc is used, I'm using a wrapper
> script that's ahead of the real gcc in $PATH.)

The flags I want to pass are -I, -L, -Wl,-R, and -Wl,--dynamic-linker,
so as to link to a glibc installed in a nonstandard directory.  I've
just learned about C_INCLUDE_PATH, LIBRARY_PATH, etc., so I've set
those, and I've included the -Wl, options in CFLAGS, LDFLAGS, XCFLAGS,
TCFLAGS, STAGE1_CFLAGS, and BOOT_CFLAGS.  Most things work, but unless
I use --enable-languages to exclude java, I get this error:

/home/prj/src/sptools/gcc-3.1-2-build/gcc/gcj -B/home/prj/src/sptools/gcc-3.1-2-build/i686-pc-linux-gnu/libjava/ -B/home/prj/src/sptools/gcc-3.1-2-build/gcc/ -ffloat-store -g -O2 -o .libs/jv-convert --main=gnu.gcj.convert.Convert -shared-libgcc  -L/home/prj/src/sptools/gcc-3.1-2-build/i686-pc-linux-gnu/libjava -L/home/prj/src/sptools/gcc-3.1-2-build/i686-pc-linux-gnu/libjava/.libs ./.libs/libgcj.so -L/home/prj/src/sptools/gcc-3.1-2-build/i686-pc-linux-gnu/libstdc++-v3/src -L/home/prj/src/sptools/gcc-3.1-2-build/i686-pc-linux-gnu/libstdc++-v3/src/.libs -lpthread -ldl -L/home/prj/src/sptools/gcc-3.1-2-build/gcc -L/package/host/localhost/gcc-3.1-2/conf/libc/lib -lgcc_s -lc -lgcc_s -Wl,--rpath -Wl,/package/host/localhost/gcc-3.1-2/lib
/package/host/localhost/gcc-3.1-2/conf/ld: warning: ld-linux.so.2, needed by /package/host/localhost/glibc-2.2.5-1/lib/libc.so.6, not found (try using -rpath or -rpath-link)
/package/host/localhost/glibc-2.2.5-1/lib/libc.so.6: undefined reference to `_dl_lazy@GLIBC_2.1.1'
...

So what Makefile variable do I need to set to include the -Wl, options
in that command?


paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: a more universal BOOT_CFLAGS/BOOT_LDFLAGS
  2002-08-13 11:24 ` Paul Jarc
@ 2002-08-13 21:29   ` Paul Jarc
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Jarc @ 2002-08-13 21:29 UTC (permalink / raw)
  To: gcc-help

I wrote:
> The flags I want to pass are -I, -L, -Wl,-R, and -Wl,--dynamic-linker,
> so as to link to a glibc installed in a nonstandard directory.  I've
> just learned about C_INCLUDE_PATH, LIBRARY_PATH, etc., so I've set
> those, and I've included the -Wl, options in CFLAGS, LDFLAGS, XCFLAGS,
> TCFLAGS, STAGE1_CFLAGS, and BOOT_CFLAGS.  Most things work, but unless
> I use --enable-languages to exclude java, I get this error:

Ok, specifying the include and library directories in environment
variables, and specifying the rpath and dynamic linker in all of
CFLAGS, LDFLAGS, STAGE1_CFLAGS, and BOOT_CFLAGS seems to work.
(Shouldn't LDFLAGS alone be enough?  It seems it isn't used at least
for building gengenrtl.)  I was tripped up because only CFLAGS is
taken from the environment by ./configure; the others must be given on
the command line for make.


paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-14  4:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-07 14:35 a more universal BOOT_CFLAGS/BOOT_LDFLAGS Paul Jarc
2002-08-07 14:38 ` Paul Jarc
2002-08-13 11:24 ` Paul Jarc
2002-08-13 21:29   ` Paul Jarc

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).