From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3132A3838CF8; Sat, 17 Dec 2022 00:25:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3132A3838CF8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671236707; bh=DgfCbiKR3JECk0kpHiDYDrGyDAd2+S8w2epf64R3Dec=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YcOWGQr15G3qwG5XZhrds8fEoW7gjOLV+YcsahlHpQOxkQaQKuI7rHAXUOeNdzJlW BT6lK/m54xCJ2mns8HAzZvjnd+D3CJ8//JDQHjLq3iLSQJig8tT4U0SqBZ8rda2dLD C3FmJrMx8+saff7L0MT5x7MvXHg0Cfjjm9RDKad8= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/107612] plugin/m2rte doesn't build on Mac OS X 10.7 Date: Sat, 17 Dec 2022 00:25:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107612 --- Comment #9 from Iain Sandoe --- mystery solved. The symbols are also undefined on Linux, but the linux linker silently allo= ws this. To do this on Darwin, we have to add -Wl,-undefined,dynamic_lookup=20 However, this mode is looking like it's deprecated.. (as is dynamic exports= ).=20=20 ... so what we need is the library dependency order and then we can build in reverse order and link the dependency DSOs ... =3D=3D=3D=3D=3D NOTE: I think we should link the plugin against the stdc++ symbols in gm2, since that statically links libstdc++ ..=20 .. if we dynamically link it from the plugin then when the plugin is loaded there would be two versions of each libstdc++ symbol in the same process (o= ne from gm2 and one from the libstdc++.dylib). fun...=