Skip to content

Commit

Permalink
make: honour LDFLAGS variable
Browse files Browse the repository at this point in the history
  • Loading branch information
stsp committed Dec 26, 2024
1 parent f37a1eb commit 3472f8d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dj64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ifneq ($(PREFIX),)
RP += -Wl,-rpath=$(PREFIX)/i386-pc-dj64/lib64
endif
# sort removes duplicates
DJLDFLAGS = $(shell pkg-config --libs dj64) $(sort $(RP))
DJLDFLAGS = $(shell pkg-config --libs dj64) $(sort $(RP)) $(LDFLAGS)
endif
DJ64_XLIB = libtmp.so
ifneq ($(AS_OBJECTS),)
Expand Down
2 changes: 1 addition & 1 deletion src/djdev64/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $(LIBDIR):
mkdir $@

$(LIB): $(OBJECTS) | $(LIBDIR)
$(CC) -shared -Wl,-Bsymbolic -Wl,-soname=$(LIBN) -o $@ $^ $(LIBELF)
$(CC) $(LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$(LIBN) -o $@ $^ $(LIBELF)

$(LIBDIR)/libdjdev64.so: $(LIB)
ln -sf $(LIBN) $@
Expand Down
2 changes: 1 addition & 1 deletion src/djdev64/stub/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $(LIBDIR):
mkdir $@

$(LIB): $(OBJECTS) libdjstub.version | $(LIBDIR)
$(CC) -shared -Wl,-Bsymbolic -Wl,-soname=$(LIBN) \
$(CC) $(LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$(LIBN) \
-Wl,--version-script=libdjstub.version -o $@ $(OBJECTS)

$(LIBDIR)/libdjstub64.so: $(LIB)
Expand Down
2 changes: 1 addition & 1 deletion src/libc/dj64/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ uplt.o: uplt.S plt_defs.inc
ALL_OBJS = $(addprefix ../,$(file < $(TOP)/makefile.rf))
$(LIB)/$(LIBN): $(TOP)/makefile.rf $(ALL_OBJS) \
thunk_calls.h thunk_asms.h $(OBJECTS)
$(XGCC) -shared -Wl,--no-undefined -Wl,--as-needed -Wl,-soname=$(LIBN) -Wl,-Bsymbolic -o $@ \
$(XGCC) $(LDFLAGS) -shared -Wl,--no-undefined -Wl,--as-needed -Wl,-soname=$(LIBN) -Wl,-Bsymbolic -o $@ \
$(ALL_OBJS) $(OBJECTS)
@echo "Have `nm -u $@ | grep "U " | wc -l` undefined symbols"

Expand Down

0 comments on commit 3472f8d

Please sign in to comment.