Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5302286pxu; Tue, 22 Dec 2020 13:19:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIkWS+i5pTcHO5+e+voj4zpH2sd1uK7IH4YhvPwBHqg4ud9+3AKxTsesh4p+hfPsWt3WZR X-Received: by 2002:a17:907:94c6:: with SMTP id dn6mr21599637ejc.13.1608671975707; Tue, 22 Dec 2020 13:19:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608671975; cv=none; d=google.com; s=arc-20160816; b=B9v8NYqQwsiTj08gVJn+RWXBAUJjN1HNyJ5K8rQEnO9JskEBabOgsWYNNY04OZUVjg rhqZkpU6fvQgm8P72+4dbTXyFUKZ8mbugqxgyaplvP/AclnTPjdmbY3w1Nb6PK6vSAzW EVICJ9ffchDELsUTBVhHiHkBpXKZv+9BWfyKc861/yoiTqaPb0SeaisR24Q33/DXqSve HSzUbXUlAuCJMDRQBlw3ajFfir3JFrd3dOwa7iJKzeIyBNeA2a4PKLklaOyosUtML0Tv KPMe8HkFrNacr5nBvzU3EHlDyQI0jxXxGvfTqOdssvyXkFoIAX+DXNWTW2k/GfjkspzI eBeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mRuL9BQhchjhxwdNRcM/iUBr+uZCI6nNE/ji7rn3sZE=; b=TQB4y8gENY4Nb+97vkMfk1yBjTy7U7p8J3BJsfHnHsPi3sYtRx+P+JKVnMb6FeVccI dMjwN1tVJWl9omRDGMbp6G6GTpRBhgdOuUg9oN8lJrfVlsPlQpdRkFnoli06smUi6EtA rfax3BQVCdAD9Bkf/ku76ZkbCm7NPPJefDE03H+UtNGMKBp+4XxhznYBQBnGA+90SdaP ENNjUNiJgZ2aFquwEExjk2l7+/9J+zi2K7lgIqpWLx9oUSI56+lmem/bhwbCh8IwnY6W kow5Ybhct1YgIBSFwQHnvsrdSYjURhDQI+gHzFhP7EISxPm8HM9y2JakPC670ZSCWUqm so3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ecWmCrcP; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si6166812edf.132.2020.12.22.13.19.12; Tue, 22 Dec 2020 13:19:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ecWmCrcP; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727610AbgLVVSA (ORCPT + 99 others); Tue, 22 Dec 2020 16:18:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727071AbgLVVSA (ORCPT ); Tue, 22 Dec 2020 16:18:00 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 093C2C0613D3 for ; Tue, 22 Dec 2020 13:17:20 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id f132so16122955oib.12 for ; Tue, 22 Dec 2020 13:17:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=mRuL9BQhchjhxwdNRcM/iUBr+uZCI6nNE/ji7rn3sZE=; b=ecWmCrcPt1XQSjc0B8s8/T4urwG3tPxrMqAMaC3mK9loAVJkxVuuChpWYYmFCzehIU knpnfcGjhTyJ7E9otcwU6lYqzGMn6AbcqNE9UHtAv4BhsykEsONH8qJFdHm8IXYMSBo9 HcjEy8UqX1Zsy6nMbBgf1tgCpW52b5wn+bI7QePk7aG4RWx5j+g5rjLMWFzrYbqzY5dJ ZmbJa/kImKji9g+NbbFCC1Dc+9hYI5Yv6PMmkSu7301qxDynaXpNGDAG5gSgRSmK5ySj sqoJktwf5tHQoK9xB4VPmQc/SetGwQMqYSkGKBRyLDaT15qy5hsLDyr5QQOAYc0aVBTP Khug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=mRuL9BQhchjhxwdNRcM/iUBr+uZCI6nNE/ji7rn3sZE=; b=TVKQ9xBwmhAqGWYae40mfXQccMaPnyuN5ku7feSl9vky3v1US1Cl6PKMpawMDgifwF A1+WI0x+6gqrzWbfFPECBL00l6VLplD0cwV7r6h9DIIWQPjlCpNhUs53dkB2+mnFDRfN taMR+NCgLVs13Wux8JwbVLgziPlgZyKZBnycRJPWv8Hb4hyWdVBUIRYvtmg0U+zfrV0v 0Xky+8ZsETr16rrLRELul5y9aVyGlSLT5/Cz3SghugEx5dXOBQ2CDJ/2IU4jboopD8GT JDTWuA8JZAQkZGTKf+ypLfMHbJKLxV2vtie2Bl9+tATe8zf3L1MLbpS9IiYAFCwBstHl DX7g== X-Gm-Message-State: AOAM532051y02CTMujA0lDUC0li2D9Foge6elTElXay6OU6/2kkO+8UL 8LSzO0zKCuajkYBxFOns1Kf4iJlBjhVSpSH20SA= X-Received: by 2002:aca:1917:: with SMTP id l23mr15668328oii.64.1608671839302; Tue, 22 Dec 2020 13:17:19 -0800 (PST) MIME-Version: 1.0 References: <20201222110424.19368-1-marius@devup.no> In-Reply-To: <20201222110424.19368-1-marius@devup.no> From: Luiz Augusto von Dentz Date: Tue, 22 Dec 2020 13:17:08 -0800 Message-ID: Subject: Re: [PATCH v3] sbc_primitives: Fix build on non-x86. To: Marius Bakke Cc: Marcel Holtmann , Luiz Augusto von Dentz , "linux-bluetooth@vger.kernel.org" , Marius Bakke Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marius, On Tue, Dec 22, 2020 at 3:07 AM Marius Bakke wrote: > > From: Marius Bakke > > Don't call __builtin_cpu_init unless targeting i386 or x86_64. > Otherwise we get an error at link time: > > CC sbc/sbc_primitives.lo > sbc/sbc_primitives.c: In function =E2=80=98sbc_init_primitives_x86=E2=80= =99: > sbc/sbc_primitives.c:596:2: warning: implicit declaration of function =E2= =80=98__builtin_cpu_init=E2=80=99; did you mean =E2=80=98__builtin_irint=E2= =80=99? [-Wimplicit-function-declaration] > [...] > CCLD src/sbcdec > ld: sbc/.libs/libsbc-private.a(sbc_primitives.o): in function `sbc_init_p= rimitives': > sbc_primitives.c:(.text+0x3a30): undefined reference to `__builtin_cpu_in= it' > --- > sbc/sbc_primitives.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c > index 97a75be..09c214a 100644 > --- a/sbc/sbc_primitives.c > +++ b/sbc/sbc_primitives.c > @@ -593,6 +593,7 @@ static int sbc_calc_scalefactors_j( > > static void sbc_init_primitives_x86(struct sbc_encoder_state *state) > { > +#if defined(__x86_64__) || defined(__i386__) > __builtin_cpu_init(); > > #ifdef SBC_BUILD_WITH_MMX_SUPPORT > @@ -604,6 +605,7 @@ static void sbc_init_primitives_x86(struct sbc_encode= r_state *state) > if (__builtin_cpu_supports("sse4.2")) > sbc_init_primitives_sse(state); > #endif > +#endif > } > > /* > -- > 2.29.2 Applied, thanks. --=20 Luiz Augusto von Dentz