Re: the struggle to create a 64-bit gcc on Solaris 10
> The last (very annoying) issue is that when gcc bootstraps itself, the > freshly-built compiler doesn't generate 64-bit binaries by default. > BOOT_CFLAGS can work around that: http://gcc.gnu.org/install/build.html. That isn't true at all. > CC='cc -m64' CXX='CC -m64' ../gmp-5.0.1-src/configure > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > --disable-shared > CC='cc -m64' CXX='CC -m64' ../mpfr-3.1.1-src/configure > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > --disable-shared --with-gmp=$HOME/apps/gcc-4.7.2 > CC='cc -m64' CXX='CC -m64' ../mpc-0.8.2-src/configure > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > --disable-shared --with-{gmp,mpfr}=$HOME/apps/gcc-4.7.2 > CC='cc -m64' CXX='CC -m64' ../gcc-4.7.2-src/configure > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > --disable-multilib --with-{gmp,mpfr,mpc}=$HOME/apps/gcc-4.7.2 > --without-gnu-{as,ld} > make {CFLAGS_FOR_TARGET,BOOT_CFLAGS}='-m64 -O2' No, don't mess with CFLAGS_FOR_TARGET or BOOT_CFLAGS, just type 'make'. -- Eric Botcazou
Re: the struggle to create a 64-bit gcc on Solaris 10
> > The last (very annoying) issue is that when gcc bootstraps itself, the > > freshly-built compiler doesn't generate 64-bit binaries by default. > > BOOT_CFLAGS can work around that: http://gcc.gnu.org/install/build.html. > > That isn't true at all. > > > CC='cc -m64' CXX='CC -m64' ../gmp-5.0.1-src/configure > > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > > --disable-shared > > CC='cc -m64' CXX='CC -m64' ../mpfr-3.1.1-src/configure > > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > > --disable-shared --with-gmp=$HOME/apps/gcc-4.7.2 > > CC='cc -m64' CXX='CC -m64' ../mpc-0.8.2-src/configure > > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > > --disable-shared --with-{gmp,mpfr}=$HOME/apps/gcc-4.7.2 > > CC='cc -m64' CXX='CC -m64' ../gcc-4.7.2-src/configure > > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > > --disable-multilib --with-{gmp,mpfr,mpc}=$HOME/apps/gcc-4.7.2 > > --without-gnu-{as,ld} > > make {CFLAGS_FOR_TARGET,BOOT_CFLAGS}='-m64 -O2' > > No, don't mess with CFLAGS_FOR_TARGET or BOOT_CFLAGS, just type 'make'. I would have to edit that as I use gcc to bootstrap gcc. Hoever, I am very willing to give your method a try. However, my prediction is that Oracle Studio 12.3 will have a fit .. early. Dennis
Re: Time for GCC 5.0? (TIC)
On 11/11/2012 04:47 AM, NightStrike wrote: > On Sat, Nov 10, 2012 at 6:20 AM, Andrew Haley wrote: >> On 11/10/2012 04:45 AM, NightStrike wrote: >>> Making c99 the default for gcc would be a great candidate for this. >>> IIUC, gcc without -std=c99 will compile for c89. And if I read the >>> manual correctly, it's because c99 isn't finished yet. gcc 5.0 should >>> have a complete c99. >> >> "Should" in what sense? The missing features are either library issues that >> we can't do anything about or things that no-one cares about enough to >> fix. GCC is, to all intents and purposes, C99 compatible. >> >> See http://gcc.gnu.org/c99status.html > > The manual doesn't imply that: > > "-std=gnu99 GNU dialect of ISO C99. When ISO C99 is fully implemented > in GCC, this will become the default." > > So from the perspective of the user reading the manual entry for the > gnu99 option, the only feedback is 1) c99 isn't done, and 2) there's > some plan to finish it and then make it the default. > > You seem to imply that it's as done as it'll ever realistically be. I can't possibly know that: someone might decide to do the last bit of work to be able to claim full compatibility. Nonetheless, I agree with Joseph's opinion that it would be reasonable to make gnu99 the default. > Sounds kind of conflicting. I think the statement in the manual is a bit idealistic. Andrew.
Re: the struggle to create a 64-bit gcc on Solaris 10
> > The last (very annoying) issue is that when gcc bootstraps itself, the > > freshly-built compiler doesn't generate 64-bit binaries by default. > > BOOT_CFLAGS can work around that: http://gcc.gnu.org/install/build.html. > > That isn't true at all. okay .. I'll just nod my head and agree. > > CC='cc -m64' CXX='CC -m64' ../gmp-5.0.1-src/configure > > --prefix=$HOME/apps/gcc-4.7.2 --build=sparc64-sun-solaris2.10 > > --disable-shared What isn't clear is where that is run. I decided that I will take your approach and try to follow the magic incantations to the very letter. OKay, sort of. I may expand on the CFLAGS just a little bit and I have to assume, in the absence of any data, that I shall run these "config ; make; make check" incantations inside the GCC build dir. After all, I already have gmp/mpfr/mpc built, tested and installed therefore I have to assume this is a way to avoid needing them in the gcc source tree. Here is what I did with gmp : $ ls $SRC/gmp* /usr/local/src/gmp-5.0.5.tar.bz2 $ /opt/schily/bin/star -x -bz -xdir -xdot -U -fs=16m file=/usr/local/src/gmp-5.0.5.tar.bz2 star: 1262 blocks + 0 bytes (total of 12922880 bytes = 12620.00k). $ mv gmp-5.0.5 gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2 $ mkdir gcc-4.7.2_sparc64-sun-solaris2.10.ebotcazou $ cd gcc-4.7.2_sparc64-sun-solaris2.10.ebotcazou So now that I am in the gcc build dir ( named after you actually ) I do this : $ CC='gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ > CXX='g++ -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS > -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ > ../gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2/configure ABI=64 --enable-cxx > --prefix=/usr/local/gcc4 \ > --libdir=/usr/local/gcc4/lib --build=sparc64-sun-solaris2.10 checking build system type... sparc64-sun-solaris2.10 checking host system type... sparc64-sun-solaris2.10 checking for a BSD-compatible install... ../gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2/install-sh -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ../gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2/install-sh -c -d checking for gawk... gawk checking whether /usr/local/bin/gmake sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking ABI=64 checking compiler gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -I/usr/local/include:/opt/csw/gcc4/include... yes checking compiler gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO has sizeof(long)==8... yes checking for gcc... gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO accepts -g... yes checking for gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO option to accept ISO C89... none needed checking for gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO option to accept ISO C99... -std=gnu99 checking for gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99 checking how to run the C preprocessor... gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -std=gnu99 -E checking build system compiler gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -std=gnu99... yes checking for build system preprocessor... gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -std=gnu99 -E checking for build system executable suffix... checking whether build system compiler is ANSI... yes checking for build system compiler math library... -lm checking whether we are using the GNU C++ compiler... yes checking whether g++ -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO accepts -g... yes checking C++ compiler g++ -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -I/usr/local/include:/opt/csw/gcc4/include -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PT
Re: the struggle to create a 64-bit gcc on Solaris 10
> What isn't clear is where that is run. I decided that I will take your > approach and try to follow the magic incantations to the very letter. OKay, > sort of. I may expand on the CFLAGS just a little bit and I have to assume, > in the absence of any data, that I shall run these "config ; make; make > check" incantations inside the GCC build dir. Well, of course not, you must build them as usual. > $ CC='gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS > -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ > > CXX='g++ -mno-app-regs -mcpu=v9 -m64 -mptr64 -g > > -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ > > ../gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2/configure ABI=64 > > --enable-cxx --prefix=/usr/local/gcc4 \ --libdir=/usr/local/gcc4/lib > > --build=sparc64-sun-solaris2.10 Totally puzzled here why on Earth are you using all these flags? Just use the configure lines posted by Ryan. > The result however, is that the gcc build dir is polluted with objects from > the gmp build. > > Not what I want most likely. Then do not build them in the GCC build dir! -- Eric Botcazou
Re: the struggle to create a 64-bit gcc on Solaris 10
> > What isn't clear is where that is run. I decided that I will take your > > approach and try to follow the magic incantations to the very > letter. OKay, > > sort of. I may expand on the CFLAGS just a little bit and I have to > assume, > > in the absence of any data, that I shall run these "config ; make; make > > check" incantations inside the GCC build dir. > > Well, of course not, you must build them as usual. I sort of figured that .. however there was this little voice in my head that said "you know .. you have been doing this a long long time and you never had these problems so let's just do it his way" and so I did. > > $ CC='gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS > > -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ > > > CXX='g++ -mno-app-regs -mcpu=v9 -m64 -mptr64 -g > > > -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ > > > ../gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2/configure ABI=64 > > > --enable-cxx --prefix=/usr/local/gcc4 \ --libdir=/usr/local/gcc4/lib > > > --build=sparc64-sun-solaris2.10 > > Totally puzzled here why on Earth are you using all these flags? > Just use the configure lines posted by Ryan. Well in Solaris we need a define _TS_ERRNO in order to get a thread safe errno. Otherwise it can not be relied upone. The other two defines are sort of self explanatory. I felt that the sparc v9 would ensure that whatever binary object gets produced will run on any UltraSparc chip in the past ten years. The -g was simply to ensure that I could possible use a debugger in the future if ever needed and the -mptr64 I forgot. The -mno-app-regs is pretty imporant for shared libs. I do need the shared libs. From the gcc docs : To be fully SVR4 ABI-compliant at the cost of some performance loss, specify -mno-app-regs. You should compile libraries and system software with this option. So even when I use the Oracle Studio compilers I ensure that I have -xregs=no%appl to protect global registers 2 through 4. Those were my thoughts there and the build was flawless. > > The result however, is that the gcc build dir is polluted with > > objects from the gmp build. > > > > Not what I want most likely. > > Then do not build them in the GCC build dir! uh yeah .. that was just plain stupid of me. :-)
gcc-4.8-20121111 is now available
Snapshot gcc-4.8-2012 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.8-2012/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.8 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision 193417 You'll find: gcc-4.8-2012.tar.bz2 Complete GCC MD5=c1ffb1f47991b32b516695a2cb3f85b5 SHA1=8c9cdee9c326562d59fb79002b1436506f01a420 Diffs from 4.8-20121104 are available in the diffs/ subdirectory. When a particular snapshot is ready for public consumption the LATEST-4.8 link is updated and a message is sent to the gcc list. Please do not use a snapshot before it has been announced that way.
Re: the struggle to create a 64-bit gcc on Solaris 10
On 11 November 2012 21:57, Dennis Clarke wrote: > Here is what I did with gmp : > > $ ls $SRC/gmp* > /usr/local/src/gmp-5.0.5.tar.bz2 > > $ /opt/schily/bin/star -x -bz -xdir -xdot -U -fs=16m > file=/usr/local/src/gmp-5.0.5.tar.bz2 > star: 1262 blocks + 0 bytes (total of 12922880 bytes = 12620.00k). > $ mv gmp-5.0.5 gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2 > > $ mkdir gcc-4.7.2_sparc64-sun-solaris2.10.ebotcazou > $ cd gcc-4.7.2_sparc64-sun-solaris2.10.ebotcazou > > So now that I am in the gcc build dir ( named after you actually ) I do this : > > > $ CC='gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS > -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ >> CXX='g++ -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS >> -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ >> ../gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2/configure ABI=64 --enable-cxx >> --prefix=/usr/local/gcc4 \ >> --libdir=/usr/local/gcc4/lib --build=sparc64-sun-solaris2.10 What on earth are you doing here? You seem to be running the gmp configure script inside the gcc build dir ... why? Who suggested that? > The result however, is that the gcc build dir is polluted with objects from > the gmp build. Well duh. http://gcc.gnu.org/wiki/InstallingGCC Just run the contrib/download_prerequisites script to put the gmp, mpfr & mpc sources in the gcc source tree then forget about gmp, mpfr and mpc completely. Just configure GCC, as Eric and Ryan have suggested, and run make. Don't try to configure and build gmp yourself, *definitely* not in the GCC build dir. You're making it far more complicated than it needs to be, stop it. Finally, shouldn't this be on the gcc-help list? This is just a "how do I install GCC?" question, the 64-bit aspect seems to be a red herring.
Re: the struggle to create a 64-bit gcc on Solaris 10
> On 11 November 2012 21:57, Dennis Clarke wrote: > > Here is what I did with gmp : > > > > $ ls $SRC/gmp* > > /usr/local/src/gmp-5.0.5.tar.bz2 > > > > $ /opt/schily/bin/star -x -bz -xdir -xdot -U -fs=16m > > file=/usr/local/src/gmp-5.0.5.tar.bz2 > > star: 1262 blocks + 0 bytes (total of 12922880 bytes = 12620.00k). > > $ mv gmp-5.0.5 gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2 > > > > $ mkdir gcc-4.7.2_sparc64-sun-solaris2.10.ebotcazou > > $ cd gcc-4.7.2_sparc64-sun-solaris2.10.ebotcazou > > > > So now that I am in the gcc build dir ( named after you actually ) I > do this : > > > > > > $ CC='gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g > -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ > >> CXX='g++ -mno-app-regs -mcpu=v9 -m64 -mptr64 -g > -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO' \ > >> ../gmp-5.0.5_SunOS5.10_sparcv9-for-gcc-4.7.2/configure ABI=64 > --enable-cxx --prefix=/usr/local/gcc4 \ > >> --libdir=/usr/local/gcc4/lib --build=sparc64-sun-solaris2.10 > > What on earth are you doing here? Making a stupid mistake. Just sit back and make popcore, this will a work out in the end. No really, I am hoping for a great result real soon now. However I now have mpfr getting upset at me for this : /bin/bash ../libtool --tag=CC --mode=link gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -no-install -L../src/.libs -L/usr/local/lib -o tversion tversion.o libfrtests.la -lm ../src/libmpfr.la -lgmp libtool: link: gcc -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -mno-app-regs -mcpu=v9 -m64 -mptr64 -g -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO -o tversion tversion.o -L../src/.libs -L/usr/local/lib ./.libs/libfrtests.a -lm ../src/.libs/libmpfr.so /usr/local/lib/libgmp.so -R/usr/local/build/mpfr-3.1.1_SunOS5.10_sparcv9-for-gcc-4.7.2/src/.libs -R/usr/local/lib -R/usr/local/lib ld: fatal: file /usr/local/lib/libgcc_s.so.1: version 'GCC_4.3.0' does not exist: required by file ../src/.libs/libmpfr.so ld: fatal: file processing errors. No output written to tversion collect2: ld returned 1 exit status gmake[2]: *** [tversion] Error 1 Sweet. This is what happens when I have libgcc from Sun as well as my own libgcc from GCC 4.5.1. Easy to sort out .. just annoying. > Well duh. Yes, I deserve the shame. Also, even worse, I really am not new to this. > Just run the contrib/download_prerequisites script to put the gmp, > mpfr & mpc sources in the gcc source tree then forget about gmp, mpfr > and mpc completely. Just configure GCC, as Eric and Ryan have > suggested, and run make. Don't try to configure and build gmp > yourself, *definitely* not in the GCC build dir. You're making it far > more complicated than it needs to be, stop it. [screetch] <-- sound of large brembo brakes > Finally, shouldn't this be on the gcc-help list? This is just a "how > do I install GCC?" question, the 64-bit aspect seems to be a red > herring. Yes, and I did post there and was told to post there and never heard a word of feedback from anyone. So therefore this is far more successful here .. but the wrong place. However the right place for feedback. Thus the correct place. If you get my meaning. see http://gcc.gnu.org/ml/gcc-help/2012-11/msg00043.html See? I did try. Dennis