From patchwork Sat Oct 3 23:22:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1376363 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ajB+5Npp; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C3jb353hFz9sRR for ; Sun, 4 Oct 2020 10:23:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F1A80870E1; Sat, 3 Oct 2020 23:23:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vfEvQfdJYOtF; Sat, 3 Oct 2020 23:23:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B725D86FFB; Sat, 3 Oct 2020 23:23:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 034D51BF5DA for ; Sat, 3 Oct 2020 23:23:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 00072203E7 for ; Sat, 3 Oct 2020 23:23:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DWOzU51iNW2U for ; Sat, 3 Oct 2020 23:23:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by silver.osuosl.org (Postfix) with ESMTPS id 64A0A203E6 for ; Sat, 3 Oct 2020 23:23:02 +0000 (UTC) Received: by mail-wr1-f46.google.com with SMTP id g12so232138wrp.10 for ; Sat, 03 Oct 2020 16:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h4o64xKlc44k7TbOMDxwnQ6DOnxmFR5p0qOpOAE6rMI=; b=ajB+5Npp4W79vrj8qkn6OgOoF+x/qQNIL0nkLmz5kVReoeLm8/dsIQPbrMq+PHdfdJ C/1lRPdfTJIwzH/yQx0KRp7iLPMvkOji387dr1SDOqqXwyDAPnE6ydfcvSkqdqOJaU46 e7t+nPu792d/zI1AdweK6JYh8pheOCWeUPwUVu3zMNFl8HVmM8i+BBOED7hdgSfwvK5Z gTX5L9IWKD0IwNbYGpQLlxBjbitFgQagvpRcVC5CJS/3KopGzKVnn6QuJhGmP0zr6tjW ZCmTC93RHYYYXEvUBuDeNiVJi3crDyf/U/LfBVFC8TbBx3CmFh1tJr/p39mZoepqcw+B dyqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=h4o64xKlc44k7TbOMDxwnQ6DOnxmFR5p0qOpOAE6rMI=; b=MAQY60VtbjVB/LoRYq2O0wCI7JzYP5YVhrt0yc4gOzsmfO6PbHHZD8JoJ9oERj6Ttb 7IMMpMVyvu+QqvTCasgWP0YQhgGqTC8PVkB6mkTrMiExuhT8uwjfpxX6Cy8dRjI6nV3x q2dFc0mNQWcOZ8YBhIxYSilDHQdBPr8uKl0hdgHnE+mj5uwlrAFXfwdy0XT/D3P7pIfu xo0wnAIDEQ+7hiP1VLIYY6penWEg49JbicWfKukgVJV6fEPlELDtI8jYUOP/PvBGkRFg k6N2MNy3oldtZ/REFWBdqgVi3Dxh+kj6ivUWPD2Sga/Qi2ojBmadY/8FUXqNOCctbdEx lhUw== X-Gm-Message-State: AOAM532TG2UxYSNYHBtOu7HsR9uJIuzlRs19qQGt1/90Zf8euvSQm5o7 bccvL72A4aqdsfB+psa9lfOr/YlvL8Y= X-Google-Smtp-Source: ABdhPJxdwNs9icdrsQJ+Qj/FTxXVe1EQgBXu2ICdqzNVj13fO1UF5VxQtY18rAHSKrpv7qk01keqbg== X-Received: by 2002:adf:e58b:: with SMTP id l11mr10682127wrm.210.1601767380721; Sat, 03 Oct 2020 16:23:00 -0700 (PDT) Received: from adeos.home (2a01cb058f8a1800df1b0f916d55bd01.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:df1b:f91:6d55:bd01]) by smtp.gmail.com with ESMTPSA id p9sm6581912wmg.34.2020.10.03.16.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 16:23:00 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 4 Oct 2020 01:22:56 +0200 Message-Id: <20201003232256.549688-2-romain.naour@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20201003232256.549688-1-romain.naour@gmail.com> References: <20201003232256.549688-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCHv2 2/2] package/supertux: build squirrel builtin library with fPIC X-BeenThere: buildroot@busybox.net 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: , Cc: Romain Naour , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Ensure that squirrel is compiled with -fPIC to allow linking the static libraries with dynamically linked programs. This is not a requirement for most architectures but is mandatory for ARM. Fixes: http://autobuild.buildroot.org/results/46e8f5e622ce450a89bc6d70f4bfd38182557901 http://autobuild.buildroot.org/results/a43720492d817e4555d728546da9114e3ccba952 Signed-off-by: Romain Naour Cc: Fabrice Fontaine --- ...Lists.txt-compile-squirrel-with-fPIC.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch diff --git a/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch b/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch new file mode 100644 index 0000000000..9fac20a3f8 --- /dev/null +++ b/package/supertux/0001-CMakeLists.txt-compile-squirrel-with-fPIC.patch @@ -0,0 +1,35 @@ +From 23d0bb0ef0fde52d1cffe235edead09287326fb4 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 4 Oct 2020 01:11:30 +0200 +Subject: [PATCH] CMakeLists.txt: compile squirrel with -fPIC + +Ensure that squirrel is compiled with -fPIC to allow linking the static +libraries with dynamically linked programs. This is not a requirement +for most architectures but is mandatory for ARM. + +Fixes: +x86_64-buildroot-linux-musl/bin/ld: CMakeFiles/sq_static.dir/sq.c.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC +x86_64-buildroot-linux-musl/bin/ld: final link failed: nonrepresentable section on output + +Signed-off-by: Romain Naour +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b1dafa1e..07c603cce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -412,7 +412,8 @@ ExternalProject_Add(squirrel + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} + -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX} +- -DINSTALL_INC_DIR=include) ++ -DINSTALL_INC_DIR=include ++ -DCMAKE_POSITION_INDEPENDENT_CODE=ON) + + if(WIN32) + add_library(squirrel_lib SHARED IMPORTED) +-- +2.25.4 +