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: More sh-linux-gnu problems (was : newbie questions remain regardingcrosstool...)


Kai Ruottu wrote:
"Kai Ruottu" <karuottu@mbnet.fi> wrote:


My PC is just trying to build glibc-2.3.2 for 'sh-linux-gnu' (with the SH3 defaults).
The build stopped with 'stdio-common/sscanf.c', this function being a builtin with
gcc-3.3.1 for SH, but a hack via wrapping the function with '#ifndef __sh__' and
'#endif' seemed to allow the build to continue...

Hmm, does this fix it? This is what I use in crosstool: http://kegel.com/crosstool/current/patches/glibc-2.3.2/sscanf.patch

 Another 'bug' was found in the linux-2.4.22 kernel headers. The header
'include/linux/types.h' defines the 'struct ustat' and the glibc-2.3.2 sources
also define this in 'sysdeps/generic/bits/ustat.h'. The latter has a wrapper
to make sure that it will not be tried to be redefined, but the '<linux/types.h>'
doesn't use the same needed flag. So adding the same wrapper there:

--------------------------------- clip ----------------------------------------------------
--- 126,139 ----
   * Below are truly Linux-specific types that should never collide with
   * any application/library that wants linux/types.h.
   */

+ #ifndef _STRUCT_USTAT
+ #define _STRUCT_USTAT
  struct ustat {
        __kernel_daddr_t        f_tfree;
        __kernel_ino_t          f_tinode;
        char                    f_fname[6];
        char                    f_fpack[6];
  };
+ #endif

  #endif /* _LINUX_TYPES_H */
--------------------------------- clip ----------------------------------------------------

could be the right way to fix this...

Yes, this is how I fix it in crosstools; see


http://kegel.com/crosstool/current/patches/linux-2.4.21/kaz-types.patch

 Furthermore my 'as' from Linux binutils-2.13.90.0.16 crashed with some 'rtld-' routine
in '$build/elf' and while the update to the recent 2.14.90.0.6 helped for a while, the used
C compiler itself, gcc-3.3.1 for 'sh-linux-gnu', crashed quite soon with:

--------------------------------- clip ----------------------------------------------------
sh-linux-gnu-gcc-3.3 ../sysdeps/unix/sysv/linux/_exit.c -c -std=gnu99 -Os -Wall
<snip>
 -o /home1/src/glibc-2.3.2/build/posix/rtld-_exit.os
../sysdeps/unix/sysv/linux/_exit.c: In function `_exit':
../sysdeps/unix/sysv/linux/_exit.c:44: internal compiler error: Segmentation fault
--------------------------------- clip ----------------------------------------------------

 Maybe using another optimization instead of the '-Os' could have helped...  Or
the bugfixes coming with the new gcc-3.3.2...

I suspect it's not fixed in gcc-3.3.2. Here's a patch I use in crosstool; does it help?


http://kegel.com/crosstool/current/patches/gcc-3.3.1/pr11587.patch

 So although there are 'maintainers' for these FSF things, just taking the current
released (so expected to be thoroughly tested, not any experimental beta) sources,
doesn't necessarily lead to any big success... Generally this kind of approach is not
the best although one could expect the newest ones being most bug-free.

Indeed. That's why I have carefully built up a patch repository at http://kegel.com/crosstool/current/patches with all the patches (and evidence of why they're needed!) I had to use to get various releases of various tools to work properly.

Kai, could you give crosstool-0.24 a try on the situation you're in?  Maybe
it already fixes all the problems you're running into.  If not, I'm working
on getting crosstool-0.25 out, maybe I can incorporate what you find.

In general, crosstool will probably do a better job than J. Random developer
who uploads a precompiled toolchain, so let's work together to make it
really solve all the problems in the released tools, then feed the
fixes upstream.  I've had some luck already, each of the last two gcc
releases has incorporated some of my fixes.
- Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------ 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]