Resolve circular library references with --start-group

src/crypto/libcrypto.a and src/tls/libtls.a have circular references
and will need special handling with the linker at least for the time
being. This could be cleaned up eventually, but for now, provide a
mechanism to get the programs linked.
This commit is contained in:
Jouni Malinen 2009-12-06 17:18:28 +02:00
parent ab7ddc74ad
commit 0bc377fa93

View file

@ -18,10 +18,14 @@ endif
CFLAGS += -I../src CFLAGS += -I../src
CFLAGS += -I../src/utils CFLAGS += -I../src/utils
LIBS = ../src/utils/libutils.a \ SLIBS = ../src/utils/libutils.a
../src/crypto/libcrypto.a \
DLIBS = ../src/crypto/libcrypto.a \
../src/tls/libtls.a ../src/tls/libtls.a
LIBS = $(SLIBS) $(DLIBS)
LLIBS = -Wl,--start-group $(DLIBS) -Wl,--end-group $(SLIBS)
../src/utils/libutils.a: ../src/utils/libutils.a:
$(MAKE) -C ../src/utils $(MAKE) -C ../src/utils
@ -60,7 +64,7 @@ test-sha256: test-sha256.o $(LIBS)
$(LDO) $(LDFLAGS) -o $@ $^ $(LDO) $(LDFLAGS) -o $@ $^
test-x509: test-x509.o $(LIBS) test-x509: test-x509.o $(LIBS)
$(LDO) $(LDFLAGS) -o $@ $^ $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
run-tests: $(TESTS) run-tests: $(TESTS)