From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id C40A9398AC36 for ; Tue, 30 Aug 2022 14:47:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C40A9398AC36 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x531.google.com with SMTP id e18so7008871edj.3 for ; Tue, 30 Aug 2022 07:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:date:to:from :subject:message-id:from:to:cc; bh=3b/gFPdjkJPfVwJNEMrTjeXhcOmAfJL8CgL9GUyAOtE=; b=YkUbJVOrAyHYDkNdwrVNtQ7JEI9XL0hTcGsrjXDHlgnt/WY0j+T7bAU6qS1nNv2OO8 6W9bDz29Kui/x4n4u+Cvu+7D8+M/6rttqeg3gfwIlT/bis4gQWc+8X+nEj2z/j3h9mxn 72ho1kYSwzvXMRgt/jju1Vy6h6MP0GedKAeJxEkphlmIZprgfapc0NtfHzwMXEhMcYo+ QGTYqaQNWGgOYXpYfPbo121vdozKi8X8u4JPH9kGNF3j8T1UHCYDAe7zALKKR8enGkaW YRtk9NMd3T6+o7zOjP/2F/zLQeY9ScId6BzJxgrISBiecbjwEDDHe1JIWTKqO6B5NLvK xQGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:date:to:from :subject:message-id:x-gm-message-state:from:to:cc; bh=3b/gFPdjkJPfVwJNEMrTjeXhcOmAfJL8CgL9GUyAOtE=; b=fCon57Nbpsr5E8aWMR5ybmHwfz2gXoxpTfzd55zL8pJOUu4nCbN80h/QxQWm2HyxV3 IAfBgmebPKU9+ey05b5eHEmH+0TfA+N+4qwJh7yrky98d68nJ6RD/71S1cV+UFRiDYTc y6DShnDx/KbyMlsLyr4IIk4EZAKZtVzHbWZfw1dbHS4PpA3+sCh2/YUbiZOjdS9v2y1O UI/7hYCyti8o8ECYIQWMI2jWPovWdyL9mtZmlr0vuT1RuZ3psgWLfpYY1PmKVM/hTwVz lBfrEDoekIxwUftKGAkexw+2+2aX196HJc2LEPqqrfs11CGrAHSz9vTLCcVoIZC5Hijs fulQ== X-Gm-Message-State: ACgBeo3u8NzdO3/OfO0E4f5NRIb65FYN5SrbRZ4JugmCNLk8vkopXRLA cZPLvkMs3DVY5CzjBZDHA14uyqPGv4YEhQ== X-Google-Smtp-Source: AA6agR7CZzCADy2egEEQtxUWLf7Rr+f5z+nDFSN2y9//lQ8CqiRnTIdiobh7Nb9Eg0vbgU38DtoSvA== X-Received: by 2002:a05:6402:496:b0:443:a5f5:d3b with SMTP id k22-20020a056402049600b00443a5f50d3bmr21517911edv.331.1661870835828; Tue, 30 Aug 2022 07:47:15 -0700 (PDT) Received: from [192.168.0.152] (ip1f10f159.dynamic.kabel-deutschland.de. [31.16.241.89]) by smtp.gmail.com with ESMTPSA id la14-20020a170907780e00b00730b3bdd8d7sm5968142ejc.179.2022.08.30.07.47.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 07:47:15 -0700 (PDT) Message-ID: <4161b707473552ce74c41c8867c2cc6d77ff4e05.camel@gmail.com> Subject: Relation between gcc version and libstdc++ version From: Anton =?ISO-8859-1?Q?W=F6llert?= To: gcc@gcc.gnu.org Date: Tue, 30 Aug 2022 16:47:14 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello list! I was trying to build a cross-compilation toolchain for a specific target using a newer GCC version, than the one that the binaries were build on the target. The C part seems to work well, but the C++ part doesn't. It seems that the G++ ships it's own libstdc++ include headers. If this libstdc++ is newer than the one one the target, I get undefined references (because there are some newer implementation details and things like that). Is it possible to tell G++/GCC to use the libstdc++.so from the target and also to use the C++ headers (like iostream) from the target? If not, is there any reason this is hard-coded? With clang it looks like you can specify "any" libstdc++ version you want, although I haven't tested it yet. Kind regards, Anton