From patchwork Thu Feb 9 15:10:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 19189 Received: (qmail 54878 invoked by alias); 9 Feb 2017 15:11:18 -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 54801 invoked by uid 89); 9 Feb 2017 15:11:11 -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=2016-12-21, HX-HELO:sk:EUR03-A, HContent-Language:en-GB X-HELO: EUR03-AM5-obe.outbound.protection.outlook.com From: Wilco Dijkstra To: "libc-alpha@sourceware.org" CC: nd Subject: Re: [PATCH] Fix C++ debug tests Date: Thu, 9 Feb 2017 15:10:58 +0000 Message-ID: References: In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-office365-filtering-correlation-id: c74d2c20-001b-45ca-eeb1-08d450fdda56 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:AM5PR0802MB2610; x-microsoft-exchange-diagnostics: 1; AM5PR0802MB2610; 7:tHXvU+8kirOPOXBWqTvnS0rB7Zuq7Vbf2Q5/qnOXtN3T3up/0EQPtLVM4cr1OftBUm7SK2FQgWvivQv3MZJ78TuBByGDhWum+cDFhuGcFe/H16KuGklqmc7K+CCt7VP0ma5ZQKe5ZU1xninHScWVwdtrs0zr4Ngh7tLi0BBvwwDF6h4brZ9/5jw36EHXxZ0wtMU5eKVdYVHpmRpgPp8dtayyXijhZ8cuGQRPodoAXaXuXW9/qZ00kja6lEZKOPwIM3itAw2+srkxmi8nmUL/Pr8sRgkw8J9wx6Pp8y/li21wu9GMMcf9fJnn05Z1Zglj6glJ1PVtJh34FTrEd2Kjq4Mk4vMvTV1hm4HVdkpKNs0m+fwEuqxd2f3SMLdj8IDX4XTAm/kc1jbK2tZEIVAC5vZPDzsWG0qA0aN/uBhmB8x8PEknZ4s8LxvcBTKI2qIcQcfI8Cajy3ZSbW717KxBq1ffNxN6X/lo2hcrozX29QRqAkS7l51y6XZYD5ePT19Iw0OVjkN56oZKkjv+dRlz0g== 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)(20161123562025)(20161123555025)(20161123558025)(20161123560025)(6072148); SRVR:AM5PR0802MB2610; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2610; x-forefront-prvs: 02135EB356 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39840400002)(39450400003)(39860400002)(39850400002)(39410400002)(377424004)(199003)(54534003)(189002)(97736004)(66066001)(86362001)(189998001)(2351001)(68736007)(2900100001)(53936002)(6116002)(102836003)(81166006)(76176999)(575784001)(101416001)(54356999)(50986999)(450100001)(4001150100001)(122556002)(3846002)(6916009)(2950100002)(2501003)(4326007)(92566002)(7736002)(3280700002)(3660700001)(55016002)(106116001)(33656002)(305945005)(105586002)(81156014)(8676002)(74316002)(6436002)(7696004)(8936002)(6246003)(5640700003)(25786008)(6506006)(106356001)(9686003)(110136004)(77096006)(5660300001)(53546003)(38730400002)(229853002)(99286003)(2906002); 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: 09 Feb 2017 15:10:58.1617 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2610 ping From: Wilco Dijkstra Sent: 20 December 2016 15:37 To: libc-alpha@sourceware.org Cc: nd Subject: [PATCH] Fix C++ debug tests   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" +}