From: Masahiro Yamada Date: Tue, 15 Oct 2013 20:15:30 +0900 Subject: [U-Boot] [PATCH v3] config.mk: fix -fstack-usage support test In-Reply-To: <20131015122145.3f5ac830@lilith> References: <1381831886-26329-1-git-send-email-yamada.m@jp.panasonic.com> <20131015122145.3f5ac830@lilith> Message-ID: <20131015201528.7E81.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Albert > Much better than the previous one (with a nitpick: superfluous "s" in > "This commits")... But now we lack the rationale part, which was > dropped rather than moved after the '---' line. I will add the rationale part in v4 along with s/commits/commit/. Thanks. > Regarding the patch itself, why a shell script rather than a variant > of cc-option? We cannot simply test -fstack-option support by $(call cc-option,...) This was mentioned in version 1 discussion, (I should have written this below the '---') > So, I looked into it more closely and > I found gcc can compile the input file /dev/null successfully > even if -fstack-usage is not supported. > > > $ bfin-uclinux-gcc -fstack-usage -S -xc /dev/null > $ echo $? > 0 > $ bfin-uclinux-gcc -Werror -fstack-usage -S -xc /dev/null > $ echo $? > 0 I chose a shell script because I wanted to keep Makefile cleaner and this is the way Linux Kernel often uses. Please refer to - scripts/gcc-goto.sh - scripts/gcc-version.sh etc. of Linux Kernel. Best Regards Masahiro Yamada