Skip to content

Commit 5dff481

Browse files
authored
Merge pull request #246 from isildur-g/bugfix-242
the rpath hack is only needed on arm
2 parents 0ecbfa4 + 1112a35 commit 5dff481

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ export CXX="/usr/pkg/gcc12/bin/g++"
146146
```
147147

148148
In FreeBSD similarly, you might want to install a different compiler.
149+
If you want to use gcc, it is recommended to use gcc12.
149150
You will also, as in NetBSD, need to install cmake, sqlite, boost and ragel packages.
150151
Using the example of gcc12 from pkg:
151152
installing the desired compiler:
@@ -164,7 +165,6 @@ the environment variables to point to this compiler:
164165
export CC="/usr/local/bin/gcc"
165166
export CXX="/usr/local/bin/g++"
166167
```
167-
168168
A further note in FreeBSD, on the PowerPC and ARM platforms,
169169
the gcc12 package installs to a slightly different name, on FreeBSD/ppc,
170170
gcc12 will be found using:
@@ -175,12 +175,6 @@ export CXX="/usr/local/bin/g++12"
175175

176176
Then continue with the build as below.
177177

178-
A note about running in FreeBSD: if you built a dynamically linked binary
179-
with an alternative compiler, the libraries specific to the compiler that
180-
built the binary will probably not be found and the base distro libraries
181-
in /lib will be found instead. Adjust LD_LIBRARY_PATH appropriately. For
182-
example, with gcc12 installed from pkg, one would want to use
183-
```export LD_LIBRARY_PATH=/usr/local/lib/gcc12/```
184178

185179
## Configure & build
186180

cmake/osdetection.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
66
set(FREEBSD true)
77
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
88
#FIXME: find a nicer and more general way of doing this
9-
if(CMAKE_C_COMPILER MATCHES "/usr/local/bin/gcc12")
10-
set(CMAKE_BUILD_RPATH "/usr/local/lib/gcc12")
11-
elseif(CMAKE_C_COMPILER MATCHES "/usr/local/bin/gcc13")
9+
if(CMAKE_C_COMPILER MATCHES "/usr/local/bin/gcc13")
1210
set(CMAKE_BUILD_RPATH "/usr/local/lib/gcc13")
11+
elseif(ARCH_AARCH64 AND (CMAKE_C_COMPILER MATCHES "/usr/local/bin/gcc12"))
12+
set(CMAKE_BUILD_RPATH "/usr/local/lib/gcc12")
1313
endif()
1414
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
1515

0 commit comments

Comments
 (0)