SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It installs gcc 3.4.x alongside (i.e. not overwriting) the gcc 4.x of Slackware 12.0. The original gcc 4.x compiler will still be default but applications that specifically look for a gcc3 compiler (such as QEMU) will find and use the gcc3 compiler.
My notes on how to invoke the gcc3 compiler instead of the default gcc4:
Code:
# This is a gcc34 compatibility SlackBuild for use in Slackware > 11.0 ,
# where gcc4 is the default compiler suite.
# This gcc34 build installs to /usr/gcc34 and will not interfere with gcc4.
# *** Use gcc34 in your scripts, as follows ***
# * By using environment variables:
# Most softwares support the CC and CXX environment variables.
# First assign them, then run configure and/or make. Example:
# CC=gcc34 CXX=g++34 ./configure
#
# * Using configure support:
# If the software is using the standard GNU automake and configure,
# then there is a chance it supports other compilers by passing in
# a setting to the configure script.
# First run configure --help to see if it mentions anything.
# The following example is from MPlayer:
# ./configure --help
# ./configure --cc=gcc34
If you are building the older version from source, run configure with a prefix setting, e.g.
Code:
# ./configure --prefix=/opt
# make
# make install
and it will be installed in /opt/bin instead of /usr/bin.
Then you can access the compiler directly using
Code:
# /opt/bin/gcc
or by prefixing your path
Code:
# export PATH=/opt/bin:$PATH
# which gcc
/opt/bin/gcc
I should have also added that you need to modify your library path to point to /opt/lib; however, other posters seem to have handled this links to the other thread.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.