Re: Debian crosscompiler packages

2002-01-20 Thread Hakan Ardo
On Sun, Jan 20, 2002 at 01:55:45AM +, Dr. David Alan Gilbert wrote:
> 
> >   - Change crossbase in /etc/dpkg/cross-compile from /usr/local to /usr. Why
> > is this defaulting to /usr/local? Don't we want cross-compilers in /usr?
> 
> Well I suppose it depends how you chop your disc up, personally I put
> /usr and / on the same partition and made them fairly small and made
> /usr/local and /discs/cross - but its just a matter of taste I guess.

OK, the fs standrad we use dosn't mention it then? 

> 
> >   - Patch dh_shlibdeps not to pass files to dpkg-shlibsgen that were not in
> > the native format (included below). dpkg-cross contains some replacement
> > dpkg-shlibsgen that I think should be used instead. Anyone know how to 
> > thatone not to deafult back to dpkg-shlibsgen.orig? Will it work in this
> > kind of mixed environ where we have some native binaries and some corss
> > libraries?
> 
> Hmm that didn't work for me - I get complaints at the end of the build
> complaing from dh_strip about an unkown output file format.

Yes, so did I, but the build process continues and ignores the errors and
procudec a compiler without sripping the libs. But this should also be fixed 
so that we get them stripped.

> (I did the shlibdeps change after using dpkg-cross and after building
> binutils but before building gcc).
> 
> Dave
> 
> P.S. Here is a script I wrote to get the libc6 and libc6-dev packages
> for dpkg-cross - there must be an easier way?

The cool solution here I suppose would be to patch apt-get so that 
"apt-get --cross-arch m68k libc6-dev" installed crossversions of the lib and
all it's dependecies.

-- 
Hakan Ardo <[EMAIL PROTECTED]>, http://master.debian.org/~hakan/




Re: Versions trouble

2002-01-20 Thread Martin v. Loewis
> /usr/include/g++-v3/backward/iostream.h:35: using directive `ostream'
> introduced ambiguous type `ostream''
> I know it's probably due to libraries versions mismatch, but I got libstdc++
> exactly the same version as gcc.

I'm now pretty sure tha it is *not* due to library version mismatch,
but due to a plain error in the code you are trying to compile. Do not
declare a class 'ostream' yourself.

Regards,
Martin




Re: Debian crosscompiler packages

2002-01-20 Thread Hakan Ardo
On Sun, Jan 20, 2002 at 11:38:12AM +0100, Hakan Ardo wrote:
> On Sun, Jan 20, 2002 at 01:55:45AM +, Dr. David Alan Gilbert wrote:
> > 
> > >   - Change crossbase in /etc/dpkg/cross-compile from /usr/local to /usr. 
> > > Why
> > > is this defaulting to /usr/local? Don't we want cross-compilers in 
> > > /usr?
> > 
> > Well I suppose it depends how you chop your disc up, personally I put
> > /usr and / on the same partition and made them fairly small and made
> > /usr/local and /discs/cross - but its just a matter of taste I guess.
> 
> OK, the fs standrad we use dosn't mention it then? 

If I read the docs right it'll have to be /usr if we want to be able to
include these corsscompilers in the distribution.

-- 
Hakan Ardo <[EMAIL PROTECTED]>, http://master.debian.org/~hakan/




Re: Need some assistance in g++ related questions

2002-01-20 Thread MH
> "Martin" == Martin v Loewis <[EMAIL PROTECTED]> writes:

Thanks for the fast reply, Martin


[...]


>> Is the trial and error method the usual approach ? ;-)

Martin> No. Instead, one needs to clearly identify the problem. If
Martin> it is a compiler bug, it would fall into the class
Martin> "generates bad code". A useful bug report in this category
Martin> would identify a function, and present it together with
Martin> the assembler code.

Ok, I imagined sth. similar ...

>> Given the results above is it licit to blame the compiler(s)?

Martin> Not necessarily. It could be also that the program uses
Martin> undefined behaviour, such as accessing an uninitialized
Martin> variable. If that is a variable on stack, it might or
Martin> might not crash depending on the previous value of the
Martin> stack.


So, concluding, the following isn't correct?

,
| #
| #   If SWISH++ doesn't work correctly with optimization on, but it
| #   works just fine with it off, then there is a bug in your
| #   compiler's optimizer.
`

Regards,

MH


-- 
(Dr.) Michael Hummel
mailto: [EMAIL PROTECTED] || [EMAIL PROTECTED]
--
fprint = F24D EAC6 E3D7 372C 9122 D510 EB24 01CA 0B56 B518
id: 1024D/0B56B518 key: http://www.seitung.net/key

pgpxsPdJe1IBv.pgp
Description: PGP signature


Re: Need some assistance in g++ related questions

2002-01-20 Thread Martin v. Loewis
> So, concluding, the following isn't correct?
> 
> ,
> | #
> | #If SWISH++ doesn't work correctly with optimization on, but it
> | #works just fine with it off, then there is a bug in your
> | #compiler's optimizer.
> `

No. Something like

# If SWISH++ doesn't work correctly with optimization on, but it works
# just fine with it off, then there is likely a bug in your compiler's
# optimizer.
 
would be accepted by most compiler authors. Actually, the statement
"there is likely a bug in the compiler's optimizer" is probably
accepted by most compiler authors independent of context. We know
there are many bugs in the compiler; in the optimizer and
elsewhere. The question is whether any of these bugs affect your
program.

Regards,
Martin




GCC-3.0, -static, and -shared-libgcc

2002-01-20 Thread elf
It appears that the command line I use in gcc-2.9x for building s
static version of a program fails with gcc-3.0.  It also appears, from
the documentation, that there is a switch to make it work anyway.

This works with the 2.9x version.

  g++ -o bin/program o/object1.o ... -static

This fails

  g++-3.0 -o bin/program o/object1.o ... -static

because gcc-3.0 cannot find the libgcc_s.a file.

  /usr/bin/ld: cannot find -lgcc_s

Indeed, there is no such thing.  According to the man page

  g++-3.0 -o bin/program o/object1.o ... -static -shared-libgcc

ought to prevent a search for the libgcc_s.a library.  Instead, it
returns the same error.

I built gcc-3.0 from source (gcc-3.0-3.0.3ds3) to see if there was a
libgcc_s.a file.  I found none.

So.  I thought I might try to hack it

  cd /usr/lib/gcc-lib/i386-linux=3.0.3
  ln -s libgcc.a libgcc_s.a

  g++-3.0 -o bin/program o/object1.o ... -static

Voila.  The file links and runs.  There is a note in the man page
about how C++ programs need to use a shared version of libgcc.  Can
you shed some light on this?  Should I expect this program run
properly?




Re: GCC-3.0, -static, and -shared-libgcc

2002-01-20 Thread Ben Collins
On Sun, Jan 20, 2002 at 01:44:46PM -0800, [EMAIL PROTECTED] wrote:
> It appears that the command line I use in gcc-2.9x for building s
> static version of a program fails with gcc-3.0.  It also appears, from
> the documentation, that there is a switch to make it work anyway.
> 
> This works with the 2.9x version.
> 
>   g++ -o bin/program o/object1.o ... -static
> 
> This fails
> 
>   g++-3.0 -o bin/program o/object1.o ... -static
> 
> because gcc-3.0 cannot find the libgcc_s.a file.
> 
>   /usr/bin/ld: cannot find -lgcc_s

It shouldn't be looking for libgcc_s.a, it should use libgcc.a (which is
in /usr/lib/gcc-lib//).

> Indeed, there is no such thing.  According to the man page
> 
>   g++-3.0 -o bin/program o/object1.o ... -static -shared-libgcc
> 
> ought to prevent a search for the libgcc_s.a library.  Instead, it
> returns the same error.
> 
> I built gcc-3.0 from source (gcc-3.0-3.0.3ds3) to see if there was a
> libgcc_s.a file.  I found none.
> 
> So.  I thought I might try to hack it
> 
>   cd /usr/lib/gcc-lib/i386-linux=3.0.3
>   ln -s libgcc.a libgcc_s.a
> 
>   g++-3.0 -o bin/program o/object1.o ... -static
> 
> Voila.  The file links and runs.  There is a note in the man page
> about how C++ programs need to use a shared version of libgcc.  Can
> you shed some light on this?  Should I expect this program run
> properly?

The error seems to be in the specs file. In mine, I have:

*libgcc:
%{shared-libgcc:-lgcc_s%M 
-lgcc}%{static-libgcc:-lgcc}%{!shared-libgcc:%{!static-libgcc:%{shared:-lgcc_s%M
 -lgcc}}}%{!shared-libgcc:%{!static-libgcc:%{!shared:-lgcc}}}

This pretty much decrypts into:

- If -shared-libgcc, then use -lgcc_s
- If -static-libgcc, then use -lgcc
- If not -static-libgcc or -shared-libgcc, and -shared, then use -lgcc_s
- If not -static-libgcc or -shared-libgcc, and -static, then use -lgcc


And that is exactly what it should be, and should work.

-- 
 .--===-=-==-=---==-=-.
/   Ben Collins--Debian GNU/Linux  \
`  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  '
 `---=--===-=-=-=-===-==---=--=---'




Re: GCC-3.0, -static, and -shared-libgcc

2002-01-20 Thread elf
On Sun, Jan 20, 2002 at 04:53:20PM -0500, Ben Collins wrote:
> > This fails
> > 
> >   g++-3.0 -o bin/program o/object1.o ... -static
> > 
> > because gcc-3.0 cannot find the libgcc_s.a file.
> > 
> >   /usr/bin/ld: cannot find -lgcc_s
> 
> It shouldn't be looking for libgcc_s.a, it should use libgcc.a (which is
> in /usr/lib/gcc-lib//).

I agree.

> The error seems to be in the specs file. In mine, I have:
> 
> *libgcc:
> %{shared-libgcc:-lgcc_s%M 
> -lgcc}%{static-libgcc:-lgcc}%{!shared-libgcc:%{!static-libgcc:%{shared:-lgcc_s%M
>  -lgcc}}}%{!shared-libgcc:%{!static-libgcc:%{!shared:-lgcc}}}
> 
> This pretty much decrypts into:
> 
> - If -shared-libgcc, then use -lgcc_s
> - If -static-libgcc, then use -lgcc
> - If not -static-libgcc or -shared-libgcc, and -shared, then use -lgcc_s
> - If not -static-libgcc or -shared-libgcc, and -static, then use -lgcc
> 
> 
> And that is exactly what it should be, and should work.

I'm not following you.  Are you saying that the specs file reads
correctly and is being interpreted incorrectly?




Re: GCC-3.0, -static, and -shared-libgcc

2002-01-20 Thread Ben Collins
On Sun, Jan 20, 2002 at 02:17:15PM -0800, [EMAIL PROTECTED] wrote:
> On Sun, Jan 20, 2002 at 04:53:20PM -0500, Ben Collins wrote:
> > > This fails
> > > 
> > >   g++-3.0 -o bin/program o/object1.o ... -static
> > > 
> > > because gcc-3.0 cannot find the libgcc_s.a file.
> > > 
> > >   /usr/bin/ld: cannot find -lgcc_s
> > 
> > It shouldn't be looking for libgcc_s.a, it should use libgcc.a (which is
> > in /usr/lib/gcc-lib//).
> 
> I agree.
> 
> > The error seems to be in the specs file. In mine, I have:
> > 
> > *libgcc:
> > %{shared-libgcc:-lgcc_s%M 
> > -lgcc}%{static-libgcc:-lgcc}%{!shared-libgcc:%{!static-libgcc:%{shared:-lgcc_s%M
> >  -lgcc}}}%{!shared-libgcc:%{!static-libgcc:%{!shared:-lgcc}}}
> > 
> > This pretty much decrypts into:
> > 
> > - If -shared-libgcc, then use -lgcc_s
> > - If -static-libgcc, then use -lgcc
> > - If not -static-libgcc or -shared-libgcc, and -shared, then use -lgcc_s
> > - If not -static-libgcc or -shared-libgcc, and -static, then use -lgcc
> > 
> > 
> > And that is exactly what it should be, and should work.
> 
> I'm not following you.  Are you saying that the specs file reads
> correctly and is being interpreted incorrectly?

Does your specs file have that in it? If so, then execute with -V so
you get the cc1 command line and can see what it passes.

-- 
 .--===-=-==-=---==-=-.
/   Ben Collins--Debian GNU/Linux  \
`  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  '
 `---=--===-=-=-=-===-==---=--=---'




Re: GCC-3.0, -static, and -shared-libgcc

2002-01-20 Thread elf
On Sun, Jan 20, 2002 at 05:32:49PM -0500, Ben Collins wrote:
> > > The error seems to be in the specs file. In mine, I have:
> > > 
> > > *libgcc:
> > > %{shared-libgcc:-lgcc_s%M 
> > > -lgcc}%{static-libgcc:-lgcc}%{!shared-libgcc:%{!static-libgcc:%{shared:-lgcc_s%M
> > >  -lgcc}}}%{!shared-libgcc:%{!static-libgcc:%{!shared:-lgcc}}}
> > > 
> > > This pretty much decrypts into:
> > > 
> > > - If -shared-libgcc, then use -lgcc_s
> > > - If -static-libgcc, then use -lgcc
> > > - If not -static-libgcc or -shared-libgcc, and -shared, then use -lgcc_s
> > > - If not -static-libgcc or -shared-libgcc, and -static, then use -lgcc
> > > 
> > > 
> > > And that is exactly what it should be, and should work.
> > 
> > I'm not following you.  Are you saying that the specs file reads
> > correctly and is being interpreted incorrectly?
> 
> Does your specs file have that in it? If so, then execute with -V so
> you get the cc1 command line and can see what it passes.

My specs file has the same entry you quoted above.  The -v (not -V)
switch says:

gcc version 3.0.3 20011212 (Debian prerelease)

/usr/lib/gcc-lib/i386-linux/3.0.3/collect2 -m elf_i386
  -dynamic-linker /lib/ld-linux.so.2 -o bin/ssem
  /usr/lib/gcc-lib/i386-linux/3.0.3/../../../crt1.o
  /usr/lib/gcc-lib/i386-linux/3.0.3/../../../crti.o
  /usr/lib/gcc-lib/i386-linux/3.0.3/crtbegin.o
  -L/usr/lib/gcc-lib/i386-linux/3.0.3
  -L/usr/lib/gcc-lib/i386-linux/3.0.3/../../.. 
  -static -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
  /usr/lib/gcc-lib/i386-linux/3.0.3/crtend.o 
  /usr/lib/gcc-lib/i386-linux/3.0.3/../../../crtn.o

I've tried combinations of -static and -shared-libgcc and
-static-libgcc.  The -lgcc and -lgcc_s switches do not vary.  Once the
link I inserted from libgcc.a to libgcc_s.a is removed, the link fails
every time.  So, either your interpretation differs from that which
gcc performs, or gcc isn't performing as expected.




Re: GCC-3.0, -static, and -shared-libgcc

2002-01-20 Thread Ben Collins
>   -static -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc

Something is screwy with your setup then. The command works for me with
no problem. Which version of the g++-3.0 package do you have installed?
Any environment variables?

-- 
 .--===-=-==-=---==-=-.
/   Ben Collins--Debian GNU/Linux  \
`  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  '
 `---=--===-=-=-=-===-==---=--=---'




Re: GCC-3.0, -static, and -shared-libgcc

2002-01-20 Thread elf
I believed I tested a case that I had not.  I was using -Wl to set the
linker switches.  This won't work any more.  Using the switches
directly with gcc-3.0 works properly.

  gcc-3.0 -static

versus

  gcc-3.0 -Wl,-static

Thanks.

On Sun, Jan 20, 2002 at 07:28:55PM -0500, Ben Collins wrote:
> >   -static -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
> 
> Something is screwy with your setup then. The command works for me with
> no problem. Which version of the g++-3.0 package do you have installed?
> Any environment variables?
> 
> -- 
>  .--===-=-==-=---==-=-.
> /   Ben Collins--Debian GNU/Linux  \
> `  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  --  [EMAIL PROTECTED]  '
>  `---=--===-=-=-=-===-==---=--=---'




1:1 »ó´ãÇØ µå¸³´Ï´Ù(È«º¸)

2002-01-20 Thread ¿î»ê



희망찬 새해, 신년 운세 보세요!!!  
☎060-700-8865 대구 유명 역술인이 직접 상담 해 드립니다.(대구MBC역학강사, 동아백화점
문화센터 역학강사, 영남일보 주간 운세...) 직업운, 시험운, 진학운, 애정운, 사랑운, 건강운, 토정비결,
속궁합 겉궁합, 사업운, 승진운, 작명, 택일, 별자리점, 풍수지리, 신통하게 맞추는 과거와 미래, "깜짝 놀라실겁니다"
 "역술은 통계에 의한 과학적인 학문입니다" 
☎060-700-8865