public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] arch/ia64/Makefile tweak
@ 2002-04-02  1:36 Gary Hade
  2002-04-02 19:17 ` David Mosberger
  0 siblings, 1 reply; 2+ messages in thread
From: Gary Hade @ 2002-04-02  1:36 UTC (permalink / raw)
  To: linux-ia64

If the gcc in your PATH is version 2.X and you are not 
using cross tools (the CROSS_COMPILE make macro is null) 
`make CC=<path to a 3.X gcc>` fails due to the lack of
--param max-inline-insns 00 on the compile lines.

This happens because GCC_VERSION in arch/ia64/Makefile is 
determined using $(CROSS_COMPILE)$(HOSTCC) which expands 
"gcc" picking up gcc 2.X.  With GCC_VERSION defined as 2 the 
additional CFLAGS options within the ifneq ($(GCC_VERSION),2) 
are not being added.

You can work around the problem by also setting HOSTCC on the
make command line
  e.g. `make CC=<path to a 3.X gcc> HOSTCC=<path to a 3.X gcc>`
but I believe the correct solution is to use $(CC) instead of
$(CROSS_COMPILE)$(HOSTCC) to determine GCC_VERSION.

Gary

-- 
Gary Hade
IBM Linux Technology Center
503-578-4503  IBM T/L: 775-4503
garyhade@us.ibm.com
http://www.ibm.com/linux/ltc


--- arch/ia64/Makefile.orig	Wed Mar 27 13:11:59 2002
+++ arch/ia64/Makefile	Mon Apr  1 15:26:14 2002
@@ -22,7 +22,7 @@
 # -ffunction-sections
 CFLAGS_KERNEL := -mconstant-gp
 
-GCC_VERSION=$(shell $(CROSS_COMPILE)$(HOSTCC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
+GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
 
 ifneq ($(GCC_VERSION),2)
 	CFLAGS += -frename-registers --param max-inline-insns 00



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Linux-ia64] arch/ia64/Makefile tweak
  2002-04-02  1:36 [Linux-ia64] arch/ia64/Makefile tweak Gary Hade
@ 2002-04-02 19:17 ` David Mosberger
  0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2002-04-02 19:17 UTC (permalink / raw)
  To: linux-ia64

Applied, thanks.

In the future, please send properly formatted patches, so that they
can be applied with "patch -p1".  This avoids creating extra work when
applying the patch in the bitkeepr tree.

Thanks,

	--david

>>>>> On Mon, 1 Apr 2002 17:36:12 -0800, Gary Hade <garyhade@us.ibm.com> said:

  Gary> If the gcc in your PATH is version 2.X and you are not using
  Gary> cross tools (the CROSS_COMPILE make macro is null) `make
  Gary> CC=<path to a 3.X gcc>` fails due to the lack of --param
  Gary> max-inline-insns 00 on the compile lines.

  Gary> This happens because GCC_VERSION in arch/ia64/Makefile is
  Gary> determined using $(CROSS_COMPILE)$(HOSTCC) which expands "gcc"
  Gary> picking up gcc 2.X.  With GCC_VERSION defined as 2 the
  Gary> additional CFLAGS options within the ifneq ($(GCC_VERSION),2)
  Gary> are not being added.

  Gary> You can work around the problem by also setting HOSTCC on the
  Gary> make command line e.g. `make CC=<path to a 3.X gcc>
  Gary> HOSTCC=<path to a 3.X gcc>` but I believe the correct solution
  Gary> is to use $(CC) instead of $(CROSS_COMPILE)$(HOSTCC) to
  Gary> determine GCC_VERSION.

  Gary> Gary


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-02 19:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-02  1:36 [Linux-ia64] arch/ia64/Makefile tweak Gary Hade
2002-04-02 19:17 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox