mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-24 10:59:29 +01:00
build: Use CCLD instead of hardcoded gcc for linking
This commit is contained in:
parent
32d79b0310
commit
1f0b0b23cd
4
Makefile
4
Makefile
@ -101,6 +101,7 @@ LIB_STATIC_OBJS := $(LIB_SRCS:%.c=%.o)
|
|||||||
LIB_SHARED_OBJS := $(LIB_SRCS:%.c=%.lo)
|
LIB_SHARED_OBJS := $(LIB_SRCS:%.c=%.lo)
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
CCLD = $(CC)
|
||||||
|
|
||||||
# Set default value for compilation
|
# Set default value for compilation
|
||||||
CFLAGS ?= -g -Wall -Wextra -Wno-unused-variable
|
CFLAGS ?= -g -Wall -Wextra -Wno-unused-variable
|
||||||
@ -151,7 +152,8 @@ $(LIB_SONAME): $(LIB_SHARED)
|
|||||||
ln -fs $^ $@
|
ln -fs $^ $@
|
||||||
|
|
||||||
$(LIB_SHARED): $(LIB_SHARED_OBJS)
|
$(LIB_SHARED): $(LIB_SHARED_OBJS)
|
||||||
gcc -shared \
|
$(CCLD) \
|
||||||
|
-shared \
|
||||||
-Wl,-soname -Wl,$(LIB_SONAME) \
|
-Wl,-soname -Wl,$(LIB_SONAME) \
|
||||||
-Wl,--version-script=Versions \
|
-Wl,--version-script=Versions \
|
||||||
-o $@ $^
|
-o $@ $^
|
||||||
|
Loading…
x
Reference in New Issue
Block a user