This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do I point out OS includes? -- Or how to Build My Own SDK using Newlib


Jonathan S. Shapiro wrote:
Duane:

Thanks for your reply.

In our case, the specific step we are dying at is the header file copy
step.

We are doing a similar build strategy to the one you advocate:

  1. Build and install cross-binutils
  2. Build and install "pregcc"
  3. Build and install newlib
  4. Build and install gcc
  5. Install some missing cross-gcc symlinks by hand
  6. Build and install gcc crtfiles (crt1, crti, crtn)

This worked fine until we added g++ build in step 4. g++ itself builds
fine, but libstdc++-v3 fails. More precisely, libiberty build fails due
to missing headers.

As far as I can tell, all of the required headers were installed during
the newlib install step, so I am not clear why gcc fails to find them.
Note: we are not getting the "this is only a stub" error (which I know
about already). The problem is that the #include fails because it cannot
resolve the header file path.

So first: are we using the right general build approach?
second: obviously we need to copy some headers. Where should they be
copied *to*?


I would suggest you at least cc the gcc and libstdc++ mailing lists on this topic.


I can't personally offer too much help on this.

Note the following, however:

Top level configure will default --without-newlib if you specify both --with-headers and --with-libs without explicitly stating --with-newlib.

# If both --with-headers and --with-libs are specified, default to
# --without-newlib.
if test x"${with_headers}" != x && test x"${with_headers} != xno \
   && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
  if test x"${with_newlib}" = x ; then
    with_newlib=no
  fi
fi

and libstdc++-v3 is watching for with_newlib. Perhaps you have specified both the previous settings and not explicitly stated --with-newlib?

-- Jeff J.




Thanks,


Jonathan




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]