From owner-freebsd-toolchain@freebsd.org Wed Aug 16 03:48:34 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30ABADE4101 for ; Wed, 16 Aug 2017 03:48:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C0996DD7D for ; Wed, 16 Aug 2017 03:48:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7G3mXLl025463 for ; Wed, 16 Aug 2017 03:48:33 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 221288] lang/gcc5 links against libsupc++ when compiling Date: Wed, 16 Aug 2017 03:48:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2017 03:48:34 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221288 --- Comment #11 from Mark Millard --- Trying my standard-C++ program that uses C++ threads in a more modern context (head -r322287, lang/gcc7) in an amd64 context under a Virtual Box virtual machine (that is running on Windows 10 Pro). . . # g++7 -std=3Dc++14 -Wpedantic -Wall -pthread -Wl,-rpath=3D/usr/local/lib/g= cc7 -O2 cpp_clocks_investigation.cpp # ldd a.out a.out: libstdc++.so.6 =3D> /usr/local/lib/gcc7/libstdc++.so.6 (0x800844000) libm.so.5 =3D> /lib/libm.so.5 (0x800bd8000) libgcc_s.so.1 =3D> /usr/local/lib/gcc7/libgcc_s.so.1 (0x800e05000) libthr.so.3 =3D> /lib/libthr.so.3 (0x80101c000) libc.so.7 =3D> /lib/libc.so.7 (0x801244000) # ./a.out . . . (omitted) . . . Segmentation fault (core dumped) # g++7 -std=3Dc++14 -Wpedantic -Wall -pthread -O2 cpp_clocks_investigation.= cpp# ldd a.out a.out: libstdc++.so.6 =3D> /usr/local/lib/gcc7/libstdc++.so.6 (0x800844000) libm.so.5 =3D> /lib/libm.so.5 (0x800bd8000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x800e05000) libthr.so.3 =3D> /lib/libthr.so.3 (0x80101b000) libc.so.7 =3D> /lib/libc.so.7 (0x801243000) # ./a.out . . . (omitted) . . . End of clock tests. So it worked for /lib/libgcc_s.so.1 but not for /usr/local/lib/gcc7/libgcc_s.so.1 and I must have been wrong about /lib/libcxxrt.so.1 being what mattered. This threading example is a context where -Wl,-rpath=3D/usr/local/lib/gcc7 prevents correct operation because of cross library dependencies on implementation details of the build-time context vs. the mismatched runtime context for libthr.so.3 vs. libgcc_s.so.1 . # clang++ -std=3Dc++14 -Wpedantic -Wall -pthread -O2 cpp_clocks_investigati= on.cpp # ldd a.out a.out: libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x800844000) libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x800b10000) libm.so.5 =3D> /lib/libm.so.5 (0x800d2e000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x800f5b000) libthr.so.3 =3D> /lib/libthr.so.3 (0x801171000) libc.so.7 =3D> /lib/libc.so.7 (0x801399000) # ./a.out . . . (omitted) . . . End of clock tests. So this also worked. Again /lib/libthr.so.3 and /lib/libgcc_s.so.1 go together just fine. --=20 You are receiving this mail because: You are the assignee for the bug.=