Skip to content

Commit a263bb8

Browse files
committed
test: ensure we use --no-as-needed when linking
On linux distros ld oftens default on --as-needed, so make sure have they DT_NEEDED
1 parent 5f29dca commit a263bb8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/frontend/add.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ create_shlibs() {
324324
touch empty.c
325325
cc -shared -Wl,-soname=libtest.so.1 empty.c -o libtest.so.1
326326
ln -s libtest.so.1 libtest.so
327-
cc -shared -Wl,-soname=libconsumer.so.1 empty.c -o libconsumer.so.1 -L. -ltest
327+
cc -shared -Wl,-soname=libconsumer.so.1 -Wl,--no-as-needed \
328+
empty.c -o libconsumer.so.1 -L. -ltest
328329
}
329330

330331
# Helper: set up the symlink directory layout for shlib tests.

0 commit comments

Comments
 (0)