From owner-freebsd-ports@freebsd.org Wed May 20 17:25:15 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E575A2DF69E for ; Wed, 20 May 2020 17:25:15 +0000 (UTC) (envelope-from sirdice@gmail.com) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49S04q13Tfz4TXR for ; Wed, 20 May 2020 17:25:14 +0000 (UTC) (envelope-from sirdice@gmail.com) Received: by mail-pl1-x62a.google.com with SMTP id x18so506672pll.6 for ; Wed, 20 May 2020 10:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=zqeQBGKsU3Gx8U2pxihmngD5137nnZ2dYZZ2LMZCeog=; b=KveizSB8BpLRTsDqv87tyvC2dbIVD01pk0QO0jquSInoe+yRsW9XEiDL/tP3dPRzCC WJegpt4WczcgqNIYKBpyrzc2u4du3MTAiKLfSCXuADUCJggurJWT47Y0jssSn6K3D8Im 8nF4N90k7SjTB7bnCqpvv/ib0QSvkRrVUl2DPGgsW9A/yaZeoqz34wVq76uLwaOfLzOM R3aT7IGO47ZetWWDXDu6vsoQRXOq1XvaeM8KwSPnXmAjI1yQrBEVVFoMFWk2NErbGUFr IqHByp9wGOcTkKQPHNuCyGrTSlO8TCmZOG2ARjEUJZyYVO83iAAroD+4zJAQa0v7jDR1 /wvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zqeQBGKsU3Gx8U2pxihmngD5137nnZ2dYZZ2LMZCeog=; b=Fj2Fv8xFRrl0m3G/WM/0kG2ncs7DR5IUiQs98QUiVqgmcINEtPQf4c1JxdZHtbYNzD XoMtv82vx1kPzkyM2/42TRkSDQ/AmJZAE1VHxT2xZdkpxZJrdhDoN/fQAeXvk1RgDzgY srn+3ahL2iyG3F4JL5BJvkydDRnX7o5XuTWuQZUlDfc637vD8zf5Yrd17IndKHNKz1/0 Mwx3o60/NInYd0odq9EEjMm6qum4EQykgrQ5fU/bgeZK6GIU+rTpcVR8D+bqyrvFPqNO 1LIB89zO6NFx+BJIAMtcozI3IEoj2SKVoiJ0lvcsIdr+uZ1owMzj1bzwgsGMyZNXDiLz gy7A== X-Gm-Message-State: AOAM533k57793yOyJU+8zdo5EEmapWfrOa1JeGfpVN6YAApm7sDw9XE1 /YV0QozY17jcz2gR8YHmNl9Mql1PqOSZstDKJCbXdMbu X-Google-Smtp-Source: ABdhPJy29svGCfCH0VHaj7Ekcak8+Yyaxk7XzPiXBskULOx0KTEXCTo6uafxMS72VONVeNbx4Q2ZsmM9ydQWW/Q/+Do= X-Received: by 2002:a17:90b:1882:: with SMTP id mn2mr6591680pjb.139.1589995513388; Wed, 20 May 2020 10:25:13 -0700 (PDT) MIME-Version: 1.0 From: SirDice Date: Wed, 20 May 2020 19:25:00 +0200 Message-ID: Subject: Port OPTIONS advice To: freebsd-ports@freebsd.org X-Rspamd-Queue-Id: 49S04q13Tfz4TXR X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=KveizSB8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of sirdice@gmail.com designates 2607:f8b0:4864:20::62a as permitted sender) smtp.mailfrom=sirdice@gmail.com X-Spamd-Result: default: False [-0.88 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.36)[-0.360]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::62a:from]; NEURAL_SPAM_SHORT(0.33)[0.331]; NEURAL_SPAM_LONG(0.15)[0.147]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2020 17:25:16 -0000 Hi, Some time ago I took over maintainership of fs-uae. Port itself is doing great but I wanted to enable the JIT option to experiment with (it builds but crashes the application; that's an entirely different issue though). To enable it I had added this: OPTIONS_DEFINE_i386= JIT OPTIONS_DEFINE_amd64= JIT Because the option is only available for i386/amd64 I wanted the port option to only show up on x86. Unfortunately the brain-dead ./configure script simply assumes --with-jit on all architectures. As these OPTIONS were only available on x86, any other ARCH never passes --without-jit to ./configure and thus it fails to build. The quick solution was to use OPTIONS_DEFINE= JIT and make the port option available everywhere. However, if you try to enable it you will run into build failures on Powerpc or ARM for example. I could do this: ----------------------------- OPTIONS_DEFINE_i386= JIT OPTIONS_DEFINE_amd64= JIT .include # JIT is not supported on non-x86 .if ${ARCH} != amd64 && ${ARCH} != i386 CONFIGURE_ARGS+= --without-jit .endif ---------------------------- Or do something like this: ---------------------------- OPTIONS_DEFINE= JIT .include .if ${PORT_OPTIONS:MJIT} ONLY_FOR_ARCHS= i386 amd64 .endif ---------------------------- The JIT OPTION is off by default in all cases. But I would like to only have it appear on supported architectures or have some sort of sanity check so it doesn't get enabled on unsupported architectures. As I need to update the port (new version came out) I would like to fix this OPTION issue too. What's a good way to deal with this sort of architecture dependent option? Thanks for your time, Remko C.