Mail Archives: djgpp/2002/02/10/11:27:55
Eli Zaretskii wrote:
>
> On Sat, 9 Feb 2002, CBFalconer wrote:
>
> > > [1] c:\c\hashlib>gcc -c -gp -v malloc.c
> ^^^
> That should have been -pg, not -gp.
>
... snip gcc -v output ...
>
> How did those "-gstabs+ -W -Wall" got into this this command? Did you
> edit your specs file or something?
>
Through an alias I use.
> > > c:/djgpp/lib/gcc-lib/djgpp/2.953/cc1.exe c:/djgpp/tmp\cc8K2mXk.i -quiet -dumpba
> > > se malloc.c -ansi -gstabs+ -gp -W -Wall -pedantic -version -o c:/djgpp/tmp\ccNNoJKC.s
Don't understand this comment.
>
> It will never work to compile library functions with "-ansi -pedantic",
> so it's no use trying. If you want a paranoiac set of compiler
> switches that does work, use the ones in the file gcc.opt from
> djlsr203.zip (but drop the -nostdinc one, for obvious reasons).
>
> > > cc1.exe: warning: `-gp' not supported by this configuration of GCC
>
> Expected, because you should use -gp.
>
> > > GNU C version 2.95.3 20010315/djgpp (release) (djgpp) compiled by GNU C version
> > > 2.95.3 20010315/djgpp (release).
> > > malloc.c:61: syntax error before `int'
...
>
> Expected, because you shouldn't use -ansi -pedantic (ANSI C doesn't
> know about `inline').
>
> > Should I be using gstabs+, gstabs, or g?
>
> It doesn't matter, any -gSOMETHING switch will do for profiling.
>
> > I assume that if malloc is linked before the library search the
> > library version will be omitted?
>
> Yes, of course: ld.exe is a one-pass linker.
>
> > All doubtless 2nd nature to you, but not to me. Hand holding
> > needed :-)
>
> Don't give up, help is on its way ;-)
Thanks. I think that covers it when I get back to trying things
out.
--
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net)
Available for consulting/temporary embedded and systems.
(Remove "XXXX" from reply address. yahoo works unmodified)
mailto:uce AT ftc DOT gov (for spambots to harvest)
- Raw text -