From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10859 invoked by alias); 12 Sep 2007 15:17:47 -0000 Received: (qmail 10850 invoked by uid 22791); 12 Sep 2007 15:17:46 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Sep 2007 15:17:41 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IVTy4-0003na-TY for ecos-discuss@sources.redhat.com; Wed, 12 Sep 2007 17:17:28 +0200 Received: from c-76-17-159-202.hsd1.mn.comcast.net ([76.17.159.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Sep 2007 17:17:28 +0200 Received: from grante by c-76-17-159-202.hsd1.mn.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Sep 2007 17:17:28 +0200 To: ecos-discuss@sources.redhat.com From: Grant Edwards Date: Wed, 12 Sep 2007 15:17:00 -0000 Message-ID: References: <2a3305fe0709111554x64de173ej3b684623610db101@mail.gmail.com> User-Agent: slrn/0.9.8.1 (Linux) X-IsSubscribed: yes 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: How to modify CFLAGS within an ECM file? X-SW-Source: 2007-09/txt/msg00071.txt.bz2 On 2007-09-11, Mike Arthur wrote: > Is there a way to adjust CFLAGS within an ECM file? I want to be able > to adjust the optimization levels of configurations, without changing > the rest of the CFLAGS when using ecosconfig. I don't want to have to > hand edit the .ecc file. > > This is an example of what I want to do: > $ ecosconfig new pc_rltk8139 > $ ecosconfig import file_that_modifies_optimization_to_O0.ecm > $ ecosconfig tree > $ make > > Now the 'pc_rltk8139' target would be built with -O0 optimization. I > don't know what the contents of "file_that_modifies_optimization.ecm" > would be. > > Any suggestions? The only way I've figured out is to use sed to modify the ecos.ecc file just before the doing the "tree" command. I always use a shellscript to create a new tree. Here's a sample where I modify the CFLAGS value: ---------------------------------------------------------------------- #!/bin/bash [ecosconfig new/add/remove stuff here] # need to add -G0 option to compiler flags to fix the linker error: # Unable to reach __RedBoot_IDLE_TAB_END__ (at 0x08013428) from the global pointer (at 0x0801b$ # hopefully, someday Altera will fix this bug... sed 's/# user_value "-g -O3/user_value "-g -G0 -O3/g' ecos.ecc.new mv ecos.ecc ecos.ecc.orig mv ecos.ecc.new ecos.ecc ecosconfig tree [more sed commands to fix problems in Makefile and .ldi files] ---------------------------------------------------------------------- -- Grant Edwards grante Yow! Yes, but will I at see the EASTER BUNNY in visi.com skintight leather at an IRON MAIDEN concert? -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss