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] |
>-----Original Message----- >From: Vermeulen Jan [mailto:Jan.Vermeulen@siemens.atea.be] >Sent: 26 February 2002 10:47 >Ah, thanks for the pointer... I checked it out and I see: > ><quoting> >MULTILIB_OPTIONS = msoft-float \ > mlittle/mbig \ > mcall-sysv/mcall-aix \ > fleading-underscore > >MULTILIB_DIRNAMES = nof \ > le be \ > cs ca \ > und ></quoting> > >So, i guess that some libraries will not have been made. >But which ones? The ones containing leading underscores for >the functions or those without them? No; the way multilibbing works is that not only do all these variant libraries get made, but unless you take steps to prevent it, each and every *combination* of them will be made; then, according to the combination of flags that you use for *your* code at compile time, gcc can choose the correct variant of multilib, by simply looking in the right combination of subdirectory names under $prefix/lib/gcc-lib/$target/$version. In the MULTILIB_OPTIONS, when you see two options separated by /, that means they are mutually exclusive: > mlittle/mbig \ means only use -mbig or -mlittle, not both. Let me simplify that example: >MULTILIB_OPTIONS = msoft-float \ > mlittle/mbig > >MULTILIB_DIRNAMES = nof \ > le be Now, in this case, it would try and build all 8 combinations (think binary: each option can be on or off, and there are three). In the table here, the subdirectories are given considering . (the current dir) to be the appropriate libs dir. The switches listed are found by combining the entries in MULTILIB_OPTIONS, and the subdirectory is chosen by appending the path elements from MULTILIB_DIRNAMES. The switches are used when compiling libgcc (and the other target libs, such as libstdc++ and libiberty), and the directory hierarchy exists under $prefix/$target/lib (libstdc++, libiberty get installed here) and also as the same tree under $prefix/lib/gcc-lib/$target/$version, where libgcc variants get installed: # combination into subdir using switches = =========== =========== ============== 0 -none- . 1 be ./be -mbig 2 le ./le -mlittle 3 be + le ./be/le -mbig -mlittle 4 nof ./nof -msoft-float 5 nof + be ./nof/be -msoft-float -mbig 6 nof + le ./nof/le -msoft-float -mlittle 7 nof + le + be ./nof/le/be -msoft-float -mlittle -mbig But mlittle/mbig are marked as mutually exclusive, so it doesn't do that: # combination into subdir using switches = =========== =========== ============== 0 -none- . 1 be ./be -mbig 2 le ./le -mlittle 4 nof ./nof -msoft-float 5 nof + be ./nof/be -msoft-float -mbig 6 nof + le ./nof/le -msoft-float -mlittle OK, so going back to your original example: ><quoting> >MULTILIB_OPTIONS = msoft-float \ > mlittle/mbig \ > mcall-sysv/mcall-aix \ > fleading-underscore > >MULTILIB_DIRNAMES = nof \ > le be \ > cs ca \ > und ></quoting> We should expect to see every combination of libraries, except that they must all be either big or little endian, but not both; and that they should all use sysv or aix calling conventions, but not both. There's one last bit: the MULTILIB_EXCEPTIONS, which provides a way to discard a few more specific combinations. In 2.95.x it says: MULTILIB_EXCEPTIONS = *mbig/*mcall-linux* \ *mlittle/*mcall-linux* \ *msoft-float/*mcall-linux* Now, this means that no library will be built for any of the flag combinations "-mbig -mcall-linux", "-mlittle -mcall-linux", and "-msoft-float -mcall-linux". Why is this? Well, just to save disk space and time spent building the compiler. Linux is always big-endian on ppc, and since big-endian is the default when *no* endian flag is supplied, there is no need to make a "-mbig -mcall-linux" variant when you already have plain "-mcall-linux". There is no need for "-mlittle -mcall-linux" because PPC linux does not run in little endian mode, so it would never work, and likewise, ppc linux *demands* hardware floating point, so there is no need to make a soft-float variant either. If you want more info than this, read the relevant chapters of the "Using and Porting the gcc compiler" doc: " Fragments:: Writing the `t-TARGET' and `x-HOST' files." cheers, DaveK -- Burn your ID card! http://www.optional-identity.org.uk/ Help support the campaign, copy this into your .sig! ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ------ 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] |