* gcc-3.2
@ 2002-08-30 6:51 Jeff Chua
2002-09-01 12:30 ` gcc-3.2 Martin Brulisauer
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Chua @ 2002-08-30 6:51 UTC (permalink / raw)
To: Linux Kernel
Just to let everyone knows that gcc-3.2 compiled the linux-2.4.20-pre5
cleanly and booted up successfully.
If you recompile glib2.25 after installing gcc-3.2, you'll need to patch
glib2.25 sysdeps divdi3.c.
Thanks,
Jeff
[ jchua@fedex.com ]
^ permalink raw reply [flat|nested] 4+ messages in thread
* gcc-3.2
@ 2002-08-30 9:02 Klaus Dittrich
2002-08-30 15:24 ` Jeff Chua
0 siblings, 1 reply; 4+ messages in thread
From: Klaus Dittrich @ 2002-08-30 9:02 UTC (permalink / raw)
To: linux mailing-list
I compiled linux-2.4.20-pre5 using gcc-3.2,
glibc2.2.5 (build with gcc-3.1.1) and binutils-2.13.90.0.4.
No problems here. (SMP, PIII-800, Intel-BX)
Please mail me the location of the patch for glibc-2.2.5.
--
Regards Klaus
^ permalink raw reply [flat|nested] 4+ messages in thread
* (no subject)
2002-08-30 9:02 gcc-3.2 Klaus Dittrich
@ 2002-08-30 15:24 ` Jeff Chua
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Chua @ 2002-08-30 15:24 UTC (permalink / raw)
To: Klaus Dittrich; +Cc: linux mailing-list
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1545 bytes --]
Attached are the two files to solve the __udivdi3, version GLIBC_2.0 no
symbol errors ...
Put the divdi3.c to glibc-2.2.5/sysdeps/wordsize-32/divdi3.c, and Makefile
to glibc-2.2.5/sysdeps/i386/Makefile
If you can't get these attachment, you can try downloading from ...
[divdi3.c]
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-32/divdi3.c
[Makefile]
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/?cvsroot=glibc
After replacing these files, recompile glibc-2.2.5 again.
If you don't apply these patches, you won't be able to run X11 programs
such as mozilla or vmware (__udivdi3 undefined).
If you download divdi3.c from the cvs site, make sure you commented out
the following like below, else the code will fail to compile with the
stock glibc-2.2.5 source.
//INTDEF(__divdi3)
All files compiled with the new gcc3.2 and recompiled glibc-2.2.5 will
save you some space after you strip them. Seems to be more efficient.
Thanks,
Jeff
[ jchua@fedex.com ]
On Fri, 30 Aug 2002, Klaus Dittrich wrote:
> I compiled linux-2.4.20-pre5 using gcc-3.2,
> glibc2.2.5 (build with gcc-3.1.1) and binutils-2.13.90.0.4.
>
> No problems here. (SMP, PIII-800, Intel-BX)
>
> Please mail me the location of the patch for glibc-2.2.5.
> --
> Regards Klaus
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
[-- Attachment #2: Type: TEXT/plain, Size: 6651 bytes --]
/* 64-bit multiplication and division
Copyright (C) 1989, 1992-1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <endian.h>
#include <stdlib.h>
#include <bits/wordsize.h>
#if __WORDSIZE != 32
#error This is for 32-bit targets only
#endif
typedef unsigned int UQItype __attribute__ ((mode (QI)));
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
#define Wtype SItype
#define HWtype SItype
#define DWtype DItype
#define UWtype USItype
#define UHWtype USItype
#define UDWtype UDItype
#define W_TYPE_SIZE 32
#include <stdlib/longlong.h>
#if __BYTE_ORDER == __BIG_ENDIAN
struct DWstruct { Wtype high, low;};
#elif __BYTE_ORDER == __LITTLE_ENDIAN
struct DWstruct { Wtype low, high;};
#else
#error Unhandled endianity
#endif
typedef union { struct DWstruct s; DWtype ll; } DWunion;
/* Prototypes of exported functions. */
extern DWtype __divdi3 (DWtype u, DWtype v);
extern DWtype __moddi3 (DWtype u, DWtype v);
extern UDWtype __udivdi3 (UDWtype u, UDWtype v);
extern UDWtype __umoddi3 (UDWtype u, UDWtype v);
static UDWtype
__udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp)
{
DWunion ww;
DWunion nn, dd;
DWunion rr;
UWtype d0, d1, n0, n1, n2;
UWtype q0, q1;
UWtype b, bm;
nn.ll = n;
dd.ll = d;
d0 = dd.s.low;
d1 = dd.s.high;
n0 = nn.s.low;
n1 = nn.s.high;
#if !UDIV_NEEDS_NORMALIZATION
if (d1 == 0)
{
if (d0 > n1)
{
/* 0q = nn / 0D */
udiv_qrnnd (q0, n0, n1, n0, d0);
q1 = 0;
/* Remainder in n0. */
}
else
{
/* qq = NN / 0d */
if (d0 == 0)
d0 = 1 / d0; /* Divide intentionally by zero. */
udiv_qrnnd (q1, n1, 0, n1, d0);
udiv_qrnnd (q0, n0, n1, n0, d0);
/* Remainder in n0. */
}
if (rp != 0)
{
rr.s.low = n0;
rr.s.high = 0;
*rp = rr.ll;
}
}
#else /* UDIV_NEEDS_NORMALIZATION */
if (d1 == 0)
{
if (d0 > n1)
{
/* 0q = nn / 0D */
count_leading_zeros (bm, d0);
if (bm != 0)
{
/* Normalize, i.e. make the most significant bit of the
denominator set. */
d0 = d0 << bm;
n1 = (n1 << bm) | (n0 >> (W_TYPE_SIZE - bm));
n0 = n0 << bm;
}
udiv_qrnnd (q0, n0, n1, n0, d0);
q1 = 0;
/* Remainder in n0 >> bm. */
}
else
{
/* qq = NN / 0d */
if (d0 == 0)
d0 = 1 / d0; /* Divide intentionally by zero. */
count_leading_zeros (bm, d0);
if (bm == 0)
{
/* From (n1 >= d0) /\ (the most significant bit of d0 is set),
conclude (the most significant bit of n1 is set) /\ (the
leading quotient digit q1 = 1).
This special case is necessary, not an optimization.
(Shifts counts of W_TYPE_SIZE are undefined.) */
n1 -= d0;
q1 = 1;
}
else
{
/* Normalize. */
b = W_TYPE_SIZE - bm;
d0 = d0 << bm;
n2 = n1 >> b;
n1 = (n1 << bm) | (n0 >> b);
n0 = n0 << bm;
udiv_qrnnd (q1, n1, n2, n1, d0);
}
/* n1 != d0... */
udiv_qrnnd (q0, n0, n1, n0, d0);
/* Remainder in n0 >> bm. */
}
if (rp != 0)
{
rr.s.low = n0 >> bm;
rr.s.high = 0;
*rp = rr.ll;
}
}
#endif /* UDIV_NEEDS_NORMALIZATION */
else
{
if (d1 > n1)
{
/* 00 = nn / DD */
q0 = 0;
q1 = 0;
/* Remainder in n1n0. */
if (rp != 0)
{
rr.s.low = n0;
rr.s.high = n1;
*rp = rr.ll;
}
}
else
{
/* 0q = NN / dd */
count_leading_zeros (bm, d1);
if (bm == 0)
{
/* From (n1 >= d1) /\ (the most significant bit of d1 is set),
conclude (the most significant bit of n1 is set) /\ (the
quotient digit q0 = 0 or 1).
This special case is necessary, not an optimization. */
/* The condition on the next line takes advantage of that
n1 >= d1 (true due to program flow). */
if (n1 > d1 || n0 >= d0)
{
q0 = 1;
sub_ddmmss (n1, n0, n1, n0, d1, d0);
}
else
q0 = 0;
q1 = 0;
if (rp != 0)
{
rr.s.low = n0;
rr.s.high = n1;
*rp = rr.ll;
}
}
else
{
UWtype m1, m0;
/* Normalize. */
b = W_TYPE_SIZE - bm;
d1 = (d1 << bm) | (d0 >> b);
d0 = d0 << bm;
n2 = n1 >> b;
n1 = (n1 << bm) | (n0 >> b);
n0 = n0 << bm;
udiv_qrnnd (q0, n1, n2, n1, d1);
umul_ppmm (m1, m0, q0, d0);
if (m1 > n1 || (m1 == n1 && m0 > n0))
{
q0--;
sub_ddmmss (m1, m0, m1, m0, d1, d0);
}
q1 = 0;
/* Remainder in (n1n0 - m1m0) >> bm. */
if (rp != 0)
{
sub_ddmmss (n1, n0, n1, n0, m1, m0);
rr.s.low = (n1 << b) | (n0 >> bm);
rr.s.high = n1 >> bm;
*rp = rr.ll;
}
}
}
}
ww.s.low = q0;
ww.s.high = q1;
return ww.ll;
}
DWtype
__divdi3 (DWtype u, DWtype v)
{
Wtype c = 0;
DWtype w;
if (u < 0)
{
c = ~c;
u = -u;
}
if (v < 0)
{
c = ~c;
v = -v;
}
w = __udivmoddi4 (u, v, NULL);
if (c)
w = -w;
return w;
}
//INTDEF(__divdi3)
DWtype
__moddi3 (DWtype u, DWtype v)
{
Wtype c = 0;
DWtype w;
if (u < 0)
{
c = ~c;
u = -u;
}
if (v < 0)
v = -v;
__udivmoddi4 (u, v, &w);
if (c)
w = -w;
return w;
}
UDWtype
__udivdi3 (UDWtype u, UDWtype v)
{
return __udivmoddi4 (u, v, NULL);
}
UDWtype
__umoddi3 (UDWtype u, UDWtype v)
{
UDWtype w;
__udivmoddi4 (u, v, &w);
return w;
}
[-- Attachment #3: Type: TEXT/PLAIN, Size: 809 bytes --]
# The mpn functions need a #define for asm syntax flavor.
# Every i386 port in use uses gas syntax (I think).
asm-CPPFLAGS += -DGAS_SYNTAX
# The i386 `long double' is a distinct type we support.
long-double-fcts = yes
ifeq ($(subdir),csu)
# On i686 we must avoid generating the trampoline functions generated
# to get the GOT pointer.
CFLAGS-initfini.s += -march=i386 -mcpu=i386
ifeq (yes,$(build-shared))
# Compatibility
sysdep_routines += divdi3
shared-only-routines += divdi3
endif
endif
ifeq ($(subdir),db2)
CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_X86_GCC=1
endif
ifeq ($(subdir),gmon)
sysdep_routines += i386-mcount
endif
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
CFLAGS-dl-load.c += -Wno-unused
CFLAGS-dl-reloc.c += -Wno-unused
endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gcc-3.2
2002-08-30 6:51 gcc-3.2 Jeff Chua
@ 2002-09-01 12:30 ` Martin Brulisauer
0 siblings, 0 replies; 4+ messages in thread
From: Martin Brulisauer @ 2002-09-01 12:30 UTC (permalink / raw)
To: linux-kernel
Not on all platforms. I tried linux-2.4.19 with gcc-3.2.1 (csv):
Unable to handle kernel paging request at virtual address
0000013000000ac0
Oops 0
pc = [<fffffc0000331200>] ra = [<fffffffc00186aa8>] ps = 0007
Not tainted
v0 = 0000000000000000 t0 = 0000000000000001 t1 =
0000000000000000
t2 = 0000013000000ac0 t3 = 0000000000000002 t4 =
0000000000000001
t5 = fffffc0000571090 t6 = fffffc00059675f4 t7 = fffffc0005500000
s0 = 0000013000000608 s1 = fffffc00065ed000 s2 =
fffffc00066600c0
s3 = fffffc00065ed000 s4 = fffffc00066600c0 s5 =
0000013000000ac0
s6 = 0000000000000001
a0 = 0000000000000007 a1 = fffffc00065ed000 a2 =
0000000000000000
a3 = 0000000000000000 a4 = fffffc00065ed0b8 a5 =
000000000000001c
t8 = 000000000000001f t9 = fffffc00059675f5 t10=
0000000000000008
t11= 000002000019a260 pv = fffffc00003311f0 at =
0000000000000000
gp = fffffffc00196700 sp = fffffc0005503a88
Trace:fffffc000043fe50 fffffc0000435434 fffffc000047ba2c
fffffc000047b0bc fffffc000043a57c fffffc000043b15c fffffc0000454d9c
fffffc0000453194 fffffc0000454140 fffffc000047b674 fffffc00004791a8
fffffc0000478d20 fffffc00004833e8 fffffc000042aca4 fffffc000042c0d8
fffffc0000313670 fffffc000042be50 fffffc0000313670 fffffc0000313670
Code: 23de0020 6bfa8001 47f00403 221f0007 00000035
2ffe0000 <a4430000> 47ff0404
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing
Greetings,
Martin
On 30 Aug 2002, at 14:51, Jeff Chua wrote:
>
>
> Just to let everyone knows that gcc-3.2 compiled the linux-2.4.20-pre5
> cleanly and booted up successfully.
>
> If you recompile glib2.25 after installing gcc-3.2, you'll need to patch
> glib2.25 sysdeps divdi3.c.
>
>
> Thanks,
> Jeff
> [ jchua@fedex.com ]
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-09-01 12:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-30 9:02 gcc-3.2 Klaus Dittrich
2002-08-30 15:24 ` Jeff Chua
-- strict thread matches above, loose matches on Subject: below --
2002-08-30 6:51 gcc-3.2 Jeff Chua
2002-09-01 12:30 ` gcc-3.2 Martin Brulisauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox