How To Install pcc on Fedora 34

pcc is The Portable C Compiler

Introduction

In this tutorial we learn how to install pcc on Fedora 34.

What is pcc

The compiler is based on the original Portable C Compiler by Stephen C. Johnson, written in the late 70’s. Even though much of the compiler has been rewritten, some of the basics still remain. PCC debuted in Unix Version 7 and replaced the DMR compiler (Dennis Ritchie’s original C compiler) in both System V and the BSD 4.x releases. Some history about pcc is in the A History of UNIX before Berkeley About 50% of the front-end code and 80% of the back-end code has been rewritten. Most stuff is written by Anders Magnusson, with the exception of the data-flow analysis part and the SSA conversion code which is written by Peter A. Jonsson, and the Mips port that were written as part of a project by undergraduate students at Luleå University of Technology (LTU).

We can use yum or dnf to install pcc on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install pcc.

Install pcc on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install pcc using dnf by running the following command:

sudo dnf -y install pcc

Install pcc on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install pcc using yum by running the following command:

sudo yum -y install pcc

How To Uninstall pcc on Fedora 34

To uninstall only the pcc package we can use the following command:

sudo dnf remove pcc

pcc Package Contents on Fedora 34

/usr/bin/p++
/usr/bin/pcc
/usr/bin/pcpp
/usr/include/pcc
/usr/lib/.build-id
/usr/lib/.build-id/7a
/usr/lib/.build-id/7a/dbb325e4881210d59a370590d7321941d5e61a
/usr/lib/.build-id/7b
/usr/lib/.build-id/7b/0568c83f47aa48132bbd74142f55dee02eff8f
/usr/lib/.build-id/7b/aa899ea99552da8baec59ac4bd7f59d76e1a61
/usr/lib/.build-id/7b/aa899ea99552da8baec59ac4bd7f59d76e1a61.1
/usr/lib/.build-id/7b/aa899ea99552da8baec59ac4bd7f59d76e1a61.2
/usr/lib/.build-id/e5
/usr/lib/.build-id/e5/0b150b732fd9be75e04dd607754431c5f01724
/usr/lib64/pcc
/usr/lib64/pcc/x86_64-unknown-linux-gnu
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/float.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/iso646.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/libpcc_float.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/libpcc_limits.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/libpcc_stdarg.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/libpcc_stdbool.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/libpcc_stddef.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/limits.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/stdarg.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/stdbool.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/include/stddef.h
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib/crtbegin.o
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib/crtbeginS.o
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib/crtbeginT.o
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib/crtend.o
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib/crtendS.o
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib/crtendT.o
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib/libpcc.a
/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.2.0.DEVEL/lib/libpccsoftfloat.a
/usr/libexec/ccom
/usr/libexec/cpp
/usr/libexec/cxxcom
/usr/share/man/man1/ccom.1.gz
/usr/share/man/man1/p++.1.gz
/usr/share/man/man1/pcc-cpp.1.gz
/usr/share/man/man1/pcc.1.gz
/usr/share/man/man1/pcpp.1.gz

References

Summary

In this tutorial we learn how to install pcc on Fedora 34 using yum and dnf.