This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: libg.a does not contain debugging information
- From: "Jon Beniston" <jon at beniston dot com>
- To: "'Martin Walter'" <martin dot walter at gmail dot com>, <newlib at sourceware dot org>
- Date: Thu, 20 Aug 2009 23:55:52 +0100
- Subject: RE: libg.a does not contain debugging information
- References: <c55980430908201528q2be2011i6b4ef9ccc0ae9eca@mail.gmail.com>
> I have ported the newlib 1.17.0 to our architecture, but the libg.a
> does not contain any debugging information and has exactly the same
> size as libc.a. This is how I built the newlib:
>
> export GCC_FOR_TARGET=spear32-gcc
> export CFLAGS_FOR_TARGET="-Os --save-temps"
> ./configure --prefix=/opt/spear --target=spear32
> make && make install
> Is there anything wrong with that?
I would guess that by setting CFLAGS_FOR_TARGET you are overriding the -g.
Try:
CFLAGS_FOR_TARGET="-Os --save-temps -g"
Although I think the preferred approach would not be to set
CFLAGS_FOR_TARGET at all, and instead configure with
--enable-target-optspace
Cheers,
Jon