Skip to content

Commit 0548d44

Browse files
committed
Fix link error when building with musl
This fixes the following linker error: ``` .../x86_64-unknown-linux-musl/bin/ld: obj/hal_sysfs.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC ```
1 parent 0adc5ff commit 0548d44

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ ifeq ($(CROSSCOMPILE),)
4949
else
5050
# Crosscompiled build
5151
LDFLAGS += -fPIC -shared
52+
CFLAGS += -fPIC
5253
endif
5354

5455
# Set Erlang-specific compile and linker flags

0 commit comments

Comments
 (0)