This should do:
$this->bbcode_second_pass_code('', '[root@alarm alarm]# CFLAGS=-fcommon pip3 install RPi.GPIO
WARNING: The directory '/home/alarm/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting RPi.GPIO
Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Using legacy 'setup.py install' for RPi.GPIO, since package 'wheel' is not installed.
Installing collected packages: RPi.GPIO
Running setup.py install for RPi.GPIO ... done
Successfully installed RPi.GPIO-0.7.0')
See "-fno-common" in
https://man7.org/linux/man-pages/man1/gcc.1.html and compare with the errors you observed.