From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114513 invoked by alias); 8 Jan 2018 10:42:21 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 114495 invoked by uid 89); 8 Jan 2018 10:42:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (158.69.185.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Jan 2018 10:42:19 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Fix GDB build failure when $development is false From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: <1e5ded6ce688ddee065fa852053dda07fcce959e@gdb-build> Date: Mon, 08 Jan 2018 10:42:00 -0000 X-SW-Source: 2018-q1/txt/msg00510.txt.bz2 *** TEST RESULTS FOR COMMIT 1e5ded6ce688ddee065fa852053dda07fcce959e *** Author: Yao Qi Branch: master Commit: 1e5ded6ce688ddee065fa852053dda07fcce959e Fix GDB build failure when $development is false We don't build GDB selftests bits when $development is false. However, if we turn bfd/development.sh:$development to false, common/selftest.c is compiled which is not expected. It causes the build failure, selftest.o: In function `selftests::run_tests(char const*)': binutils-gdb/gdb/common/selftest.c:97: undefined reference to `selftests::reset()' collect2: error: ld returned 1 exit status I fix this issue by putting selftest.o selftest-arch.o into CONFIG_OBS only when $development is true. After this is fixed, there are other build failures in maint.c, this patch fixes them as well. In the release mode, the output of these commands are: (gdb) maintenance selftest Selftests are not available in a non-development build. (gdb) maintenance selftest foo Selftests are not available in a non-development build. (gdb) maintenance info selftests Selftests are not available in a non-development build. gdb: 2018-01-08 Yao Qi Simon Marchi * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and common/selftest.c. (COMMON_OBS): Remove selftest.o. * configure.ac: Append selftest-arch.c and common/selftest.c to CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS. * configure: Re-generated. * maint.c (maintenance_selftest): Wrap selftests::run_tests with GDB_SELF_TEST. (maintenance_info_selftests): Likewise. gdb/testsuite: 2018-01-08 Simon Marchi * gdb.gdb/unittest.exp: Match output in non-development mode.