Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4373340pxu; Mon, 21 Dec 2020 10:45:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0StJd5GfIUiifi5byxVZx28IZVPvSbWtpLkymFnwoEQqdzZVNFiqEuIfdPUPUHbiq3j9n X-Received: by 2002:aa7:c652:: with SMTP id z18mr16663243edr.60.1608576329961; Mon, 21 Dec 2020 10:45:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608576329; cv=none; d=google.com; s=arc-20160816; b=L/bk2+AvNmKlMyTnIEaL9tHhJLS/Gv15Anai2tykrDIYrwFadJRTeU5fPV0agXYmbO DM5SHfy46JKgAoG0nH+9aK825mw+BrXXbHfjQJuGlDWh99iBdt7GwmhIZRd8jButfmkk CyJc/9bVOViTQgzcNxtFbrENNVraAsv7dIsnGDmtdP0Tc/t37a7aecwwaIJ7aLh6r1b7 bBitnPkqjMAVfP1nYqm1Ck3B2UbUqerKqSZWdqjtXB3SzTNLGV6pVA76tKrGnEHoVN0H DIedIgKB9MgK7FQnYSi2+onkpdGyWIONpTa/vVBNCU4gbkfuiZF9sVFgsl0cBzzRWXL/ 46ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UYEV/8hRVkjZF+p7iMYxIlsHkiHHRmHm8/IC7lta+Dg=; b=MYhm7MW1zZkogRW4vslQjjPKjnOOW6C9Qx710VyZiznsninZvthw/pZcEkG2lMoV/J 5+xXYojf2gala7TqgxBO9h/04A2pG2wAQWae5PRksuTuPJnBfgYqhzspW5ZenlNWylOy HszjGyJtwdqRA0p3XPm7wmSlASZG8wKLKriyQGaWpoN8VBuJq7nTgoKdP+d72syPHSr+ KDyw0ztkZZRRv1txS8WVfT4/dn+Ke/s6vFjJIorDLgocwGdvjfQr6FUJntJzrKylcIsU vk2E23d78hAzBbUj458YToVOLLQy1WamvOrbU0VY18QmJsgjF1SCl7TIzhAmORWW/R2V Lohw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gnu.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b21si9205862ejk.520.2020.12.21.10.44.56; Mon, 21 Dec 2020 10:45:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727480AbgLUSmK (ORCPT + 99 others); Mon, 21 Dec 2020 13:42:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727188AbgLUSmJ (ORCPT ); Mon, 21 Dec 2020 13:42:09 -0500 Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79D63C061793 for ; Mon, 21 Dec 2020 10:41:29 -0800 (PST) Received: from fencepost.gnu.org ([2001:470:142:3::e]:43226) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krQ7S-0006FQ-Is; Mon, 21 Dec 2020 13:41:18 -0500 Received: from host-37-191-236-253.lynet.no ([37.191.236.253]:55836 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1krQ7R-0001J1-Sk; Mon, 21 Dec 2020 13:41:18 -0500 From: marius@gnu.org To: Marcel Holtmann Cc: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, Marius Bakke Subject: [PATCH v2] sbc_primitives: Fix build on non-x86. Date: Mon, 21 Dec 2020 19:41:14 +0100 Message-Id: <20201221184114.1300-1-marius@gnu.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 ‘sbc_init_primitives_x86’: sbc/sbc_primitives.c:596:2: warning: implicit declaration of function ‘__builtin_cpu_init’; did you mean ‘__builtin_irint’? [-Wimplicit-function-declaration] [...] CCLD src/sbcdec ld: sbc/.libs/libsbc-private.a(sbc_primitives.o): in function `sbc_init_primitives': sbc_primitives.c:(.text+0x3a30): undefined reference to `__builtin_cpu_init' --- sbc/sbc_primitives.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c index 97a75be..d8e166a 100644 --- a/sbc/sbc_primitives.c +++ b/sbc/sbc_primitives.c @@ -593,7 +593,9 @@ 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(); +#endif #ifdef SBC_BUILD_WITH_MMX_SUPPORT if (__builtin_cpu_supports("mmx")) -- 2.29.2