public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel@rtems.org>
To: orlandoarias@gmail.com
Cc: Newlib <newlib@sourceware.org>,
	Mojca Miklavec <mojca@macports.org>,
		Jeff Johnston <jjohnstn@redhat.com>
Subject: Re: Properly building newlib to install spec files
Date: Sun, 20 Oct 2019 19:28:00 -0000	[thread overview]
Message-ID: <CAF9ehCUBTpgcaB6FmEVy=BSzpuB3GJ_Xqvv0GgOyZsUk7dD5mw@mail.gmail.com> (raw)
In-Reply-To: <27FAF88E-A0CB-4143-9EB1-B536AF0EF275@gmail.com>

I was lucky enough to see Mojca this weekend and spent a few minutes with
her. I can't speak to the msp430 directly but the build was not putting
libgloss under the gcc source directory with newlib. That is needed so the
one tree build can pick it up.

She was headed to the airport and the build didn't finish but hopefully
that was the biggest issue.

When I get home, I am sending her my simple shell scripts to build the bare
metal gcc targets that I use when testing the master.

--joel

On Sun, Oct 20, 2019, 9:21 PM Orlando Arias <orlandoarias@gmail.com> wrote:

> Greetings,
>
> I was under the impression that the nosys.specs file was no longer
> provided for the msp430-elf target in light of the CIO interface being
> added [1][2]. Please correct me if I'm wrong on this.
>
> Cheers,
> Orlando.
>
> [1] https://sourceware.org/ml/newlib/2015/msg00926.html
> [2] https://sourceware.org/ml/newlib/2015/msg00923.html
>
> On October 20, 2019 3:40:17 PM UTC, Mojca Miklavec <mojca@macports.org>
> wrote:
>>
>> Hi,
>>
>> I'm sorry for replying after such a long time, but I could not exactly
>> figure out what I was doing wrong until Joel today pointed out a dirty
>> simple little trick: I just had to make a symlink from gcc sources to
>> libgloss in order to install all the spec files ... and that solution
>> automatically worked, without the need to rebuild gcc the second time
>> (which would cause me a lot of headaches both in terms of
>> bootstrapping and compile times).
>>
>> So basically just a matter of
>>     cd gcc-9.2.0
>>     ln -s ../newlib-3.1.0/libgloss .
>>
>> We were already using
>>     ln -s ../newlib-3.1.0/newlib .
>> just not the libgloss thing.
>>
>> It would be awesome if this was documented somewhere for complete newbies :)
>>
>> I'll update all our cross-compilers to fix this.
>>
>> Thank you very much,
>>     Mojca
>>
>> On Mon, 7 Jan 2019 at 21:50, Jeff Johnston <jjohnstn@redhat.com> wrote:
>>
>>>
>>>  If you build and install the various components to the same installation directory, it should just work.
>>>
>>>  See: https://gist.github.com/resetnow/1b55beed32f3eb3f90513896565ef5c0
>>>
>>>  (your gcc compiler config options may vary)
>>>
>>>  If a spec file is installed somewhere else, you can use the -B option on the compile to specify a location for gcc to look for it.
>>>
>>>  -- Jeff J.
>>>
>>>  On Sat, Jan 5, 2019 at 4:20 PM Mojca Miklavec <mojca@macports.org> wrote:
>>>
>>>>
>>>>  Hi,
>>>>
>>>>  I'm fixing some packages for a package manager. I think I have a bunch
>>>>  of various working gcc crosscompilers, but if I try to test something
>>>>  like
>>>>
>>>>  $ msp430-elf-gcc -mmcu=msp430g2211 -specs=nosys.specs -o test.elf test.c
>>>>  msp430-elf-gcc: error: nosys.specs: No such file or directory
>>>>
>>>>  apparently the specs files are missing.
>>>>
>>>>  I'm creating a symlink from gcc to newlib and build gcc with
>>>>  --with-newlib, but apparently the files don't get installed. I noticed
>>>>  that random instructions suggest separately building:
>>>>  - first gcc
>>>>  - then newlib
>>>>  - then gcc again
>>>>  http://www.ifp.illinois.edu/~nakazato/tips/xgcc.html#gccagain
>>>>
>>>>  while other instructions say to use just --with-newlib.
>>>>
>>>>  Can you please advise me how to build newlib in a proper way, so that
>>>>  the spec files will be installed? Where should they usually end up?
>>>>
>>>>  Thank you very much,
>>>>      Mojca
>>>>
>>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>

  reply	other threads:[~2019-10-20 19:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-05 21:19 Mojca Miklavec
2019-01-07 20:50 ` Jeff Johnston
2019-10-20 15:40   ` Mojca Miklavec
2019-10-20 19:22     ` Orlando Arias
2019-10-20 19:28       ` Joel Sherrill [this message]
2019-10-21  6:45       ` Mojca Miklavec
2019-10-22  7:07       ` Mojca Miklavec
2019-10-22 15:49         ` Orlando Arias
2019-11-06 11:08           ` Jozef Lawrynowicz
2019-11-06 12:25             ` Jozef Lawrynowicz
2019-01-07 22:13 ` Orlando Arias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF9ehCUBTpgcaB6FmEVy=BSzpuB3GJ_Xqvv0GgOyZsUk7dD5mw@mail.gmail.com' \
    --to=joel@rtems.org \
    --cc=jjohnstn@redhat.com \
    --cc=mojca@macports.org \
    --cc=newlib@sourceware.org \
    --cc=orlandoarias@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).