From patchwork Sat Aug 24 20:11:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 1976414 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wrp4428zPz1yfF for ; Sun, 25 Aug 2024 06:11:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id EC41781751; Sat, 24 Aug 2024 20:11:26 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 4X_0tJBf-ysT; Sat, 24 Aug 2024 20:11:15 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 32E1B8117C Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 32E1B8117C; Sat, 24 Aug 2024 20:11:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9BA621BF28D for ; Sat, 24 Aug 2024 20:11:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8A4C7402E1 for ; Sat, 24 Aug 2024 20:11:14 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id tpjb6gftJndm for ; Sat, 24 Aug 2024 20:11:13 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.227.17.21; helo=mout.gmx.net; envelope-from=j.neuschaefer@gmx.net; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org EDA78402DD DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EDA78402DD Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by smtp4.osuosl.org (Postfix) with ESMTPS id EDA78402DD for ; Sat, 24 Aug 2024 20:11:11 +0000 (UTC) X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from probook ([84.44.134.213]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N6KUT-1s2ZrH0TAP-010y7s; Sat, 24 Aug 2024 22:11:06 +0200 Date: Sat, 24 Aug 2024 22:11:02 +0200 MIME-Version: 1.0 Message-Id: <20240824-x264-textrel-v1-1-fbfcedc7179d@gmx.net> X-B4-Tracking: v=1; b=H4sIAFU+ymYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDCyMT3QojMxPdktSKkqLUHF0zwzTjRAszC8sUyzQloJaCotS0zAqwcdG xtbUAwC9TfF4AAAA= To: buildroot@buildroot.org X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1724530265; l=1535; i=j.neuschaefer@gmx.net; s=20240329; h=from:subject:message-id; bh=4H3VsGBF9Eho70c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47w7v6JFtlKhUdIC5o5dvhGNHn5UkJxYJG/hpJU2sO1V/H69V EbHMx29/jCimSjenJ+SeLBxrLrjEJTVK+Ld7LJyTp9OVPw8ZZYfYMhI5wPl8FHkjsz+8UbZqG Vvdc0OBPtHhyf1f/uOQeRdN0kFFWO1vFYJGtot6ZCReNfCQxLEZxHJ6M8Y3y14R31nZqX1cSx HEaghIxrlZqb5ePIPzmt7ZFWj6tOZ5WfCPHlg0WvJ3zPJM52j5zhdyCxn73Swdsvr0WE3XiyH 5FAP5fk2RgWY0W7jWXiCD4EQBeEPy1+2QkxnsgAtt0tbU= X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1724530266; x=1725135066; i=j.neuschaefer@gmx.net; bh=BX2myZdtS8D3U6fTMI4LOZ9hMwgcEmR98q6hP2L7tkw=; h=X-UI-Sender-Class:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:To:Cc:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=W4oPn7UMrsp66aZmBDX1snIdNrvjLei5osYN4j+jxrEyiYVSmDnP1jZm4rDzo3C+ MZgm5OoMgT8XJlC7HU+rox1SiHqJp2mHludZwLYuzEqYYEztLaxhcNsh6LlVoK9Ob iuLq7x0SMg4FJvSGzZ+pJG86lgJZAdipdnBkeoxkKMZsg2SrUtJOBiui9XiiBv23B j+pM6npgIr+5nJ6q24aDfigcts1y06JdomE+Mu5aZWv5VtSTc86Q3+KGHujIVZWb9 hjLiCbJI05OpTyzquP2sdRvmFICEh+bnEGqa5TbiBXcJYVw7tGbpqNnb6bQdbnTXK M/Zgmo+9A6kCshA6YQ== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmx.net header.i=j.neuschaefer@gmx.net header.a=rsa-sha256 header.s=s31663417 header.b=W4oPn7UM Subject: [Buildroot] [PATCH] package/x264: disable assembly code on x86 + musl + PIC/PIE X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_buildroot?= From: =?utf-8?q?J=2E_Neusch=C3=A4fer?= Reply-To: =?utf-8?q?J=2E_Neusch=C3=A4fer?= Cc: Bernd Kuhls , Yann Morin , David du Colombier <0intro@gmail.com>, =?utf-8?q?J=2E_Neusch=C3=A4fer?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The x264 package uses large amounts of non-PIC assembly code (e.g. common/x86/dct-a.asm), which results in textrels, which aren't supported by musl-libc's dynamic linker. Disable x264's assembly code when compiling for x86 with PIC/PIE and musl-libc to avoid this particular incompatibility. Reported-by: Yann Morin Fixes: https://lore.kernel.org/buildroot/ZrsirnrvgsEIpAJI@tl-lnx-nyma7486-2/ Signed-off-by: J. Neuschäfer --- package/x264/x264.mk | 6 ++++++ 1 file changed, 6 insertions(+) --- base-commit: 8bd00c16d8af2b4b620a0b2c136e6830b9d6b3a0 change-id: 20240824-x264-textrel-61f3a8689d9f Best regards, -- J. Neuschäfer diff --git a/package/x264/x264.mk b/package/x264/x264.mk index 97caf19466..e96d993017 100644 --- a/package/x264/x264.mk +++ b/package/x264/x264.mk @@ -14,9 +14,15 @@ X264_INSTALL_STAGING = YES X264_CONF_OPTS = --disable-avs --disable-lavf --disable-swscale ifeq ($(BR2_i386)$(BR2_x86_64),y) +ifeq ($(BR2_TOOLCHAIN_USES_MUSL)$(BR2_PIC_PIE),yy) +# libx264 uses large amounts of non-pic assembly code, resulting in text +# section relocations, which are not supported on musl-libc's ld.so. +X264_CONF_OPTS += --disable-asm +else # nasm needed for assembly files X264_DEPENDENCIES += host-nasm X264_CONF_ENV += AS="$(HOST_DIR)/bin/nasm" +endif else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y) # We need to pass gcc as AS, because the ARM assembly files have to be # preprocessed