Skip to content

Commit 6f337ee

Browse files
committed
fix(gcc): add -fPIC to mimalloc compilation
Wasn't needed on clang, but is needed with gcc: /usr/bin/ld: mimalloc-override.o: relocation R_X86_64_TPOFF32 against `recurse' can not be used when making a shared object; recompile with -fPIC
1 parent 625cd25 commit 6f337ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/wincent/commandt/lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $(eval $(call DEPEND_ON,CCFLAGS))
7070
$(eval $(call DEPEND_ON,USE_MIMALLOC))
7171

7272
$(MIMALLOC_OVERRIDE): $(MIMALLOC_HDRS) $(MIMALLOC_SRCS) Makefile .make/CCFLAGS
73-
$(CC) $(CCFLAGS) -I$(MIMALLOC_INCLUDE) -c -o $(MIMALLOC_OVERRIDE) $(MIMALLOC_SRC)/static.c
73+
$(CC) $(CCFLAGS) -I$(MIMALLOC_INCLUDE) -c -fPIC -o $(MIMALLOC_OVERRIDE) $(MIMALLOC_SRC)/static.c
7474

7575
commandt.$(DLLEXT): $(HDRS) $(SRCS) $(MIMALLOC_OVERRIDE) Makefile .make/CCFLAGS .make/USE_MIMALLOC
7676
$(CC) $(CCFLAGS) -shared -fPIC -o commandt.$(DLLEXT) $(MALLOC_OBJ) $(SRCS)

0 commit comments

Comments
 (0)