Using gcc-4.3.2 binary built on a P4 system on a P3 system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello all,
I have an HP Pavilion Pentium 4 w/HT system on which I built a full Linux BLFS-like distro based on Binutils-2.19, gcc-4.3.2, and glibc-2.8. I then make an installer DVD and install the binaries on several laptops: one a Pentium M, and the other a Pentium III system. I found that on the Pentium M laptop, all works as it should (I did have to re-build MPlayer as expected). However, on the Pentium III laptop, I could not re-build MPlayer. On investigation, I found that I could not re-compile ANY other package: I would either get "no working compiler found" messages during ./configure, or I would get "Internal compiler error: Illegal Instruction" messages during make.

I decided it might be a C to asm translation issue so I tried playing around with asm options for CFLAGS during compilations. I found that using CFLAGS which included the "-masm=att" option allowed me to re-compile both gmp and mpfr, and then found that other packages, such as MPlayer, could now be re-compiled. For the original Pentium 4 build, I did not specify -masm (hence used the default); for gcc, glibc, and gmp I did not set any CFLAGS myself, for mpfr I used CFLAGS="-O2 -march=i486 -mtune=i686".

Could it be that the default -masm on the P4 system was -masm=intel, and that this is not compatible, or is in some way problematic for Pentium III systems?

I've been doing these BLFS_like builds for several years now. This is the first time I have used the P4 desktop to do the build, and the first time I've used gcc-4.3.2 on the Pentium III system. In the past I have built the entire distro on the Pentium M laptop (using gcc-4.2.2 prior to 4.3.2), and the resultant binaries worked fine on the Pentium III (with re-compilation of packages like MPlayer).

My question is this: Is it a good idea to use -masm=att for gpm amd mpfr in the distro build, in order to have it work on both Pentium M and Pentium III systems ? Or, should I leave things as is, and re-build gpm and mpfr only on the Pentium III system ?  Does anyone know of a good ref, or could offer advice on the use of -masm as well as -march and -mtune for building the toolchain (and ensuing binaries; about 400 packages in all) with build and host, a P4, and target, a Pentium 4, Pentium III, and Pentium M?

Thanks in advance,
John




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux