From patchwork Tue Dec 20 15:37:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 18593 Received: (qmail 39639 invoked by alias); 20 Dec 2016 15:37:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 39624 invoked by uid 89); 20 Dec 2016 15:37:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=no version=3.3.2 spammy=H*MI:sk:AM5PR08, declares, HContent-Language:en-GB X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com From: Wilco Dijkstra To: "libc-alpha@sourceware.org" CC: nd Subject: [PATCH] Fix C++ debug tests Date: Tue, 20 Dec 2016 15:37:14 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-office365-filtering-correlation-id: 3ed494d7-bd69-4199-abc7-08d428ee12a3 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:AM5PR0802MB2610; x-microsoft-exchange-diagnostics: 1; AM5PR0802MB2610; 7:CRE7bQr21l+BYcklVS1YU9Y/a49IZ5N/45Qfy9ZhDhvy+/OQ7vNOjtx9wL/8QMJKhxjnuQJHZnlbYCqtr7jtDbTiCPlV/HM8xesSQpnX+b2dtXQ6jutVD+tiPZrpJN9RdX7DR6PcWm6jxMIWE5x2lV/UsPsgFtwSbwF5FLTmHV3lrkodKaBquqcSpV71GCKgcWGBk07SZqkGDgP+ea7u+gTPUT6QHBhzf2lIfUreWDEpL2uJWws0Vg8zQcqlOw9WmQZYcungyziOVU5dfWIDQYoG1t2aljEigUVPaX2qKRzzTVcvgP8vLxNdZSJ0EQIhihP3lNFpYLSeiBI7zP2ZrtQFSONGC6j+cJvBrG1NTEUOAJRaEagK6whsxTklo4EtTKYM+XAe9Zt4iqNOt8ps7l1Btnbr3YSb1E133IvTlhyhinAAmQReieLthBjwHGbaJ0uXi+fZtSpLjoRCIWIarA== nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558021)(20161123562025)(6072148); SRVR:AM5PR0802MB2610; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2610; x-forefront-prvs: 0162ACCC24 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39860400002)(39410400002)(39840400002)(39450400003)(39850400002)(199003)(189002)(54534003)(377424004)(5640700003)(77096006)(101416001)(86362001)(6506006)(68736007)(50986999)(38730400001)(66066001)(575784001)(81166006)(3280700002)(54356999)(8936002)(7696004)(3660700001)(81156014)(6436002)(8676002)(74316002)(76576001)(450100001)(5660300001)(2900100001)(25786008)(7736002)(33656002)(4001150100001)(305945005)(122556002)(9686002)(4326007)(97736004)(2501003)(6116002)(3846002)(102836003)(6916009)(110136003)(189998001)(106116001)(106356001)(105586002)(2351001)(2906002)(92566002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2610; H:AM5PR0802MB2610.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2016 15:37:14.3744 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2610 The internal header include/string.h does not work in C++: it causes link errors in several C++ debug tests when any of the functions it declares are called. The best option would be to not use internal headers for tests (unless explicitly needed). As a workaround for now, add extern "C" {} to the C++ debug tests. C++ debug tests now build and pass. ChangeLog: 2016-12-21 Wilco Dijkstra * debug/tst-chk4.cc: Add extern "C". * debug/tst-chk5.cc: Likewise. * debug/tst-chk6.cc: Likewise. * debug/tst-lfschk4.cc: Likewise. * debug/tst-lfschk5.cc: Likewise. * debug/tst-lfschk6.cc: Likewise. diff --git a/debug/tst-chk4.cc b/debug/tst-chk4.cc index c82e6aac86038791309486d6d40a29f5897e9755..75c2de659460c555a0956eeb1b49c4d6a1615f36 100644 --- a/debug/tst-chk4.cc +++ b/debug/tst-chk4.cc @@ -1 +1,3 @@ +extern "C" { #include "tst-chk1.c" +} diff --git a/debug/tst-chk5.cc b/debug/tst-chk5.cc index be37ce2d22f0760a880003f39b8a67a471530f82..95b3108d8349210420b88388ec3c406fdfccb00c 100644 --- a/debug/tst-chk5.cc +++ b/debug/tst-chk5.cc @@ -1,2 +1,4 @@ +extern "C" { #define _FORTIFY_SOURCE 1 #include "tst-chk1.c" +} diff --git a/debug/tst-chk6.cc b/debug/tst-chk6.cc index 38b8e4fb360ba72255eb462f98c97dd4e1b56b55..fcaf0e1035afcca92e5371bc6b6b7ae4ad96c345 100644 --- a/debug/tst-chk6.cc +++ b/debug/tst-chk6.cc @@ -1,2 +1,4 @@ +extern "C" { #define _FORTIFY_SOURCE 2 #include "tst-chk1.c" +} diff --git a/debug/tst-lfschk4.cc b/debug/tst-lfschk4.cc index f3e6d47d5e4484c3735c8d1fe2a5f847279d54cb..e2ec17d9705adc70868ea9fa3e158a794cb2058a 100644 --- a/debug/tst-lfschk4.cc +++ b/debug/tst-lfschk4.cc @@ -1,2 +1,4 @@ +extern "C" { #define _FILE_OFFSET_BITS 64 #include "tst-chk1.c" +} diff --git a/debug/tst-lfschk5.cc b/debug/tst-lfschk5.cc index 95d4db1d32d2eeb36cdf94ffe062350296242581..df9549f5c7bcb744eca7b3e5cbfb35376068a938 100644 --- a/debug/tst-lfschk5.cc +++ b/debug/tst-lfschk5.cc @@ -1,2 +1,4 @@ +extern "C" { #define _FILE_OFFSET_BITS 64 #include "tst-chk2.c" +} diff --git a/debug/tst-lfschk6.cc b/debug/tst-lfschk6.cc index 50a1ae1258f1553d11731e2ff45d18422e16e20c..bab9fa803802c478064943569189ea2d1f026ab3 100644 --- a/debug/tst-lfschk6.cc +++ b/debug/tst-lfschk6.cc @@ -1,2 +1,4 @@ +extern "C" { #define _FILE_OFFSET_BITS 64 #include "tst-chk3.c" +}