From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20014 invoked by alias); 18 Oct 2011 03:51:41 -0000 Received: (qmail 20001 invoked by uid 22791); 18 Oct 2011 03:51:40 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Oct 2011 03:51:26 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 206E41B401D; Tue, 18 Oct 2011 03:51:25 +0000 (UTC) From: Mike Frysinger To: "Hans-Peter Nilsson" Subject: Re: Your sim configure commits broke mn10300-sim and m68hc11-sim Date: Tue, 18 Oct 2011 04:11:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <201110180245.p9I2jUfi022507@ignucius.se.axis.com> In-Reply-To: <201110180245.p9I2jUfi022507@ignucius.se.axis.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110172351.26470.vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00494.txt.bz2 On Monday 17 October 2011 22:45:30 Hans-Peter Nilsson wrote: > In my most recent sim autotester log, I see a bunch of > sim/*/configure* commits, and breakage. They somehow caused > loss of -lm or something like that when linking mn10300-elf-sim > and m68hc11-elf-sim. Can you please fix? i think it's a matter of these sims didn't build dv-cfi.c before. the regeneration pulled them in (by design). and now they fail ;). the best fix is probably to not use log2() at all. but i'm not sure there is an easy way to do that while maintaining the config format. the idea was to have the device tree format be simple: user specifies the desired file size (in bytes) of the device. the CFI spec requires the size to be available in power of two to the simulated software. so the sim device init code reads the requested size from the device tree, calculates the power of two value, and then uses that when implementing the CFI spec. i could have the user specify the power of two value instead, but it seemed less natural. they'd have to enter like "20" if they wanted a 1MiB flash instead of "1048576" or 0x100000 (which is what they enter now). so that leaves anyone who wants to use dv-cfi with linking against libm. i could update common/acinclude.m4 to do AC_CHECK_LIB(m, log2) when "cfi" is in the enabled hardware list. that way -lm would get added to @LIBS@ which gets used in Make-common.in. any preferences or other ideas ? -mike