This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Building cross compiler for Solaris2 and PATH_MAX


>   You're building a cross compiler here, rather than a native compiler, so
> the default prefix setting will be /usr/local rather than /usr (and indeed
> you VERY much do NOT want to install a cross compiler directly under /usr
> as you risk damaging your native compiler and thereby getting into an
> un-recoverable position.)

I thought the idea was, you'd have all the compilers installed with the same
prefix, so you can select which one you want to use by passing in a switch
(-b I think)

>   I imagine what you're seeing is Gcc's build procedure failing to find
the
> solaris include files and falling back on the default system includes that
> it keeps in the 'ginclude' subdirectory of the source.  These files were
> only meant to provide absolute minimum fallbacks to get gcc up and running
> on new targets or on embedded systems that have no native toolchain, and
> it's no surprise that they don't provide the relevant #defines that the
> solaris headers need to work properly.  Take a look at the output from the
> build commands, and look at the -I options and the order they occur in:
> from that, you should be able to verify *which* limits.h is being
included.
> However, this is a fairly speculative explanation and I haven't checked my
> facts: assuming the problem is indeed that you put the header files in the
> wrong place, the precise details don't matter except for curiosity's sake,
> just so long as the build works right after you *do* install the headers
> where they're needed!

I've looked at the preprocessed source from the compilation of this file,
here's some of the output from the command
./xgcc -B/usr/sparc-sun-solaris2.8/bin/ -B./ -I/usr/sparc-sun-solaris2.8/inc
lude -DCROSS_COMPILE -DIN_GCC -DHAIFA    -g -I./include  -I. -I. -I./config 
-I./../include -c -E -dD ./config/sparc/gmon-sol2.c

--- output ---
# 173 "/usr/sparc-sun-solaris2.8/include/limits.h"


#define ATEXIT_MAX      32
#define _XOPEN_IOV_MAX  16
#define IOV_MAX         _XOPEN_IOV_MAX
--- output ---

So you can see, the file is getting included and macros are getting defined,
however the PATH_MAX macro isn't, because of the conditional statement in
which it is contained.



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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