build: At least honor the LDFLAGS from the environment

When not honoring the environment we end up linking it without the
GNU_HASH for symbol look-up. Put the content into LIBS and place
these options last to make it link.

We still override the CFLAGS but that seems to not cause issues yet

Fixes:

ERROR: ... No GNU_HASH in the elf binary: 'rtl8168-eeprom' [ldflags]
master
Holger Hans Peter Freyther 6 years ago
parent e62e515ce3
commit 47e0b24d7a
  1. 4
      Makefile

@ -1,11 +1,11 @@
CFLAGS=-Wall -g `pkg-config --cflags libpci`
LDFLAGS=`pkg-config --libs libpci`
LIBS=`pkg-config --libs libpci`
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $^
rtl8168-eeprom: rtl8168-eeprom.o
$(CC) $(LDFLAGS) -o $@ $^
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
clean:
rm -f rtl8168-eeprom rtl8168-eeprom.o

Loading…
Cancel
Save