This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: nosys.specs in newlib 2.2.0
- From: "lange at chello dot at" <lange at chello dot at>
- To: "Bin.Cheng" <amker dot cheng at gmail dot com>
- Cc: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Thu, 29 Jan 2015 11:55:18 +0100 (CET)
- Subject: Re: nosys.specs in newlib 2.2.0
- Authentication-results: sourceware.org; auth=none
- References: <1858270668 dot 2066289 dot 1422384387213 dot open-xchange at upcmail dot upc dot at> <CAHFci28rjA_C=ZuVYjB5dvE7Bin_dBV2vyMoXZKjGP=Om-v9Rg at mail dot gmail dot com>
- Reply-to: "lange at chello dot at" <lange at chello dot at>
> ---------- UrsprÃngliche Nachricht ----------
> Von: "Bin.Cheng" <amker.cheng@gmail.com>
> An: "lange@chello.at" <lange@chello.at>
> Cc: "newlib@sourceware.org" <newlib@sourceware.org>
> Datum: 29. Januar 2015 um 03:13
> Betreff: Re: nosys.specs in newlib 2.2.0
>
> On Wed, Jan 28, 2015 at 2:46 AM, lange@chello.at <lange@chello.at> wrote:
> > Hello,
> >
> > I am trying to use the nosys.specs, but they appear to be adding a library
> > group
> > instead of replacing the default. This apparently means that some symbols
> > arent
> > resolved (_kill could not be resolved in one of my projects), I really cant
> > follow why.
> >
> > The target "link_gcc_c_sequence" is nothing gcc understands and it should be
> > lib
> > instead. I suppose the simple solution of renaming it wouldnt work together
> > with
> > nano.specs.
> >
> > I get the following output for these commands (test.c consists of an empty
> > main
> > function):
> >
> > arm-none-eabi-gcc -O2 -v test.c
> > /prefix/libexec/gcc/arm-none-eabi/4.8.4/collect2 -X
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crti.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtbegin.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/crt0.o
> > -L/prefix/lib/gcc/arm-none-eabi/4.8.4
> > -L/prefix/lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib
> > /tmp/cclh9vw4.o
> > --start-group -lgcc -lc --end-group
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtend.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtn.o
> >
> > arm-none-eabi-gcc -O2 -v --specs=nosys.specs test.c
> > /prefix/libexec/gcc/arm-none-eabi/4.8.4/collect2 -X
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crti.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtbegin.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/crt0.o
> > -L/prefix/lib/gcc/arm-none-eabi/4.8.4
> > -L/prefix/lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib
> > /tmp/ccmPSRKU.o
> > --start-group -lgcc -lc --end-group --start-group -lgcc -lc -lnosys
> > --end-group
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtend.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtn.o
> >
> > arm-none-eabi-gcc -O2 -g -v --specs=nosys.specs test.c
> > /prefix/libexec/gcc/arm-none-eabi/4.8.4/collect2 -X
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crti.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtbegin.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/crt0.o
> > -L/prefix/lib/gcc/arm-none-eabi/4.8.4
> > -L/prefix/lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib
> > /tmp/ccVjsYCn.o
> > --start-group -lgcc -lg -lc --end-group --start-group -lgcc -lc -lnosys
> > --end-group
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtend.o
> > /prefix/lib/gcc/arm-none-eabi/4.8.4/crtn.o
> >
> >
> Hi lange,
> Sorry for the inconvenience, indeed I made that change for nano.specs.
> It's been sometime since I touched specs, so I don't yet understand
> the problem here. Do you mean the "-lg" added in the last command?
> It would be very helpful if I can have a simple case for this.
> I will find some time to play with nano.specs later.
>
> Thanks,
> bin
Hello,
the problem is, and I will refer to the output just as Example 1, 2, 3 for
better readability:
Example 1 is the reference
Example 2 should add -lnosys to the existing group.
Should: --start-group -lgcc -lc -lnosys --end-group
Is : --start-group -lgcc -lc --end-group --start-group -lgcc -lc -lnosys
--end-group
Example 3 should do the same as Example 2, its just slightly more wrong by
linking 2 different c libraries
Should: --start-group -lgcc -lg -lnosys --end-group
Is : --start-group -lgcc -lg -lc --end-group --start-group -lgcc -lc -lnosys
--end-group
You can easily reproduce this, just create test.c with
echo -> test.c "int main() {}"
If you fixed this, please also test if combination of "nano" and "nosys" works
correctly
The other thing might be something thats messed up by me, but the specs
certainly aint working as it should.
Kind Regards,
Norbert Lange