about summary refs log tree commit diff stats
path: root/pages/gcc.md
blob: 5b9f2296cab71521257b4bd491d348f077620b87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!--
title: gcc and GNUstep
description: Information on using recent gcc versions
author: gbmor
-->

# gcc

OpenBSD includes `gcc4` in the base install, which is `gcc-4.2.1`.
If you prefer to use `gcc-11.2.0`, the names of the binaries differ.

The following are part of `gcc-11.2.0`:

* `/usr/local/bin/egcc`
* `/usr/local/bin/gcc` (symlink)
* `/usr/local/bin/eg++`
* `/usr/local/bin/g++` (symlink)
* `/usr/local/bin/egdb`
* `/usr/local/bin/gdb` (symlink)
* `/usr/local/bin/egfortran`
* `/usr/local/bin/gfortran` (symlink)
* `/usr/local/bin/gnat`

The following are part of `gcc-4.2.1`

* `/usr/bin/gcc4`
* `/usr/bin/g++4`
* `/usr/bin/gdb`

`GNUstep` is available if you would like to develop using Objective-C. The
following should be added to `~/.kshrc`:

```
export GNUSTEP_MAKEFILES=/usr/local/share/GNUstep/Makefiles
. /usr/local/share/GNUstep/Makefiles/GNUstep.sh
```

You will also need to call `gmake` rather than `make` when building Objective-C
code. See [this StackOverflow post](https://stackoverflow.com/questions/14441852/how-to-build-gnustep-programs-on-openbsd)
for more information.

[back](/)