From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16621 invoked by alias); 28 May 2012 13:16:05 -0000 Received: (qmail 16496 invoked by uid 22791); 28 May 2012 13:16:03 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from tetra.codeconfidence.com (HELO tetra.codeconfidence.com) (94.229.66.225) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 May 2012 13:15:27 +0000 Received: from cog.dallaway.org.uk (cpc1-cmbg10-0-0-cust34.5-4.cable.virginmedia.com [81.102.132.35]) by tetra.codeconfidence.com (Postfix) with ESMTP id 9B21E234C178; Mon, 28 May 2012 14:15:25 +0100 (BST) Received: from cog.dallaway.org.uk (cog.dallaway.org.uk [127.0.0.1]) by cog.dallaway.org.uk (8.13.8/8.13.8) with ESMTP id q4SDFOHD016124; Mon, 28 May 2012 14:15:25 +0100 Message-ID: <4FC37A6C.3080503@dallaway.org.uk> Date: Mon, 28 May 2012 13:16:00 -0000 From: John Dallaway User-Agent: Thunderbird 2.0.0.24 (X11/20111109) MIME-Version: 1.0 To: Martin Laabs CC: eCos Discuss References: <4FC35C30.2080707@mailbox.tu-dresden.de> In-Reply-To: <4FC35C30.2080707@mailbox.tu-dresden.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: Remove a CFLAG for one .c file (How to compile only one file in no-thumb mode) X-SW-Source: 2012-05/txt/msg00024.txt.bz2 Hi Martin Martin Laabs wrote: > i have one (inline asm intensive) file in my arm hal package that I do > not want to convert to thumb mode. (This is IMHO for some i.e. cache > functionality even impossible.) > Since I have thumb-interwork enabled I wanna compile this file in arm > mode and the rest of the kernel in thumb mode. > For the whole file I could use the CFLAG_REMOVE functionality from cdl. > However - I'd like to remove the -mthumb flag only for one file. > > I could use the make { ... } function from cdl. But to stay consistent > wit the rest I would like to use the gcc flags that are configured in > the configtool. So just make the object with hardcorded flags is one but > a unattractive option. > > So I would like something like this in my cdl file: > > { > CFLAGS_REMOVE="-mthumb > compile cstx01_misc.c > } > > Do you have an idea how to accomplish this? You should be able to build the file using a CDL make_object rule as follows (untested): > make_object { > cstx01_misc.o : cstx01_misc.c > $(CC) $(INCLUDE_FLAGS) $(filter-out -mthumb, $(ACTUAL_CFLAGS)) -c -o $@ $< > } You will need to remove the file from the regular CDL "compile" list. I hope this helps... John Dallaway eCos maintainer http://www.dallaway.org.uk/john -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss