From patchwork Wed Sep 4 18:49:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Bendebury X-Patchwork-Id: 272710 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 22E362C00D6 for ; Thu, 5 Sep 2013 04:57:06 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5C1DB4A068; Wed, 4 Sep 2013 20:57:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CcertIXgyRB2; Wed, 4 Sep 2013 20:57:03 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 09F734A05F; Wed, 4 Sep 2013 20:57:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA2054A05F for ; Wed, 4 Sep 2013 20:56:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gSg4ua9jIt9K for ; Wed, 4 Sep 2013 20:56:50 +0200 (CEST) X-Greylist: delayed 370 seconds by postgrey-1.27 at theia; Wed, 04 Sep 2013 20:56:42 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) by theia.denx.de (Postfix) with ESMTPS id 309B64A05E for ; Wed, 4 Sep 2013 20:56:42 +0200 (CEST) Received: by mail-ie0-f181.google.com with SMTP id a14so1467028iee.26 for ; Wed, 04 Sep 2013 11:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=SsYHWvyo9Q7W0BWOSvo8uWn8H2kMn18kbLB3xIO/QRo=; b=XatSRcGnW4lXnX8AlY5Hp/Y2DSrkRBGLaPqLBAnjhLhcmzxhFIWmWQVBMboJysWgjm 8u2QM+NmuE59m+ohOQ+gI81Nwi54nsznBgTDEerBxXMvOigJrBpbYd/RCurA/dXNiFU1 IhvgsfRRPtdWHt9ZV2nofWvfEUsUKn0f33FvhveZRthyTppZ/gGwRDAPi3g1nVMkls7P Ew1XYlp8Lz8tXsZ1RQg8K3WJTi9rF8mesuzGNFpO9+Wu903uD5gi1UDs3D3xlspDdpLW Jbi51jW0a65PZeogtHkfEV0e0c8FzQJJM4O2avFG42YzUNyDtOtoWfI/Oc9gYHZduAwG qfaQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=SsYHWvyo9Q7W0BWOSvo8uWn8H2kMn18kbLB3xIO/QRo=; b=OjLqHAMOeH99Jg6oE5zS57MHwkPm0eRcU1qM1kqa2HaCr1fb2VxBWhqSZB0vKM6VYe xmFtZmIefPR+oFpeFIxahfNavQLXdDsCH5/sHgzzqByBFuBXZoyTA68R0XjkdDwGPm3H d/Fv0nmVYwCEQ8rvlMEAacRLEOIHgSe/rFEq8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:content-type; bh=SsYHWvyo9Q7W0BWOSvo8uWn8H2kMn18kbLB3xIO/QRo=; b=FebKxfc6CMmcUgf42z+wjigjzGMjJY82fQsvYapN9O9xW/CuAIaUl7zSr5Ye+mzC/L Iv+3LLgzJnlyGKB8z+iUGVQNyfG1wKrGi8C4rZBqE9X5A2b6gdLbzX6QHz3qNB0fzUPK hl6vfsDZpK618yDYf1zq2fA3Jz1/E4hIzeSxnFu28dc/3BYN8FAIARkfIhF2jgeHitsV efrmqb6JqVYYuQ/LsyTLY88y9D4oDveej4MRAFN5d+YtG/vDDXN/7pja4GsmoXF7sajj iWiNRaph7pd8auuf6BWLgg9fcDBUgBsl44+ue0TYADRbN6U1PDs6r5HLvVFLxW/bImzd +mqQ== X-Gm-Message-State: ALoCoQlPKE0dxcjH5B5ixtST+tiLi4gRkXUnYom+qz65rEif+DFz9pC+s/GpcU1WBStHXOuJkY6QuW+C5Crhy0WRIufzrZnQPnbbHvj4DJz6gT8WB3iIvzLcv0jLG6HKdqWzkqfdssc8ao8hiKoOjHzHLMSbIn5G9iQibNYIVn9kdhiBdh2/OjPZtUt4jwe6ZkV0mpPLg7Nu X-Received: by 10.42.94.196 with SMTP id c4mr116887icn.82.1378320630535; Wed, 04 Sep 2013 11:50:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.160.74 with HTTP; Wed, 4 Sep 2013 11:49:50 -0700 (PDT) From: Vadim Bendebury Date: Wed, 4 Sep 2013 11:49:50 -0700 X-Google-Sender-Auth: IT1YP7PpWDhmxiPgxCJKhrLXvPI Message-ID: To: uboot Subject: [U-Boot] Compiling certain files with extra compiler flags X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Does u-boot provide the ability to change compilation options 'on the fly', say when certain files need to be compiled for symbolic debugging? I looked but did not find any. How about something like this: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv $ git diff config.mk ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Then, say I want to have spl_boot.c compiled with extra flags, just invoking make like this does the trick: CPP_spl_boot_c='-O0 -fno-default-inline' make ... Or is there a better way? --vb diff --git a/config.mk b/config.mk index 853e6d8..41cafbb 100644 --- a/config.mk +++ b/config.mk @@ -406,7 +406,7 @@ $(obj)%.o: %.c ifneq ($(CHECKSRC),0) $(CHECK) $(CHECKFLAGS) $(ALL_CFLAGS) $< endif - $(CC) $(ALL_CFLAGS) -o $@ $< -c + $(CC) $(ALL_CFLAGS) $(CPP_$(subst .,_,$<)) -o $@ $< -c $(obj)%.i: %.c $(CPP) $(ALL_CFLAGS) -o $@ $< -c $(obj)%.s: %.c