LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   I am having a problem upgrading to GCC 4.2.2 for Slackware 12 (https://www.linuxquestions.org/questions/slackware-14/i-am-having-a-problem-upgrading-to-gcc-4-2-2-for-slackware-12-a-597098/)

micronian 11-04-2007 01:53 PM

I am having a problem upgrading to GCC 4.2.2 for Slackware 12
 
Hi all,

I am a brand new Slackware 12 user.

I would like to upgrade the gcc that came with Slackware 12.0. I have never upgraded gcc before, so I thought I could just use the gcc.SlackBuild script. I replaced the gcc 4.1.2 archive with gcc 4.2.2, and edited gcc.SlackBuild to specify 4.2.2. I ran the script and everything seemed to build without a problem. I then used upgradepkg on the new gcc-4.2.2 packages that were created. However, when I try to compile a simple hello C program with gcc 4.2.2, it just hangs without any complaint.

If I give gcc a bad option like -v, it prints this info:

Reading specs from /usr/lib/gcc/i486-slackware-linux/4.2.2/specs
gcc: unrecognized option '-v'
Target: i486-slackware-linux
Configured with: ../gcc-4.2.2/configure --prefix=/usr --enable-shared --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.2.2


I have tried searching this forum for answers and on the net with Google, but had no luck. Can anyone shed some light on what steps I missed?

Big thanks!

psychicist 11-04-2007 05:14 PM

The GCC 4.2 build script is different from that for GCC 4.0 and 4.1 because a few things have changed. I sent a GCC 4.2 build script to PV a few months ago and at the moment you're already using my GCC 4.1.2 build script that he slightly modified.

willysr 11-04-2007 08:16 PM

any specific reason to upgrade your GCC?

micronian 11-04-2007 10:26 PM

Quote:

Originally Posted by psychicist (Post 2948191)
The GCC 4.2 build script is different from that for GCC 4.0 and 4.1 because a few things have changed. I sent a GCC 4.2 build script to PV a few months ago and at the moment you're already using my GCC 4.1.2 build script that he slightly modified.

Hi,

Aaah, ok. Would it be possible to get a copy of the 4.2.2 script?

Thanks for the quick reply!

micronian 11-04-2007 10:49 PM

Quote:

Originally Posted by willysr (Post 2948292)
any specific reason to upgrade your GCC?

Hi,

A friend and I want to explore RTEMS development (ie. RTEMS 4.8 + GCC 4.2.2 cross compiler) using the Ada language. The instructions we found highly recommended using gcc 4.2.2 to build the gcc 4.2.2 GNAT cross compiler. However, my friend tried to build the cross compiler with gcc 4.1.2 instead. He said the 4.1.2 GNAT compiler ran into problems compiling the cross compiler. Therefore, I thought I would try following the instructions more closely :). That is the reason why I want to upgrade my gcc.

duryodhan 11-05-2007 12:12 AM

I think you should be able to build and install gcc to /opt and use that . don't need a slackbuild script, just use the standard make-conf tools.

psychicist 11-05-2007 09:08 AM

Quote:

Originally Posted by micronian (Post 2948362)
Hi,

Aaah, ok. Would it be possible to get a copy of the 4.2.2 script?

Thanks for the quick reply!

If you send me an e-mail or PM I will mail you the build scripts.

e.v.o 11-15-2007 03:24 AM

can you also send me the build script?
would be very nice since i'm stuck in building my own on how to choose languages


All times are GMT -5. The time now is 10:43 PM.