From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 367833857813 for ; Fri, 16 Oct 2020 12:39:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 367833857813 Received: by mail-il1-x131.google.com with SMTP id l16so2366630ilj.9 for ; Fri, 16 Oct 2020 05:39:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=NyL3uPmjseigWH8UBDljZnnCNfXa321wF/Kk04qFEtg=; b=nYkH/yopHcqiaQYQmIzUehHXwtx0TIfQBU3RKuTo0URrNO2r/q9myehLo92HQi1B5g 6s/VDHtVkqDKz/+k/1daauHkWwviXxaZ3t+J1J9medfCTUDMUQoV5fvcDExZoXihUe4z uO4nLMRrqbn2DOOC1Xr7RjLgo2rQ3Z2yzNQbIt8BQta+mjNHBXEbYOT7DyGGBWx7Hl7Y NaLNJ/mVTqAD42EpcvW3hpD0vbxn4ozdkO/qlM5s++O9y9Ms55ViHkzWzC3j2upZ/Lg6 oPsqCqHUMoJwpBPycuLIv9bdNVaa43hbxN/JRNIW8MOHzED7FlOeyfsNpKYAAnS9rcUx lt9g== X-Gm-Message-State: AOAM530jHjrClonH0OTwkdpTDhts3ioimh61M6Xa4XDa7lzcbwR/xl7/ 0ddaHn7gLdHXWDlpLCB0y2ss6jtRACinqzpIZpOuJ+H4+OU= X-Google-Smtp-Source: ABdhPJwMfdHaNxOaZgzJo3XoVtTcnuLxqC2yMrddidLAXJp9h/Hf+KlPHNsJLsb64sjzyGlu5Jrc85McLfaK8Mp6R24= X-Received: by 2002:a05:6e02:d01:: with SMTP id g1mr2375789ilj.246.1602851954355; Fri, 16 Oct 2020 05:39:14 -0700 (PDT) MIME-Version: 1.0 From: William ML Leslie Date: Fri, 16 Oct 2020 23:39:03 +1100 Message-ID: Subject: Building a cross compiler fails due to hardcoding host=target in gcc/Makefile.in To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_05, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2020 12:39:16 -0000 Greetings, Please keep me CC'd as I'm not subscribed. I've been trying to build a cross compilation toolchain (for a new OS) and ran into a confusing error while building gcc 10.2.0. While building libgcc, it fails running libgcc/config.host as it gets passed my target instead of the actual host. I traced this back to the root Makefile.in, for which the `configure-target-libgcc` rule ends with: CONFIG_SITE=no-such-file $(SHELL) \ $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ --target=${target_alias} \ || exit 1 This is probably someone trying to be helpful when building a Canadian Cross (host == target), however there is already a host_alias variable defined at the very top of `Makefile.in`. When using a traditional cross compiler, the host is equal to the build machine; but the makefile ignores this case. Have I missed something, or should I send a patch for this? Snippet of make output where I hit this: Checking multilib configuration for libgcc... mkdir -p -- i386-unknown-capros/libgcc Configuring in i386-unknown-capros/libgcc ... checking for target glibc version... 0.0 *** Configuration i386-unknown-capros not supported Makefile:12629: recipe for target 'configure-target-libgcc' failed make[1]: *** [configure-target-libgcc] Error 1 make[1]: Leaving directory '/extra/wleslie/xenv2/build/gcc-10.2.0/build-capros' Makefile:954: recipe for target 'all' failed make: *** [all] Error 2 -- William Leslie Q: What is your boss's password? A: "Authentication", clearly Notice: Likely much of this email is, by the nature of copyright, covered under copyright law. You absolutely MAY reproduce any part of it in accordance with the copyright law of the nation you are reading this in. Any attempt to DENY YOU THOSE RIGHTS would be illegal without prior contractual agreement.