From patchwork Sat Mar 7 15:32:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Michael X-Patchwork-Id: 18083 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 90E2D44B750 for ; Sat, 7 Mar 2020 18:04:32 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6CBBC68A214; Sat, 7 Mar 2020 18:04:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A226F689C5D for ; Sat, 7 Mar 2020 18:04:25 +0200 (EET) Received: by mail-qk1-f195.google.com with SMTP id z12so5282575qkg.12 for ; Sat, 07 Mar 2020 08:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=P+TZe71ejM4/Y/ww5CrjGEyE6j8EVDxPv9YQyscPwOU=; b=ZCzZMuyyQo/uU9WmoFtPSSfCev7u51SCKQezQLLNeYmAQGzC8W0kIGGq8F27+xkLbD cREdfRjNHJH8aVRsk9KABMlXd3HAp+bM4et/CyqOHczGHk0BvHQ4areP5Gvl/0h/jk8y bldzaG9q3OS0Rue9VQ+2sNS5mvy5WZXO/VBIceXjafObtQSo/csW9gnQxoiZGQSLJZpP uvcY5AOORTov5/1sJ0tuoIomGhfnReWXLB8pZWg1pcJL7XJswxQcu8hY0n5lBOL6+2cW fOXsgpZIPQ8bAEiUcp4ZXKW09OfxT3xkHei+FoFq3N/CdHW+Vv8uzbpbe0IaNm8B57G8 ZIBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=P+TZe71ejM4/Y/ww5CrjGEyE6j8EVDxPv9YQyscPwOU=; b=I5xWHuRtLWV+46o8zmd5VQvYvl9h1NPxjaBeV5/6hgdL/ViIe1cCy7tpRVgQTYPOYL BIlb14yAM3oVZDQXxfwtYCHXsdknqGQpXlObzIo0JXG2p+QTdBp8xknLzx7OoTlLusOy 61bzVENmBCG/atTaQHEgKfF5BLLzcnawp4WP/1LUVzeQT7Dz+7AtSER/c4bt7KA2/2s4 OJu68lVSjUaoHYBCncTvPoh408JB5cdELQaRLe4+oOaW7lCTIEhoEuI738q2JqIFOmb4 K11oGlrdPDipnpQ87E5Qj874/7XhKphE5Mpg978i0T8VnGZJyAwplYofwrPWs9BBXTED M0kw== X-Gm-Message-State: ANhLgQ2rnvFz+ZV1Xm0rw42EARAX0v92VhWfSQXyVzwpMYZStzNxfgV5 VF9MD5cr+qm2NNc3CHNhCsL4Ws8+ X-Google-Smtp-Source: ADFU+vvTaPe8SWNN2U9rLso6749yCdZiixMTiv6aRM+HvG26N9pi+QiinC0rqydL56yvtDXu4L5ssA== X-Received: by 2002:a37:6591:: with SMTP id z139mr7797368qkb.18.1583595175409; Sat, 07 Mar 2020 07:32:55 -0800 (PST) Received: from callisto ([2601:986:200:7341:384b:df90:fb2f:c5df]) by smtp.gmail.com with ESMTPSA id h7sm10999343qkm.125.2020.03.07.07.32.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Mar 2020 07:32:54 -0800 (PST) From: David Michael To: ffmpeg-devel@ffmpeg.org Date: Sat, 07 Mar 2020 10:32:53 -0500 Message-ID: <87o8t8p4d6.fsf@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] configure: Do not abort when cross-compiling to the native CPU X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Using a compiler with a different host triplet is considered cross-compiling, even when it is for the same architecture as the build system. With such a cross-compiler, it is still valid to optimize builds with --cpu=host. Drop the condition that aborts in this case, since a cross-compiler for an incompatible architecture will fail with -mtune=native anyway. Signed-off-by: David Michael --- Hi, I am building software in a ChromeOS-style environment where the native build system creates a cross-compiler with a different vendor string for each supported architecture, and cross-compiled packages are installed into their own root directory. The build system's architecture is not handled any differently, so packages compatible with the native architecture are still technically being cross-compiled. When I changed settings to tune for the native CPU so I can produce an installation optimized to run on the build system hardware, FFmpeg fails from this seemingly redundant test. Can it just be dropped? Thanks. David configure | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure b/configure index 06e3a7b2a8..69ffdeb3ed 100755 --- a/configure +++ b/configure @@ -4785,9 +4785,6 @@ if test -n "$sysroot"; then fi if test "$cpu" = host; then - enabled cross_compile && - die "--cpu=host makes no sense when cross-compiling." - case "$cc_type" in gcc|llvm_gcc) check_native(){