From owner-freebsd-arm@freebsd.org Thu Jan 26 16:15:17 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEB9FCC2C66 for ; Thu, 26 Jan 2017 16:15:17 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 412302D1 for ; Thu, 26 Jan 2017 16:15:17 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id c206so92482576wme.0 for ; Thu, 26 Jan 2017 08:15:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:references:to:reply-to:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=XZSh3AsGaxSFSOUSMAVOLJZ9izvPRjJGtKfd2qYyEoA=; b=dzWciB0uCLGlDV+kDkjK2wfuOaGJBGPN8Ofb4Iy1PbAfQ1fuWGD/IKiGyLV0MD8QMl S6ewSgP2fuzunZFzz35n6ztonH8Zx5XJ7xwVxpDsp/HHRmF/OZsczcuDfhFaqv/Rkhh/ BkSqefO4aRft6f8iDgV9okv5MRDFZ3k6979N22jx3I12umNNpHc6HX2tFixPFnwIpk6q bQfLFiIBN/IH3WQmOnm2YpEQkm6kRB0Pj4MymC/nzdQwBck7GfepnXU6R4to0XSuyaJi +3a2jkrUvh5V1e+Up5Hju1m+akhANn4bGd5j2cUucnWdmVoLh6IrIEBBGfVZeaOx3HRs j5Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:references:to:reply-to:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=XZSh3AsGaxSFSOUSMAVOLJZ9izvPRjJGtKfd2qYyEoA=; b=nbBUHM0Ljoqyf5HcKvIqgm1tEywpL9qqtSiOHnBLQ5yt43BQtNyLx8sHPmAsJ7XxJD Ei/9bmdMzfm7QLV3jMf8xEAfEbHY4rj0tV9P26beuOn9lwETUhxwI2Fgmczw0wVkNFPb IDp70WFsLn6xtZcYRx6OnZGNihheHWlqfZD9z3o+uS4dvNkORBD4Qc40L4c2L65+osJB GVqinulUlgJITVY3IcGHTrC7ZimAQXnXy4jrWa1Tbkr5oJ0oBnf0BA3AFgBXAqytF/eK K9GdTMSapezvWJZhYANcIoVqNFbhbbg49cXshcmdKAMQJHstQFumLSsYQdMItKfYlvrx Qwdw== X-Gm-Message-State: AIkVDXILkz0/wAJ/Y9r68rcxjHZIdtJv1pMGiUPhm44liBj4CZg7nW6jBazyYvzupQfhQg== X-Received: by 10.28.148.76 with SMTP id w73mr28435700wmd.74.1485447314587; Thu, 26 Jan 2017 08:15:14 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id q4sm3286816wrc.35.2017.01.26.08.15.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jan 2017 08:15:14 -0800 (PST) From: Michal Meloun X-Google-Original-From: Michal Meloun Subject: Re: =mcpu=cortex-a7 buildlworld (for example) vs. __aeabi_uidiv use in ports from pkg References: <15C25780-588B-43EF-8DAC-000C301018BE@dsl-only.net> <1485446344.30533.72.camel@freebsd.org> To: freebsd-arm@freebsd.org Reply-To: mmel@freebsd.org Message-ID: Date: Thu, 26 Jan 2017 17:15:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1485446344.30533.72.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2017 16:15:17 -0000 On 26.01.2017 16:59, Ian Lepore wrote: > On Thu, 2017-01-26 at 02:10 -0800, Mark Millard wrote: >> If I buildworld buildkernel for arm.armv6 with the likes of: >> >> CFLAGS+= =mcpu=cortex-a7 >> CXXFLAGS+= =mcpu=cortex-a7 >> CPPFLAGS+= =mcpu=cortex-a7 >> >> (say for targeting a bpim3 or rpi2) then what package >> installs for that context tends to report: >> >> Undefined symbol "__aeabi_uidiv" >> >> In other words __aeabi_uidiv is only implemented >> for armv6 buildworld, not if one explicitly targets >> armv7. (armv7 has instruction support but that does >> not make software built to support other processor >> variants that are without instruction support also >> work unless the routine is still provided.) >> >> Note: I normally build ports from source anyway >> so this is just an FYI in case the lack of >> __aeabi_uidiv was not deliberate. >> >> === >> Mark Millard >> markmi at dsl-only.net > > I believe problems like this will not go away unless we stop trying to > pretend that armv6 and armv7 are the same thing, and actually start > treating armv7 as its own arch, especially for the purpose of packages > and ports. > > I've said/suggested this more than once, and every time it gets shot > down by the people who actually understand what it takes to create a > new arch (if I knew how to do it, I would have, long ago). As near as > I can tell, the argument against doing it is essentially "because it's > hard". > > So I guess... don't expect it to get better any time soon. > > -- Ian > The problems in more serious and is not related to armv6/armv7 but to specific CPU type (Cortex-A8 have not hw divide instruction). Currently, ARM libc (and few others libraries) accidentally exports some __aeabi builtins originated by compiler_rt library. All functions defined by DEFINE_AEABI_FUNCTION_ALIAS() macro have this problem. The fix is (probably) not a hard, but all precomplied packages currently depends on these symbols. I don't see any way how we can solve this problem without braking all precompiled packages :( Michal