Skip to content

Commit f437336

Browse files
authored
Merge pull request Homebrew#251845 from Homebrew/pcl-arm64-linux
pcl: add workaround for arm64 linux
2 parents f7e02ca + fb3702b commit f437336

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Formula/p/pcl.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ def install
7878
# The AppleClang versions shipped on current MacOS versions do not support the -march=native flag on arm
7979
args << "-DPCL_ENABLE_MARCHNATIVE:BOOL=OFF" if build.bottle?
8080

81+
# Work around ../../lib/libpcl_cc_tool_interface.a(mocs_compilation.cpp.o):
82+
# relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `...' which may bind
83+
# externally can not be used when making a shared object; recompile with -fPIC
84+
args << "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" if OS.linux? && Hardware::CPU.arm?
85+
8186
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
8287
system "cmake", "--build", "build"
8388
system "cmake", "--install", "build"

0 commit comments

Comments
 (0)