From patchwork Sat Mar 9 19:59:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1053866 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.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.b="E3hLXnGn"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44GwDv2Pblz9sBp for ; Sun, 10 Mar 2019 06:59:24 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7861E220EF; Sat, 9 Mar 2019 19:59:21 +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 gwkoB06lO0zA; Sat, 9 Mar 2019 19:59:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 18C51226D0; Sat, 9 Mar 2019 19:59:19 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 02AA01BF267 for ; Sat, 9 Mar 2019 19:59:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0052287627 for ; Sat, 9 Mar 2019 19:59:18 +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 jiNtnTsgOliB for ; Sat, 9 Mar 2019 19:59:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id 109CD86EC8 for ; Sat, 9 Mar 2019 19:59:15 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id o10so11138617wmc.1 for ; Sat, 09 Mar 2019 11:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t9xY3B/tb5NlsHeyeHH9DHP+nTZ7FVM/dX/9RnQi12c=; b=E3hLXnGn0TcvDdav1Y5wWybOdoH2+0TFUJe/flrlQDIEgQDuFtOKX1U7C+MzyG85kB 9OIRiXGwOzUXG89hV/ineAK9jSFPGqLN3nfZMN6w9DMqQ6T0u3Z0q9mOft+B2/sTs48Z oqMGUVr+xHhkH8NUzbg7k4oRGXQJjI/9EQFt9nASjPMK4mlLm42Bzl6yrjzd2gWnhbJ6 /4ix7vOrpHcHwq6wCn/+gzrZ1cE08keF1NA5wMLMNdBpUBm/+CGvVN7MWEvFjGN3l914 UE4gMAQ7seVvfZNRHcTNkGfht0HTEsYv7pyGX4jjpS1DU5geBfwW4a/6i6vdTqD5ercD kr/A== 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:mime-version :content-transfer-encoding; bh=t9xY3B/tb5NlsHeyeHH9DHP+nTZ7FVM/dX/9RnQi12c=; b=qPtZ7Es1wHgFIpWzmUfx5NiHy9ffhl1Hk3JjbOcsePtlCq2luz6aU0sHNQGKFbhVFY hfrA936j3/rDskGLLlOqm1T/dj7QaOMP8W1lnTvjgvjwNigX5ALeAurL41z2Ln5Bk6Q8 7U7UDjY7g4GTVSVC93wqJ6CALmx0BfSxKVJXNq9M8C5zn9ER4Ml8L0kRuQWmkhYsAxFh fdemzUgCXT/wYAM0u2A6MQ4HOkZMJ+PZ4dTdU1LaH11HVtX6QHaerHPrkH4otapwOvIq aPfdz23I67MI3vallngd3yGGHwu+YnopPXttrtmduKn7HJOEigYfNfpErwVK9cIpazCQ x4BA== X-Gm-Message-State: APjAAAUK61luWZPmF9knHOGuU297JvEmy39zzb1qjrynwFeTd+9laz2J oM8krZM1MVHxF3DIGs3PHsY1LnxJ X-Google-Smtp-Source: APXvYqyiVU8173+YLh/O+lGp58uQ6SaR9ZRMSXBjFxYgD7pVDebjvGN0Ocz8Wy5PQAO+drHKYwUQ4Q== X-Received: by 2002:a1c:35c5:: with SMTP id c188mr12404084wma.79.1552161553143; Sat, 09 Mar 2019 11:59:13 -0800 (PST) Received: from kali.home (lfbn-ren-1-128-3.w83-205.abo.wanadoo.fr. [83.205.212.3]) by smtp.gmail.com with ESMTPSA id v67sm22440050wmb.9.2019.03.09.11.59.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Mar 2019 11:59:12 -0800 (PST) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sat, 9 Mar 2019 20:59:00 +0100 Message-Id: <20190309195900.24096-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2, 1/1] package/stella: fix build with PAGE_SIZE 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: Sergio Prado , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: - http://autobuild.buildroot.org/results/22a9b009749af2a0862750a1fb2b2dc7167cd589 Signed-off-by: Fabrice Fontaine --- Changes v1 -> v2: - Update patch after upstream review package/stella/0003-undef-PAGE_SIZE.patch | 53 +++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 package/stella/0003-undef-PAGE_SIZE.patch diff --git a/package/stella/0003-undef-PAGE_SIZE.patch b/package/stella/0003-undef-PAGE_SIZE.patch new file mode 100644 index 0000000000..f5c60fa3b3 --- /dev/null +++ b/package/stella/0003-undef-PAGE_SIZE.patch @@ -0,0 +1,53 @@ +From d14065257b24a9e4a722d1fa1125f26f6599006d Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 9 Mar 2019 20:47:27 +0100 +Subject: [PATCH] undef PAGE_SIZE + +PAGE_SIZE is sometimes already defined by the toolchain so undef it: + +/home/naourr/work/instance-3/output/host/bin/x86_64-linux-g++ -MMD -MF "src/debugger/.deps/CpuDebug.d" -MQ "src/debugger/CpuDebug.o" -MP -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -x c++ -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=c++14 -fomit-frame-pointer -D_GLIBCXX_USE_CXX11_ABI=1 -DUNIX -DBSPF_UNIX -DWINDOWED_SUPPORT -DSOUND_SUPPORT -DDEBUGGER_SUPPORT -DJOYSTICK_SUPPORT -DCHEATCODE_SUPPORT -Isrc/emucore -Isrc/common -Isrc/common/tv_filters -Isrc/gui -Isrc/emucore/tia -Isrc/emucore/tia/frame-manager -I/home/naourr/work/instance-3/output/host/x86_64-buildroot-linux-musl/sysroot/usr/bin/../../usr/include/SDL2 -D_REENTRANT -Isrc/unix -Isrc/debugger -Isrc/debugger/gui -Isrc/yacc -Isrc/cheat -c src/debugger/CpuDebug.cxx -o src/debugger/CpuDebug.o +In file included from /home/naourr/work/instance-3/output/host/x86_64-buildroot-linux-musl/sysroot/usr/include/limits.h:8:0, + from /home/naourr/work/instance-3/output/host/opt/ext-toolchain/x86_64-buildroot-linux-musl/include/c++/7.4.0/climits:42, + from src/common/bspf.hxx:28, + from src/debugger/CartDebug.cxx:18: +src/emucore/System.hxx:64:29: error: expected unqualified-id before numeric constant + static constexpr uInt16 PAGE_SIZE = (1 << PAGE_SHIFT); + +Fixes: + - http://autobuild.buildroot.org/results/22a9b009749af2a0862750a1fb2b2dc7167cd589 + +Signed-off-by: Fabrice Fontaine +--- + src/emucore/MT24LC256.hxx | 2 ++ + src/emucore/System.hxx | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/emucore/MT24LC256.hxx b/src/emucore/MT24LC256.hxx +index fc5d6a49..bb7468b4 100644 +--- a/src/emucore/MT24LC256.hxx ++++ b/src/emucore/MT24LC256.hxx +@@ -23,6 +23,8 @@ class System; + #include "Control.hxx" + #include "bspf.hxx" + ++#undef PAGE_SIZE ++ + /** + Emulates a Microchip Technology Inc. 24LC256, a 32KB Serial Electrically + Erasable PROM accessed using the I2C protocol. Thanks to J. Payson +diff --git a/src/emucore/System.hxx b/src/emucore/System.hxx +index e31202df..85a54f28 100644 +--- a/src/emucore/System.hxx ++++ b/src/emucore/System.hxx +@@ -30,6 +30,8 @@ class NullDevice; + #include "Random.hxx" + #include "Serializable.hxx" + ++#undef PAGE_SIZE ++ + /** + This class represents a system consisting of a 6502 microprocessor + and a set of devices. The devices are mapped into an addressing +-- +2.20.1 +