This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Specifying command line arguments in a file?
- To: Matt Hiller <hiller at redhat dot com>
- Subject: Re: Specifying command line arguments in a file?
- From: Robert Schweikert <rjschwei at hks dot com>
- Date: Fri, 27 Apr 2001 14:49:38 -0400
- Cc: gcc at gcc dot gnu dot org
- Organization: Hibbit, Karlsson & Sorensen
- References: <Pine.LNX.4.21.0104271056090.10181-100000@breve.cygnus.com>
Matt Hiller wrote:
> On Fri, 27 Apr 2001, Robert Schweikert wrote:
>
> > handle this special case. It would be much better if gcc would accept a
> > command file.
> >
> > Robert
>
> I take it something like
>
> % g++ `file` foo.C bar.C -o foobar
>
> where file contains, e.g.,
>
> -u ucorr_ -u uel_
>
> wouldn't be a satisfactory solution either? (Or whatever the equivalent in
> your shell is if you're not running a shell that handles this as tcsh or
> bash will.)
Matt,
Thanks, but the back quotes trick is not available in all shells, as you
pointed out and thus I can't use that either. For now I guess I'll revert to
creating a list of my -u options and then stick them directly onto the gcc
command line. I'll try positing another message to the binutils list to see
if I get an answer why EXTERN is not working as I expected it to.
How does gcc get the options to the linker? is there some secret handshake
that I might be able to use?
Thanks,
Robert
>
>
> The behavior that you're getting out of ld is peculiar, though, as
> -u on the command line and EXTERN in the linker script are supposed to be
> equivalent. Try running gcc or g++ with -v to be certain that the -u
> arguments are being passed on to the linker; assuming they are (and they
> should be), you may want to follow up with questions about it to
> binutils@sources.redhat.com.
>
> Matt
--
Robert Schweikert MAY THE SOURCE BE WITH YOU
LINUX