lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 24 Jun 2014 19:53:36 -0600
From:	Shuah Khan <shuah.kh@...sung.com>
To:	gregkh@...uxfoundation.org
Cc:	Shuah Khan <shuah.kh@...sung.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] tools: Fix mqueue Makefile compile linking order

Makefile compile linking order is incorrect causing the compile
to fail not finding librt symbols.

/tmp/cceTqwFh.o: In function `test_queue_fail':
mq_open_tests.c:(.text+0x6b): undefined reference to `mq_open'
mq_open_tests.c:(.text+0x80): undefined reference to `mq_getattr'
mq_open_tests.c:(.text+0xa2): undefined reference to `mq_close'
mq_open_tests.c:(.text+0xcf): undefined reference to `mq_unlink'
/tmp/cceTqwFh.o: In function `test_queue.constprop.6':
mq_open_tests.c:(.text+0x15a): undefined reference to `mq_open'
mq_open_tests.c:(.text+0x16f): undefined reference to `mq_getattr'
mq_open_tests.c:(.text+0x195): undefined reference to `mq_close'
mq_open_tests.c:(.text+0x1c2): undefined reference to `mq_unlink'
/tmp/cceTqwFh.o: In function `shutdown.part.0':
mq_open_tests.c:(.text.unlikely+0x5b): undefined reference to `mq_close'
mq_open_tests.c:(.text.unlikely+0x7a): undefined reference to `mq_unlink'
collect2: error: ld returned 1 exit status
make: *** [all] Error 1

Signed-off-by: Shuah Khan <shuah.kh@...sung.com>
---
 tools/testing/selftests/mqueue/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index 218a122..8056e2e 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,6 +1,6 @@
 all:
-	gcc -O2 -lrt mq_open_tests.c -o mq_open_tests
-	gcc -O2 -lrt -lpthread -lpopt -o mq_perf_tests mq_perf_tests.c
+	gcc -O2 mq_open_tests.c -o mq_open_tests -lrt
+	gcc -O2 -o mq_perf_tests mq_perf_tests.c -lrt -lpthread -lpopt
 
 run_tests:
 	@./mq_open_tests /test1 || echo "mq_open_tests: [FAIL]"
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ